diff --git a/.tx/config b/.tx/config index 81dfbbeac..65a43f3a5 100644 --- a/.tx/config +++ b/.tx/config @@ -17,6 +17,62 @@ minimum_perc = 0 replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:builtins--constants] +file_filter = .//LC_MESSAGES/builtins/constants.po +source_file = pot/builtins/constants.pot +type = PO +minimum_perc = 0 +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:builtins--exceptions] +file_filter = .//LC_MESSAGES/builtins/exceptions.po +source_file = pot/builtins/exceptions.pot +type = PO +minimum_perc = 0 +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:builtins--functions] +file_filter = .//LC_MESSAGES/builtins/functions.po +source_file = pot/builtins/functions.pot +type = PO +minimum_perc = 0 +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:builtins--index] +file_filter = .//LC_MESSAGES/builtins/index.po +source_file = pot/builtins/index.pot +type = PO +minimum_perc = 0 +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:builtins--stdtypes] +file_filter = .//LC_MESSAGES/builtins/stdtypes.po +source_file = pot/builtins/stdtypes.pot +type = PO +minimum_perc = 0 +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:builtins--threadsafety] +file_filter = .//LC_MESSAGES/builtins/threadsafety.po +source_file = pot/builtins/threadsafety.pot +type = PO +minimum_perc = 0 +replace_edited_strings = false +keep_translations = false + +[o:python-doc:p:python-newest:r:builtins--time-complexity] +file_filter = .//LC_MESSAGES/builtins/time-complexity.po +source_file = pot/builtins/time-complexity.pot +type = PO +minimum_perc = 0 +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:c-api--abstract] file_filter = .//LC_MESSAGES/c-api/abstract.po source_file = pot/c-api/abstract.pot @@ -1409,6 +1465,14 @@ minimum_perc = 0 replace_edited_strings = false keep_translations = false +[o:python-doc:p:python-newest:r:library--asyncio-tools] +file_filter = .//LC_MESSAGES/library/asyncio-tools.po +source_file = pot/library/asyncio-tools.pot +type = PO +minimum_perc = 0 +replace_edited_strings = false +keep_translations = false + [o:python-doc:p:python-newest:r:library--asyncore] file_filter = .//LC_MESSAGES/library/asyncore.po source_file = pot/library/asyncore.pot @@ -1673,14 +1737,6 @@ minimum_perc = 0 replace_edited_strings = false keep_translations = false -[o:python-doc:p:python-newest:r:library--constants] -file_filter = .//LC_MESSAGES/library/constants.po -source_file = pot/library/constants.pot -type = PO -minimum_perc = 0 -replace_edited_strings = false -keep_translations = false - [o:python-doc:p:python-newest:r:library--contextlib] file_filter = .//LC_MESSAGES/library/contextlib.po source_file = pot/library/contextlib.pot @@ -2041,14 +2097,6 @@ minimum_perc = 0 replace_edited_strings = false keep_translations = false -[o:python-doc:p:python-newest:r:library--exceptions] -file_filter = .//LC_MESSAGES/library/exceptions.po -source_file = pot/library/exceptions.pot -type = PO -minimum_perc = 0 -replace_edited_strings = false -keep_translations = false - [o:python-doc:p:python-newest:r:library--faulthandler] file_filter = .//LC_MESSAGES/library/faulthandler.po source_file = pot/library/faulthandler.pot @@ -2137,14 +2185,6 @@ minimum_perc = 0 replace_edited_strings = false keep_translations = false -[o:python-doc:p:python-newest:r:library--functions] -file_filter = .//LC_MESSAGES/library/functions.po -source_file = pot/library/functions.pot -type = PO -minimum_perc = 0 -replace_edited_strings = false -keep_translations = false - [o:python-doc:p:python-newest:r:library--functools] file_filter = .//LC_MESSAGES/library/functools.po source_file = pot/library/functools.pot @@ -3113,14 +3153,6 @@ minimum_perc = 0 replace_edited_strings = false keep_translations = false -[o:python-doc:p:python-newest:r:library--stdtypes] -file_filter = .//LC_MESSAGES/library/stdtypes.po -source_file = pot/library/stdtypes.pot -type = PO -minimum_perc = 0 -replace_edited_strings = false -keep_translations = false - [o:python-doc:p:python-newest:r:library--string] file_filter = .//LC_MESSAGES/library/string.po source_file = pot/library/string.pot @@ -3297,14 +3329,6 @@ minimum_perc = 0 replace_edited_strings = false keep_translations = false -[o:python-doc:p:python-newest:r:library--threadsafety] -file_filter = .//LC_MESSAGES/library/threadsafety.po -source_file = pot/library/threadsafety.pot -type = PO -minimum_perc = 0 -replace_edited_strings = false -keep_translations = false - [o:python-doc:p:python-newest:r:library--time] file_filter = .//LC_MESSAGES/library/time.po source_file = pot/library/time.pot diff --git a/about.po b/about.po index 988c33836..3cf62bc1a 100644 --- a/about.po +++ b/about.po @@ -5,15 +5,16 @@ # # Translators: # python-doc bot, 2025 +# TENMYO Masakazu, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-25 14:37+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" -"Last-Translator: python-doc bot, 2025\n" +"Last-Translator: TENMYO Masakazu, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "MIME-Version: 1.0\n" @@ -89,6 +90,10 @@ msgid "" "`__ for a partial " "list of contributors." msgstr "" +"多くの方々が Python 言語、Python 標準ライブラリ、そして Python ドキュメンテー" +"ションに貢献してくれています。 貢献者の部分的なリストは `CPython GitHub " +"repository `__ をご覧" +"ください。" #: ../../about.rst:39 msgid "" diff --git a/bugs.po b/bugs.po index 9f547a185..466875111 100644 --- a/bugs.po +++ b/bugs.po @@ -5,15 +5,16 @@ # # Translators: # python-doc bot, 2025 +# TENMYO Masakazu, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-05 16:26+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" -"Last-Translator: python-doc bot, 2025\n" +"Last-Translator: TENMYO Masakazu, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "MIME-Version: 1.0\n" @@ -41,6 +42,9 @@ msgid "" "Python as it streamlines the process and involves fewer people. Learn how " "to :ref:`contribute `." msgstr "" +"バグを自分で直して Python にパッチを送る方が、簡素で関わる人数が少なくなり、" +"より速く解決できる場合もあります。\n" +"ぜひ :ref:`貢献 ` する方法を学んでください。" #: ../../bugs.rst:19 msgid "Documentation bugs" @@ -53,6 +57,9 @@ msgid "" "the-tracker>`. If you have a suggestion on how to fix it, include that as " "well." msgstr "" +"このドキュメントの不備を発見したとき、または、改善を提案したいときは、問題点" +"を :ref:`issue tracker ` に報告してください。修正方法の案" +"があるならば、それも含めて。" #: ../../bugs.rst:27 msgid "" @@ -60,6 +67,9 @@ msgid "" "documentation, submit the report to the `translation’s repository " "`_ instead." msgstr "" +"このドキュメントの翻訳に関する不備や改善の提案の場合は、代わりに `翻訳用リポ" +"ジトリ `_ へ報告してくださ" +"い。" #: ../../bugs.rst:31 msgid "" @@ -75,6 +85,9 @@ msgid "" "documentation, please submit a bug report on the `python-doc-theme issue " "tracker `_." msgstr "" +"ドキュメントのテーマ (HTML / CSS / JavaScript) に不備を見つけたときは、 " +"`python-doc-theme issue tracker `_ に報告してください。" #: ../../bugs.rst:40 msgid "`Documentation bugs`_" @@ -114,12 +127,15 @@ msgid "" "`Documentation Translations `_" msgstr "" +"`ドキュメントの翻訳 `_" #: ../../bugs.rst:50 msgid "" "A list of GitHub pages for documentation translation and their coordination " "teams." msgstr "" +"ドキュメント翻訳用の GitHub pages と それを取りまとめるチームのリスト。" #: ../../bugs.rst:56 msgid "Using the Python issue tracker" diff --git a/builtins/constants.po b/builtins/constants.po new file mode 100644 index 000000000..8eccb8c96 --- /dev/null +++ b/builtins/constants.po @@ -0,0 +1,181 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# Rafael Fontenelle , 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" +"PO-Revision-Date: 2026-09-13 17:09+0000\n" +"Last-Translator: Rafael Fontenelle , 2026\n" +"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../../builtins/constants.rst:4 +msgid "Built-in Constants" +msgstr "組み込み定数" + +#: ../../builtins/constants.rst:6 +msgid "A small number of constants live in the built-in namespace. They are:" +msgstr "組み込み名前空間にはいくつかの定数があります。定数の一覧:" + +#: ../../builtins/constants.rst:10 +msgid "" +"The false value of the :class:`bool` type. Assignments to ``False`` are " +"illegal and raise a :exc:`SyntaxError`." +msgstr ":class:`bool` 型の偽値です。``False`` への代入は不正で、:exc:`SyntaxError` を送出します。" + +#: ../../builtins/constants.rst:16 +msgid "" +"The true value of the :class:`bool` type. Assignments to ``True`` are " +"illegal and raise a :exc:`SyntaxError`." +msgstr ":class:`bool` 型の真値です。``True`` への代入は不正で、:exc:`SyntaxError` を送出します。" + +#: ../../builtins/constants.rst:22 +msgid "" +"An object frequently used to represent the absence of a value, as when " +"default arguments are not passed to a function. Assignments to ``None`` are " +"illegal and raise a :exc:`SyntaxError`. ``None`` is the sole instance of the" +" :class:`~types.NoneType` type." +msgstr "" + +#: ../../builtins/constants.rst:30 +msgid "" +"A special value which should be returned by the binary special methods (e.g." +" :meth:`~object.__eq__`, :meth:`~object.__lt__`, :meth:`~object.__add__`, " +":meth:`~object.__rsub__`, etc.) to indicate that the operation is not " +"implemented with respect to the other type; may be returned by the in-place " +"binary special methods (e.g. :meth:`~object.__imul__`, " +":meth:`~object.__iand__`, etc.) for the same purpose. It should not be " +"evaluated in a boolean context. :data:`!NotImplemented` is the sole instance" +" of the :class:`types.NotImplementedType` type." +msgstr "" + +#: ../../builtins/constants.rst:40 +msgid "" +"When a binary (or in-place) method returns :data:`!NotImplemented` the " +"interpreter will try the reflected operation on the other type (or some " +"other fallback, depending on the operator). If all attempts return " +":data:`!NotImplemented`, the interpreter will raise an appropriate " +"exception. Incorrectly returning :data:`!NotImplemented` will result in a " +"misleading error message or the :data:`!NotImplemented` value being returned" +" to Python code." +msgstr "" +"二項演算の (あるいはインプレースの) メソッドが :data:`!NotImplemented` " +"を返した場合、インタープリタはもう一方の型で定義された対の演算で代用を試みます (あるいは演算によっては他の代替手段も試みます)。試行された演算全てが " +":data:`!NotImplemented` を返した場合、インタープリタは適切な例外を送出します。 :data:`!NotImplemented` " +"を正しく返さないと、誤解を招きかねないエラーメッセージになったり、 :data:`!NotImplemented` が Python " +"コードに返されるようなことになります。" + +#: ../../builtins/constants.rst:47 +msgid "See :ref:`implementing-the-arithmetic-operations` for examples." +msgstr "例として :ref:`implementing-the-arithmetic-operations` を参照してください。" + +#: ../../builtins/constants.rst:51 +msgid "" +":data:`!NotImplemented` and :exc:`!NotImplementedError` are not " +"interchangeable. This constant should only be used as described above; see " +":exc:`NotImplementedError` for details on correct usage of the exception." +msgstr "" + +#: ../../builtins/constants.rst:56 +msgid "" +"Evaluating :data:`!NotImplemented` in a boolean context was deprecated." +msgstr "" + +#: ../../builtins/constants.rst:59 +msgid "" +"Evaluating :data:`!NotImplemented` in a boolean context now raises a " +":exc:`TypeError`. It previously evaluated to :const:`True` and emitted a " +":exc:`DeprecationWarning` since Python 3.9." +msgstr "" + +#: ../../builtins/constants.rst:68 +msgid "" +"The same as the ellipsis literal \"``...``\", an object frequently used to " +"indicate that something is omitted. Assignment to ``Ellipsis`` is possible, " +"but assignment to ``...`` raises a :exc:`SyntaxError`. ``Ellipsis`` is the " +"sole instance of the :class:`types.EllipsisType` type." +msgstr "" + +#: ../../builtins/constants.rst:76 +msgid "" +"This constant is true if Python was not started with an :option:`-O` option." +" See also the :keyword:`assert` statement." +msgstr "" +"この定数は、Python が :option:`-O` オプションを有効にして開始されたのでなければ真です。 :keyword:`assert` " +"文も参照して下さい。" + +#: ../../builtins/constants.rst:82 +msgid "" +"The names :data:`None`, :data:`False`, :data:`True` and :data:`__debug__` " +"cannot be reassigned (assignments to them, even as an attribute name, raise " +":exc:`SyntaxError`), so they can be considered \"true\" constants." +msgstr "" +"名前 :data:`None` 、 :data:`False` 、 :data:`True` 、 :data:`__debug__` は再代入できない " +"(これらに対する代入は、たとえ属性名としてであっても :exc:`SyntaxError` が送出されます) " +"ので、これらは「真の」定数であると考えられます。" + +#: ../../builtins/constants.rst:90 +msgid "Constants added by the :mod:`site` module" +msgstr ":mod:`site` モジュールで追加される定数" + +#: ../../builtins/constants.rst:92 +msgid "" +"The :mod:`site` module (which is imported automatically during startup, " +"except if the :option:`-S` command-line option is given) adds several " +"constants to the built-in namespace. They are useful for the interactive " +"interpreter shell and should not be used in programs." +msgstr "" +":mod:`site` モジュール (:option:`-S` " +"コマンドラインオプションが指定されない限り、スタートアップ時に自動的にインポートされます) " +"は組み込み名前空間にいくつかの定数を追加します。それらは対話的インタープリタシェルで有用ですが、プログラム中では使うべきではありません。" + +#: ../../builtins/constants.rst:100 +msgid "" +"Objects that when printed, print a message like \"Use quit() or Ctrl-D (i.e." +" EOF) to exit\", and when accessed directly in the interactive interpreter " +"or called as functions, raise :exc:`SystemExit` with the specified exit " +"code." +msgstr "" + +#: ../../builtins/constants.rst:108 +msgid "" +"Object that when printed, prints the message \"Type help() for interactive " +"help, or help(object) for help about object.\", and when accessed directly " +"in the interactive interpreter, invokes the built-in help system (see " +":func:`help`)." +msgstr "" + +#: ../../builtins/constants.rst:116 +msgid "" +"Objects that when printed or called, print the text of copyright or credits," +" respectively." +msgstr "表示あるいは呼び出されたときに、それぞれ著作権あるいはクレジットのテキストが表示されるオブジェクトです。" + +#: ../../builtins/constants.rst:121 +msgid "" +"Object that when printed, prints the message \"Type license() to see the " +"full license text\", and when called, displays the full license text in a " +"pager-like fashion (one screen at a time)." +msgstr "" +"表示されたときに \"Type license() to see the full license text\" " +"というメッセージを表示し、呼び出されたときには完全なライセンスのテキストをページャのような形式で (1画面分づつ) 表示するオブジェクトです。" + +#: ../../builtins/constants.rst:65 +msgid "..." +msgstr "..." + +#: ../../builtins/constants.rst:65 +msgid "ellipsis literal" +msgstr "ellipsisリテラル" diff --git a/builtins/exceptions.po b/builtins/exceptions.po new file mode 100644 index 000000000..c2d48e5aa --- /dev/null +++ b/builtins/exceptions.po @@ -0,0 +1,1597 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# Rafael Fontenelle , 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" +"PO-Revision-Date: 2026-09-13 17:09+0000\n" +"Last-Translator: Rafael Fontenelle , 2026\n" +"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../../builtins/exceptions.rst:4 +msgid "Built-in Exceptions" +msgstr "組み込み例外" + +#: ../../builtins/exceptions.rst:10 +msgid "" +"In Python, all exceptions must be instances of a class that derives from " +":class:`BaseException`. In a :keyword:`try` statement with an " +":keyword:`except` clause that mentions a particular class, that clause also " +"handles any exception classes derived from that class (but not exception " +"classes from which *it* is derived). Two exception classes that are not " +"related via subclassing are never equivalent, even if they have the same " +"name." +msgstr "" +"Python において、すべての例外は :class:`BaseException` " +"から派生したクラスのインスタンスでなければなりません。特定のクラスを言及する :keyword:`except` 節を伴う :keyword:`try`" +" 文において、その節はそのクラスから派生した例外クラスも処理しますが、そのクラスの派生 *元* の例外クラスは処理しません。サブクラス化の関係にない 2" +" つの例外クラスは、それらが同じ名前だった場合でも等しくなりえません。" + +#: ../../builtins/exceptions.rst:19 +msgid "" +"The built-in exceptions listed in this chapter can be generated by the " +"interpreter or built-in functions. Except where mentioned, they have an " +"\"associated value\" indicating the detailed cause of the error. This may " +"be a string or a tuple of several items of information (e.g., an error code " +"and a string explaining the code). The associated value is usually passed " +"as arguments to the exception class's constructor." +msgstr "" +"この章で挙げる組み込み例外は、インタプリタや組み込み関数によって生成されます。特に注記しないかぎり、これらはエラーの詳しい原因を示す \"関連値 " +"(associated value)\" を持ちます。この値は、複数の情報 (エラーコードや、そのコードを説明する文字列など) " +"の文字列かタプルです。関連値は通常、例外クラスのコンストラクタに引数として渡されます。" + +#: ../../builtins/exceptions.rst:26 +msgid "" +"User code can raise built-in exceptions. This can be used to test an " +"exception handler or to report an error condition \"just like\" the " +"situation in which the interpreter raises the same exception; but beware " +"that there is nothing to prevent user code from raising an inappropriate " +"error." +msgstr "" +"ユーザによるコードも組み込み例外を送出できます。これを使って、例外ハンドラをテストしたり、インタプリタが同じ例外を送出する状況と " +"\"ちょうど同じような\" " +"エラー条件であることを報告したりできます。しかし、ユーザのコードが適切でないエラーを送出するのを妨げる方法はないので注意してください。" + +#: ../../builtins/exceptions.rst:31 +msgid "" +"The built-in exception classes can be subclassed to define new exceptions; " +"programmers are encouraged to derive new exceptions from the " +":exc:`Exception` class or one of its subclasses, and not from " +":exc:`BaseException`. More information on defining exceptions is available " +"in the Python Tutorial under :ref:`tut-userexceptions`." +msgstr "" +"組み込み例外クラスは新たな例外を定義するためにサブクラス化することができます。新しい例外は、:exc:`Exception` " +"クラスかそのサブクラスの一つから派生することをお勧めします。 :exc:`BaseException` " +"からは派生しないで下さい。例外を定義する上での詳しい情報は、 Python チュートリアルの :ref:`tut-userexceptions` " +"の項目にあります。" + +#: ../../builtins/exceptions.rst:39 +msgid "Exception context" +msgstr "例外コンテキスト" + +#: ../../builtins/exceptions.rst:46 +msgid "" +"Three attributes on exception objects provide information about the context " +"in which the exception was raised:" +msgstr "例外オブジェクトの3つの属性は、例外が送出された常用に関する情報を提供します:" + +#: ../../builtins/exceptions.rst:53 +msgid "" +"When raising a new exception while another exception is already being " +"handled, the new exception's :attr:`!__context__` attribute is automatically" +" set to the handled exception. An exception may be handled when an " +":keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` " +"statement, is used." +msgstr "" + +#: ../../builtins/exceptions.rst:59 +msgid "" +"This implicit exception context can be supplemented with an explicit cause " +"by using :keyword:`!from` with :keyword:`raise`::" +msgstr "" + +#: ../../builtins/exceptions.rst:63 +msgid "raise new_exc from original_exc" +msgstr "" + +#: ../../builtins/exceptions.rst:65 +msgid "" +"The expression following :keyword:`from` must be an exception or " +"``None``. It will be set as :attr:`!__cause__` on the raised exception. " +"Setting :attr:`!__cause__` also implicitly sets the " +":attr:`!__suppress_context__` attribute to ``True``, so that using ``raise " +"new_exc from None`` effectively replaces the old exception with the new one " +"for display purposes (e.g. converting :exc:`KeyError` to " +":exc:`AttributeError`), while leaving the old exception available in " +":attr:`!__context__` for introspection when debugging." +msgstr "" +":keyword:`from ` に続く式は例外か ``None`` でなくてはなりません。\n" +"式は送出される例外の :attr:`!__cause__` として設定されます。\n" +":attr:`!__cause__` を設定することは、 :attr:`!__suppress_context__` 属性を暗黙的に ``True`` に設定することにもなるので、 ``raise new_exc from None`` を使うことで効率的に古い例外を新しいもので置き換えて表示する (例えば、 :exc:`KeyError` を :exc:`AttributeError` に置き換え)、古い例外はデバッグ時の調査で使えるよう :attr:`!__context__` に残すことができます。" + +#: ../../builtins/exceptions.rst:74 +msgid "" +"The default traceback display code shows these chained exceptions in " +"addition to the traceback for the exception itself. An explicitly chained " +"exception in :attr:`!__cause__` is always shown when present. An implicitly " +"chained exception in :attr:`!__context__` is shown only if " +":attr:`!__cause__` is :const:`None` and :attr:`!__suppress_context__` is " +"false." +msgstr "" +"デフォルトの traceback 表示コードは、例外自体の traceback " +"に加え、これらの連鎖された例外を表示します。:attr:`!__cause__` " +"で明示的に連鎖させた例外は、存在するならば常に表示されます。:attr:`!__context__` " +"で暗黙に連鎖させた例外は、:attr:`!__cause__` が :const:`None` かつ " +":attr:`!__suppress_context__` が false の場合にのみ表示されます。" + +#: ../../builtins/exceptions.rst:80 +msgid "" +"In either case, the exception itself is always shown after any chained " +"exceptions so that the final line of the traceback always shows the last " +"exception that was raised." +msgstr "" +"いずれにせよ、連鎖された例外に続いて、その例外自体は常に表示されます。そのため、traceback " +"の最終行には、常に送出された最後の例外が表示されます。" + +#: ../../builtins/exceptions.rst:86 +msgid "Inheriting from built-in exceptions" +msgstr "組み込み例外から継承する" + +#: ../../builtins/exceptions.rst:88 +msgid "" +"User code can create subclasses that inherit from an exception type. It's " +"recommended to only subclass one exception type at a time to avoid any " +"possible conflicts between how the bases handle the ``args`` attribute, as " +"well as due to possible memory layout incompatibilities." +msgstr "" + +#: ../../builtins/exceptions.rst:95 +msgid "" +"Most built-in exceptions are implemented in C for efficiency, see: " +":source:`Objects/exceptions.c`. Some have custom memory layouts which makes" +" it impossible to create a subclass that inherits from multiple exception " +"types. The memory layout of a type is an implementation detail and might " +"change between Python versions, leading to new conflicts in the future. " +"Therefore, it's recommended to avoid subclassing multiple exception types " +"altogether." +msgstr "" + +#: ../../builtins/exceptions.rst:105 +msgid "Base classes" +msgstr "基底クラス" + +#: ../../builtins/exceptions.rst:107 +msgid "" +"The following exceptions are used mostly as base classes for other " +"exceptions." +msgstr "以下の例外は、主に他の例外の基底クラスとして使われます。" + +#: ../../builtins/exceptions.rst:111 +msgid "" +"The base class for all built-in exceptions. It is not meant to be directly " +"inherited by user-defined classes (for that, use :exc:`Exception`). If " +":func:`str` is called on an instance of this class, the representation of " +"the argument(s) to the instance are returned, or the empty string when there" +" were no arguments." +msgstr "" +"全ての組み込み例外の基底クラスです。ユーザ定義の例外に直接継承されることは意図されていません (継承には :exc:`Exception` " +"を使ってください)。このクラスのインスタンスに :func:`str` " +"が呼ばれた場合、インスタンスへの引数の表現か、引数が無い場合には空文字列が返されます。" + +#: ../../builtins/exceptions.rst:119 +msgid "" +"The tuple of arguments given to the exception constructor. Some built-in " +"exceptions (like :exc:`OSError`) expect a certain number of arguments and " +"assign a special meaning to the elements of this tuple, while others are " +"usually called only with a single string giving an error message." +msgstr "" +"例外コンストラクタに与えられた引数のタプルです。組み込み例外は普通、エラーメッセージを与える一つの文字列だけを引数として呼ばれますが、中には " +"(:exc:`OSError` など) いくつかの引数を必要とし、このタプルの要素に特別な意味を込めるものもあります。" + +#: ../../builtins/exceptions.rst:126 +msgid "" +"This method sets *tb* as the new traceback for the exception and returns the" +" exception object. It was more commonly used before the exception chaining " +"features of :pep:`3134` became available. The following example shows how " +"we can convert an instance of ``SomeException`` into an instance of " +"``OtherException`` while preserving the traceback. Once raised, the current" +" frame is pushed onto the traceback of the ``OtherException``, as would have" +" happened to the traceback of the original ``SomeException`` had we allowed " +"it to propagate to the caller. ::" +msgstr "" + +#: ../../builtins/exceptions.rst:135 +msgid "" +"try:\n" +" ...\n" +"except SomeException:\n" +" tb = sys.exception().__traceback__\n" +" raise OtherException(...).with_traceback(tb)" +msgstr "" + +#: ../../builtins/exceptions.rst:143 +msgid "" +"A writable field that holds the :ref:`traceback object ` " +"associated with this exception. See also: :ref:`raise`." +msgstr "" + +#: ../../builtins/exceptions.rst:149 +msgid "" +"Add the string ``note`` to the exception's notes which appear in the " +"standard traceback after the exception string. A :exc:`TypeError` is raised " +"if ``note`` is not a string." +msgstr "" +"例外のノートとして文字列 ``note`` を追加します。ノートは標準のトレースバックで例外文字列の後に表示されます。``note`` " +"が文字列以外の場合 :exc:`TypeError` が送出されます。" + +#: ../../builtins/exceptions.rst:157 +msgid "" +"A list of the notes of this exception, which were added with " +":meth:`add_note`. This attribute is created when :meth:`add_note` is called." +msgstr "" +":meth:`add_note` で追加された例外のノートのリスト。この属性は :meth:`add_note` を呼び出すと生成されます。" + +#: ../../builtins/exceptions.rst:165 +msgid "" +"All built-in, non-system-exiting exceptions are derived from this class. " +"All user-defined exceptions should also be derived from this class." +msgstr "システム終了以外の全ての組み込み例外はこのクラスから派生しています。全てのユーザ定義例外もこのクラスから派生させるべきです。" + +#: ../../builtins/exceptions.rst:171 +msgid "" +"The base class for those built-in exceptions that are raised for various " +"arithmetic errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, " +":exc:`FloatingPointError`." +msgstr "" +"算術上の様々なエラーに対して送出される組み込み例外 :exc:`OverflowError`, :exc:`ZeroDivisionError`, " +":exc:`FloatingPointError` の基底クラスです。" + +#: ../../builtins/exceptions.rst:178 +msgid "" +"Raised when a :ref:`buffer ` related operation cannot be " +"performed." +msgstr ":ref:`バッファ ` に関連する操作が行えなかったときに送出されます。" + +#: ../../builtins/exceptions.rst:184 +msgid "" +"The base class for the exceptions that are raised when a key or index used " +"on a mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. " +"This can be raised directly by :func:`codecs.lookup`." +msgstr "" +"マッピングまたはシーケンスで使われたキーやインデクスが無効な場合に送出される例外 :exc:`IndexError` および " +":exc:`KeyError` の基底クラスです。 :func:`codecs.lookup` によって直接送出されることもあります。" + +#: ../../builtins/exceptions.rst:190 +msgid "Concrete exceptions" +msgstr "具象例外" + +#: ../../builtins/exceptions.rst:192 +msgid "The following exceptions are the exceptions that are usually raised." +msgstr "以下の例外は、通常送出される例外です。" + +#: ../../builtins/exceptions.rst:198 +msgid "Raised when an :keyword:`assert` statement fails." +msgstr ":keyword:`assert` 文が失敗した場合に送出されます。" + +#: ../../builtins/exceptions.rst:203 +msgid "" +"Raised when an attribute reference (see :ref:`attribute-references`) or " +"assignment fails. (When an object does not support attribute references or " +"attribute assignments at all, :exc:`TypeError` is raised.)" +msgstr "" +"属性参照 (:ref:`attribute-references` を参照) や代入が失敗した場合に送出されます " +"(オブジェクトが属性の参照や属性の代入をまったくサポートしていない場合には :exc:`TypeError` が送出されます)。" + +#: ../../builtins/exceptions.rst:207 +msgid "" +"The optional *name* and *obj* keyword-only arguments set the corresponding " +"attributes:" +msgstr "" + +#: ../../builtins/exceptions.rst:212 +msgid "The name of the attribute that was attempted to be accessed." +msgstr "" + +#: ../../builtins/exceptions.rst:216 +msgid "The object that was accessed for the named attribute." +msgstr "" + +#: ../../builtins/exceptions.rst:218 +msgid "Added the :attr:`name` and :attr:`obj` attributes." +msgstr ":attr:`name` および :attr:`obj` 属性が追加されました。" + +#: ../../builtins/exceptions.rst:223 +msgid "" +"Raised when the :func:`input` function hits an end-of-file condition (EOF) " +"without reading any data. (Note: the :meth:`io.TextIOBase.read` and " +":meth:`io.IOBase.readline` methods return an empty string when they hit " +"EOF.)" +msgstr "" + +#: ../../builtins/exceptions.rst:230 +msgid "Not currently used." +msgstr "現在は使われていません。" + +#: ../../builtins/exceptions.rst:235 +msgid "" +"Raised when a :term:`generator` or :term:`coroutine` is closed; see " +":meth:`generator.close` and :meth:`coroutine.close`. It directly inherits " +"from :exc:`BaseException` instead of :exc:`Exception` since it is " +"technically not an error." +msgstr "" +":term:`ジェネレータ ` や :term:`コルーチン ` が閉じられたときに送出されます。 " +":meth:`generator.close` と :meth:`coroutine.close` " +"を参照してください。この例外は厳密に言えばエラーではないので、 :exc:`Exception` ではなく :exc:`BaseException` " +"を直接継承しています。" + +#: ../../builtins/exceptions.rst:243 +msgid "" +"Raised when the :keyword:`import` statement has troubles trying to load a " +"module. Also raised when the \"from list\" in ``from ... import`` has a " +"name that cannot be found." +msgstr "" +":keyword:`import` 文でモジュールをロードしようとして問題が発生すると送出されます。\n" +"``from ... import`` の中の\"from list\" (訳注:``...`` の部分)の名前が見つからないときにも送出されます。" + +#: ../../builtins/exceptions.rst:247 +msgid "" +"The optional *name* and *path* keyword-only arguments set the corresponding " +"attributes:" +msgstr "オブションのキーワード専用引数 *name* と *path* は、対応する属性に設定されます:" + +#: ../../builtins/exceptions.rst:252 +msgid "The name of the module that was attempted to be imported." +msgstr "インポートを試みたモジュールの名前。" + +#: ../../builtins/exceptions.rst:256 +msgid "The path to any file which triggered the exception." +msgstr "例外を引き起こしたファイルのパス。" + +#: ../../builtins/exceptions.rst:258 +msgid "Added the :attr:`name` and :attr:`path` attributes." +msgstr ":attr:`name` および :attr:`path` 属性が追加されました。" + +#: ../../builtins/exceptions.rst:263 +msgid "" +"A subclass of :exc:`ImportError` which is raised by :keyword:`import` when a" +" module could not be located. It is also raised when ``None`` is found in " +":data:`sys.modules`." +msgstr "" +":exc:`ImportError` のサブクラスで、:keyword:`import` 文でモジュールが見つからない場合に送出されます。また、 " +":data:`sys.modules` に ``None`` が含まれる場合にも送出されます。" + +#: ../../builtins/exceptions.rst:271 +msgid "" +"A subclass of :exc:`ImportError` which is raised when a lazy import fails " +"because it (directly or indirectly) tries to import itself." +msgstr "" + +#: ../../builtins/exceptions.rst:278 +msgid "" +"Raised when a sequence subscript is out of range. (Slice indices are " +"silently truncated to fall in the allowed range; if an index is not an " +"integer, :exc:`TypeError` is raised.)" +msgstr "" +"シーケンスの添字が範囲外の場合に送出されます。 (スライスのインデクスはシーケンスの範囲に収まるように暗黙のうちに調整されます; " +"インデクスが整数でない場合、 :exc:`TypeError` が送出されます。)" + +#: ../../builtins/exceptions.rst:287 +msgid "" +"Raised when a mapping (dictionary) key is not found in the set of existing " +"keys." +msgstr "マッピング (辞書) のキーが、既存のキーの集合内に見つからなかった場合に送出されます。" + +#: ../../builtins/exceptions.rst:294 +msgid "" +"Raised when the user hits the interrupt key (normally :kbd:`Control-C` or " +":kbd:`Delete`). During execution, a check for interrupts is made regularly." +" The exception inherits from :exc:`BaseException` so as to not be " +"accidentally caught by code that catches :exc:`Exception` and thus prevent " +"the interpreter from exiting." +msgstr "" +"ユーザが割り込みキー (通常は :kbd:`Control-C` または :kbd:`Delete`) " +"を押した場合に送出されます。実行中、割り込みは定期的に監視されます。:exc:`Exception` " +"を捕捉するコードに誤って捕捉されてインタプリタの終了が阻害されないように、この例外は :exc:`BaseException` を継承しています。" + +#: ../../builtins/exceptions.rst:302 +msgid "" +"Catching a :exc:`KeyboardInterrupt` requires special consideration. Because " +"it can be raised at unpredictable points, it may, in some circumstances, " +"leave the running program in an inconsistent state. It is generally best to " +"allow :exc:`KeyboardInterrupt` to end the program as quickly as possible or " +"avoid raising it entirely. (See :ref:`handlers-and-exceptions`.)" +msgstr "" + +#: ../../builtins/exceptions.rst:312 +msgid "" +"Raised when an operation runs out of memory but the situation may still be " +"rescued (by deleting some objects). The associated value is a string " +"indicating what kind of (internal) operation ran out of memory. Note that " +"because of the underlying memory management architecture (C's " +":c:func:`malloc` function), the interpreter may not always be able to " +"completely recover from this situation; it nevertheless raises an exception " +"so that a stack traceback can be printed, in case a run-away program was the" +" cause." +msgstr "" +"ある操作中にメモリが不足したが、その状況は (オブジェクトをいくつか消去することで) " +"まだ復旧可能かもしれない場合に送出されます。この例外の関連値は、メモリ不足になった (内部) 操作の種類を示す文字列です。下層のメモリ管理アーキテクチャ" +" (C の :c:func:`malloc` 関数) " +"のために、インタプリタが現状から完璧に復旧できるとはかぎらないので注意してください。それでも、プログラムの暴走が原因の場合に備えて実行スタックのトレースバックを出力できるように、例外が送出されます。" + +#: ../../builtins/exceptions.rst:323 +msgid "" +"Raised when a local or global name is not found. This applies only to " +"unqualified names. The associated value is an error message that includes " +"the name that could not be found." +msgstr "" +"ローカルまたはグローバルの名前が見つからなかった場合に送出されます。これは非修飾の (訳注: ``spam.egg`` ではなく単に ``egg`` " +"のような) 名前のみに適用されます。関連値は見つからなかった名前を含むエラーメッセージです。" + +#: ../../builtins/exceptions.rst:327 +msgid "The optional *name* keyword-only argument sets the attribute:" +msgstr "" + +#: ../../builtins/exceptions.rst:331 +msgid "The name of the variable that was attempted to be accessed." +msgstr "" + +#: ../../builtins/exceptions.rst:333 +msgid "Added the :attr:`name` attribute." +msgstr ":attr:`name` 属性が追加されました。" + +#: ../../builtins/exceptions.rst:339 +msgid "" +"This exception is derived from :exc:`RuntimeError`. In user defined base " +"classes, abstract methods should raise this exception when they require " +"derived classes to override the method, or while the class is being " +"developed to indicate that the real implementation still needs to be added." +msgstr "" +"この例外は :exc:`RuntimeError` " +"から派生しています。ユーザ定義の基底クラスにおいて、抽象メソッドが派生クラスでオーバライドされることを要求する場合にこの例外を送出しなくてはなりません。またはクラスは実装中であり本来の実装を追加する必要があることを示します。" + +#: ../../builtins/exceptions.rst:346 +msgid "" +"It should not be used to indicate that an operator or method is not meant to" +" be supported at all -- in that case either leave the operator / method " +"undefined or, if a subclass, set it to :data:`None`." +msgstr "" +"演算子やメソッドがサポートされていないことを示す目的でこの例外を使用するべきではありません。そのようなケースではオペレータやメソッドを未定義のままとするか、サブクラスの場合は" +" :data:`None` を設定してください。" + +#: ../../builtins/exceptions.rst:352 +msgid "" +":exc:`!NotImplementedError` and :data:`!NotImplemented` are not " +"interchangeable. This exception should only be used as described above; see " +":data:`NotImplemented` for details on correct usage of the built-in " +"constant." +msgstr "" + +#: ../../builtins/exceptions.rst:363 +msgid "" +"This exception is raised when a system function returns a system-related " +"error, including I/O failures such as \"file not found\" or \"disk full\" " +"(not for illegal argument types or other incidental errors)." +msgstr "" +"この例外はシステム関数がシステム関連のエラーを返した場合に送出されます。例えば \"file not found\" や \"disk full\" " +"のような I/O の失敗が発生したときです (引数の型が不正な場合や、他の偶発的なエラーは除きます)。" + +#: ../../builtins/exceptions.rst:367 +msgid "" +"The second form of the constructor sets the corresponding attributes, " +"described below. The attributes default to :const:`None` if not specified." +" For backwards compatibility, if three arguments are passed, the " +":attr:`~BaseException.args` attribute contains only a 2-tuple of the first " +"two constructor arguments." +msgstr "" +"コンストラクタの2番目の形式は下記の対応する属性を設定します。指定されなかった場合属性はデフォルトで :const:`None` " +"です。後方互換性のために、引数が3つ渡された場合、:attr:`~BaseException.args` " +"属性は最初の2つの要素のみからなるタプルを持ちます。" + +#: ../../builtins/exceptions.rst:373 +msgid "" +"The constructor often actually returns a subclass of :exc:`OSError`, as " +"described in `OS exceptions`_ below. The particular subclass depends on the" +" final :attr:`.errno` value. This behaviour only occurs when constructing " +":exc:`OSError` directly or via an alias, and is not inherited when " +"subclassing." +msgstr "" +"コンストラクタは実際には、 `OS exceptions`_ で述べられている :exc:`OSError` " +"のサブクラスを返すことがよくあります。特定のサブクラスは最終的な :attr:`.errno` 値によります。この挙動は :exc:`OSError` " +"を直接またはエイリアスで構築し、サブクラス化時に継承されなかった場合にのみ発生します。" + +#: ../../builtins/exceptions.rst:381 +msgid "A numeric error code from the C variable :c:data:`errno`." +msgstr "C 変数 :c:data:`errno` に由来する数値エラーコードです。" + +#: ../../builtins/exceptions.rst:385 +msgid "" +"Under Windows, this gives you the native Windows error code. The " +":attr:`.errno` attribute is then an approximate translation, in POSIX terms," +" of that native error code." +msgstr "" +"Windows において、ネイティブ Windows エラーコードを与えます。そして :attr:`errno` 属性は POSIX " +"でいうネイティブエラーコードへのおよその翻訳です。" + +#: ../../builtins/exceptions.rst:389 +msgid "" +"Under Windows, if the *winerror* constructor argument is an integer, the " +":attr:`.errno` attribute is determined from the Windows error code, and the " +"*errno* argument is ignored. On other platforms, the *winerror* argument is" +" ignored, and the :attr:`winerror` attribute does not exist." +msgstr "" +"Windows では、*winerror* コンストラクタ引数が整数の場合 :attr:`.errno` 属性は Windows " +"エラーコードから決定され、*errno* 引数は無視されます。他のプラットフォームでは *winerror* 引数は無視され、 " +":attr:`winerror` 属性は存在しません。" + +#: ../../builtins/exceptions.rst:397 +msgid "" +"The corresponding error message, as provided by the operating system. It is" +" formatted by the C functions :c:func:`!perror` under POSIX, and " +":c:func:`!FormatMessage` under Windows." +msgstr "" + +#: ../../builtins/exceptions.rst:405 +msgid "" +"For exceptions that involve a file system path (such as :func:`open` or " +":func:`os.unlink`), :attr:`filename` is the file name passed to the " +"function. For functions that involve two file system paths (such as " +":func:`os.rename`), :attr:`filename2` corresponds to the second file name " +"passed to the function." +msgstr "" +"ファイルシステムパスが1つ関与する例外 (例えば :func:`open` や :func:`os.unlink`) の場合、:attr:`filename` は関数に渡されたファイル名です。\n" +"ファイルシステムパスが2つ関与する関数 (例えば :func:`os.rename`) の場合、:attr:`filename2` は関数に渡された2つ目のファイル名です。" + +#: ../../builtins/exceptions.rst:412 +msgid "" +":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, " +":exc:`socket.error`, :exc:`select.error` and :exc:`!mmap.error` have been " +"merged into :exc:`OSError`, and the constructor may return a subclass." +msgstr "" + +#: ../../builtins/exceptions.rst:418 +msgid "" +"The :attr:`filename` attribute is now the original file name passed to the " +"function, instead of the name encoded to or decoded from the " +":term:`filesystem encoding and error handler`. Also, the *filename2* " +"constructor argument and attribute was added." +msgstr "" +":attr:`filename` 属性が :term:`filesystem encoding and error handler` のエンコーディングでエンコードやデコードされた名前から、関数に渡された元々のファイル名になりました。\n" +"また、*filename2* コンストラクタ引数が追加されました。" + +#: ../../builtins/exceptions.rst:427 +msgid "" +"Raised when the result of an arithmetic operation is too large to be " +"represented. This cannot occur for integers (which would rather raise " +":exc:`MemoryError` than give up). However, for historical reasons, " +"OverflowError is sometimes raised for integers that are outside a required " +"range. Because of the lack of standardization of floating-point exception " +"handling in C, most floating-point operations are not checked." +msgstr "" +"算術演算の結果が表現できない大きな値になった場合に送出されます。これは整数では起こりません (むしろ :exc:`MemoryError` " +"が送出されることになるでしょう)。しかし、歴史的な理由のため、要求された範囲の外の整数に対して OverflowError " +"が送出されることがあります。C の浮動小数点演算の例外処理は標準化されていないので、ほとんどの浮動小数点演算もチェックされません。" + +#: ../../builtins/exceptions.rst:437 +msgid "" +"This exception is derived from :exc:`RuntimeError`. It is raised when an " +"operation is blocked during interpreter shutdown also known as :term:`Python" +" finalization `." +msgstr "" + +#: ../../builtins/exceptions.rst:441 +msgid "" +"Examples of operations which can be blocked with a " +":exc:`PythonFinalizationError` during the Python finalization:" +msgstr "" + +#: ../../builtins/exceptions.rst:444 +msgid "Creating a new Python thread." +msgstr "" + +#: ../../builtins/exceptions.rst:445 +msgid ":meth:`Joining ` a running daemon thread." +msgstr "" + +#: ../../builtins/exceptions.rst:446 +msgid ":func:`os.fork`," +msgstr "" + +#: ../../builtins/exceptions.rst:447 +msgid "" +"acquiring a lock such as :class:`threading.Lock`, when it is known that the " +"operation would otherwise deadlock." +msgstr "" + +#: ../../builtins/exceptions.rst:450 +msgid "See also the :func:`sys.is_finalizing` function." +msgstr ":func:`sys.is_finalizing` 関数も参照してください。" + +#: ../../builtins/exceptions.rst:452 ../../builtins/exceptions.rst:470 +msgid "Previously, a plain :exc:`RuntimeError` was raised." +msgstr "以前は :exc:`RuntimeError` をそのまま送出していました。" + +#: ../../builtins/exceptions.rst:457 +msgid ":meth:`threading.Thread.join` can now raise this exception." +msgstr "" + +#: ../../builtins/exceptions.rst:461 +msgid "" +"This exception may be raised when acquiring :meth:`threading.Lock` or " +":meth:`threading.RLock`." +msgstr "" + +#: ../../builtins/exceptions.rst:466 +msgid "" +"This exception is derived from :exc:`RuntimeError`. It is raised when the " +"interpreter detects that the maximum recursion depth (see " +":func:`sys.getrecursionlimit`) is exceeded." +msgstr "" +"この例外は :exc:`RuntimeError` を継承しています。インタープリタが最大再帰深度 " +"(:func:`sys.getrecursionlimit` を参照) の超過を検出すると送出されます。" + +#: ../../builtins/exceptions.rst:476 +msgid "" +"This exception is raised when a weak reference proxy, created by the " +":func:`weakref.proxy` function, is used to access an attribute of the " +"referent after it has been garbage collected. For more information on weak " +"references, see the :mod:`weakref` module." +msgstr "" +":func:`weakref.proxy` によって生成された弱参照 (weak reference) " +"プロキシを使って、ガーベジコレクションによって回収された後の参照対象オブジェクトの属性にアクセスした場合に送出されます。弱参照については " +":mod:`weakref` モジュールを参照してください。" + +#: ../../builtins/exceptions.rst:484 +msgid "" +"Raised when an error is detected that doesn't fall in any of the other " +"categories. The associated value is a string indicating what precisely went" +" wrong." +msgstr "他のカテゴリに分類できないエラーが検出された場合に送出されます。関連値は、何が問題だったのかをより詳細に示す文字列です。" + +#: ../../builtins/exceptions.rst:491 +msgid "" +"Raised by built-in function :func:`next` and an :term:`iterator`\\'s " +":meth:`~iterator.__next__` method to signal that there are no further items " +"produced by the iterator." +msgstr "" +"組込み関数 :func:`next` と :term:`iterator` の :meth:`~iterator.__next__` " +"メソッドによって、そのイテレータが生成するアイテムがこれ以上ないことを伝えるために送出されます。" + +#: ../../builtins/exceptions.rst:497 +msgid "" +"The exception object has a single attribute :attr:`!value`, which is given " +"as an argument when constructing the exception, and defaults to " +":const:`None`." +msgstr "" +"この例外オブジェクトには一つの属性 :attr:`!value` があり、例外を構成する際に引数として与えられ、デフォルトは :const:`None`" +" です。" + +#: ../../builtins/exceptions.rst:501 +msgid "" +"When a :term:`generator` or :term:`coroutine` function returns, a new " +":exc:`StopIteration` instance is raised, and the value returned by the " +"function is used as the :attr:`value` parameter to the constructor of the " +"exception." +msgstr "" +":term:`generator` や :term:`coroutine` 関数が返るとき、新しい :exc:`StopIteration` インスタンスが送出されます。\n" +"関数の返り値は例外のコンストラクタの :attr:`value` 引数として使われます。" + +#: ../../builtins/exceptions.rst:506 +msgid "" +"If a generator code directly or indirectly raises :exc:`StopIteration`, it " +"is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` " +"as the new exception's cause)." +msgstr "" +"ジェネレータのコードが直接的あるいは間接的に :exc:`StopIteration` を送出する場合は、 :exc:`RuntimeError` " +"に変換されます (:exc:`StopIteration` は変換後の例外の原因として保持されます)。" + +#: ../../builtins/exceptions.rst:510 +msgid "" +"Added ``value`` attribute and the ability for generator functions to use it " +"to return a value." +msgstr "``value`` 属性とジェネレータ関数が値を返すためにそれを使う機能が追加されました。" + +#: ../../builtins/exceptions.rst:514 +msgid "" +"Introduced the RuntimeError transformation via ``from __future__ import " +"generator_stop``, see :pep:`479`." +msgstr "" +"``from __future__ import generator_stop`` による RuntimeError への変換が導入されました。 " +":pep:`479` を参照してください。" + +#: ../../builtins/exceptions.rst:518 +msgid "" +"Enable :pep:`479` for all code by default: a :exc:`StopIteration` error " +"raised in a generator is transformed into a :exc:`RuntimeError`." +msgstr "" +":pep:`479` が全てのコードでデフォルトで有効化されました: ジェネレータから送出された :exc:`StopIteration` は " +":exc:`RuntimeError` に変換されます。" + +#: ../../builtins/exceptions.rst:524 +msgid "" +"Must be raised by :meth:`~object.__anext__` method of an :term:`asynchronous" +" iterator` object to stop the iteration." +msgstr "" +"イテレーションを停止するために、 :term:`asynchronous iterator` オブジェクトの " +":meth:`~object.__anext__` メソッドによって返される必要があります。" + +#: ../../builtins/exceptions.rst:531 +msgid "" +"Raised when the parser encounters a syntax error. This may occur in an " +":keyword:`import` statement, in a call to the built-in functions " +":func:`compile`, :func:`exec`, or :func:`eval`, or when reading the initial " +"script or standard input (also interactively)." +msgstr "" +"パーザが構文エラーに遭遇した場合に送出されます。この例外は :keyword:`import` 文、組み込み関数 " +":func:`compile`、:func:`exec` や :func:`eval` 、初期化スクリプトの読み込みや標準入力で (対話的な実行時にも)" +" 起こる可能性があります。" + +#: ../../builtins/exceptions.rst:537 +msgid "" +"The :func:`str` of the exception instance returns only the error message. " +"Details is a tuple whose members are also available as separate attributes." +msgstr "例外インスタンスの :func:`str` はエラーメッセージのみを返します。詳細はタプルで、個々の属性としても利用できます。" + +#: ../../builtins/exceptions.rst:542 +msgid "The name of the file the syntax error occurred in." +msgstr "構文エラーが発生したファイルの名前。" + +#: ../../builtins/exceptions.rst:546 +msgid "" +"Which line number in the file the error occurred in. This is 1-indexed: the " +"first line in the file has a ``lineno`` of 1." +msgstr "ファイルのエラーが発生した行番号。1から数えはじめるため、ファイルの最初の行の ``lineno`` は1です。" + +#: ../../builtins/exceptions.rst:551 +msgid "" +"The column in the line where the error occurred. This is 1-indexed: the " +"first character in the line has an ``offset`` of 1." +msgstr "行のエラーが発生した列番号。1から数えはじめるため、行の最初の文字の ``offset`` は1です。" + +#: ../../builtins/exceptions.rst:556 +msgid "The source code text involved in the error." +msgstr "エラーを含むソースコードのテキスト。" + +#: ../../builtins/exceptions.rst:560 +msgid "" +"Which line number in the file the error occurred ends in. This is 1-indexed:" +" the first line in the file has a ``lineno`` of 1." +msgstr "ファイルのエラーが発生した最後の行番号。1から数えはじめるため、ファイルの最初の行の ``lineno`` は1です。" + +#: ../../builtins/exceptions.rst:565 +msgid "" +"The column in the end line where the error occurred finishes. This is " +"1-indexed: the first character in the line has an ``offset`` of 1." +msgstr "行のエラーが発生した最後の列番号。1から数えはじめるため、行の最初の文字の ``offset`` は1です。" + +#: ../../builtins/exceptions.rst:568 +msgid "" +"For errors in f-string fields, the message is prefixed by \"f-string: \" and" +" the offsets are offsets in a text constructed from the replacement " +"expression. For example, compiling f'Bad {a b} field' results in this args " +"attribute: ('f-string: ...', ('', 1, 2, '(a b)\\n', 1, 5))." +msgstr "" + +#: ../../builtins/exceptions.rst:573 +msgid "Added the :attr:`end_lineno` and :attr:`end_offset` attributes." +msgstr ":attr:`end_lineno` および :attr:`end_offset` 属性が追加されました。" + +#: ../../builtins/exceptions.rst:578 +msgid "" +"Base class for syntax errors related to incorrect indentation. This is a " +"subclass of :exc:`SyntaxError`." +msgstr "正しくないインデントに関する構文エラーの基底クラスです。これは :exc:`SyntaxError` のサブクラスです。" + +#: ../../builtins/exceptions.rst:584 +msgid "" +"Raised when indentation contains an inconsistent use of tabs and spaces. " +"This is a subclass of :exc:`IndentationError`." +msgstr "" +"タブとスペースを一貫しない方法でインデントに使っているときに送出されます。これは :exc:`IndentationError` のサブクラスです。" + +#: ../../builtins/exceptions.rst:590 +msgid "" +"Raised when the interpreter finds an internal error, but the situation does " +"not look so serious to cause it to abandon all hope. The associated value is" +" a string indicating what went wrong (in low-level terms). In " +":term:`CPython`, this could be raised by incorrectly using Python's C API, " +"such as returning a ``NULL`` value without an exception set." +msgstr "" + +#: ../../builtins/exceptions.rst:596 +msgid "" +"If you're confident that this exception wasn't your fault, or the fault of a" +" package you're using, you should report this to the author or maintainer of" +" your Python interpreter. Be sure to report the version of the Python " +"interpreter (``sys.version``; it is also printed at the start of an " +"interactive Python session), the exact error message (the exception's " +"associated value) and if possible the source of the program that triggered " +"the error." +msgstr "" + +#: ../../builtins/exceptions.rst:607 +msgid "" +"This exception is raised by the :func:`sys.exit` function. It inherits from" +" :exc:`BaseException` instead of :exc:`Exception` so that it is not " +"accidentally caught by code that catches :exc:`Exception`. This allows the " +"exception to properly propagate up and cause the interpreter to exit. When " +"it is not handled, the Python interpreter exits; no stack traceback is " +"printed. The constructor accepts the same optional argument passed to " +":func:`sys.exit`. If the value is an integer, it specifies the system exit " +"status (passed to C's :c:func:`!exit` function); if it is ``None``, the exit" +" status is zero; if it has another type (such as a string), the object's " +"value is printed and the exit status is one." +msgstr "" + +#: ../../builtins/exceptions.rst:618 +msgid "" +"A call to :func:`sys.exit` is translated into an exception so that clean-up " +"handlers (:keyword:`finally` clauses of :keyword:`try` statements) can be " +"executed, and so that a debugger can execute a script without running the " +"risk of losing control. The :func:`os._exit` function can be used if it is " +"absolutely positively necessary to exit immediately (for example, in the " +"child process after a call to :func:`os.fork`)." +msgstr "" +":func:`sys.exit` は、クリーンアップのための処理 (:keyword:`try` 文の :keyword:`finally` 節) " +"が実行されるようにするため、またデバッガが制御不能になるリスクを冒さずにスクリプトを実行できるようにするために例外に変換されます。即座に終了することが真に強く必要であるとき" +" (例えば、:func:`os.fork` を呼んだ後の子プロセス内) には :func:`os._exit` 関数を使うことができます。" + +#: ../../builtins/exceptions.rst:627 +msgid "" +"The exit status or error message that is passed to the constructor. " +"(Defaults to ``None``.)" +msgstr "コンストラクタに渡された終了ステータス又はエラーメッセージ。(デフォルトは ``None``)" + +#: ../../builtins/exceptions.rst:633 +msgid "" +"Raised when an operation or function is applied to an object of " +"inappropriate type. The associated value is a string giving details about " +"the type mismatch." +msgstr "組み込み演算または関数が適切でない型のオブジェクトに対して適用された際に送出されます。関連値は型の不整合に関して詳細を述べた文字列です。" + +#: ../../builtins/exceptions.rst:636 +msgid "" +"This exception may be raised by user code to indicate that an attempted " +"operation on an object is not supported, and is not meant to be. If an " +"object is meant to support a given operation but has not yet provided an " +"implementation, :exc:`NotImplementedError` is the proper exception to raise." +msgstr "" +"この例外は、そのオブジェクトで実行しようとした操作がサポートされておらず、その予定もない場合にユーザーコードから送出されるかもしれません。オブジェクトでその操作をサポートするつもりだが、まだ実装を提供していないのであれば、送出する適切な例外は" +" :exc:`NotImplementedError` です。" + +#: ../../builtins/exceptions.rst:641 +msgid "" +"Passing arguments of the wrong type (e.g. passing a :class:`list` when an " +":class:`int` is expected) should result in a :exc:`TypeError`, but passing " +"arguments with the wrong value (e.g. a number outside expected boundaries) " +"should result in a :exc:`ValueError`." +msgstr "" +"誤った型の引数が渡された場合は (例えば、:class:`int` が期待されるのに、:class:`list` が渡された) " +":exc:`TypeError` となるべきです。しかし、誤った値(例えば、期待する範囲外の数)が引数として渡された場合は、 " +":exc:`ValueError` となるべきです。" + +#: ../../builtins/exceptions.rst:648 +msgid "" +"Raised when a reference is made to a local variable in a function or method," +" but no value has been bound to that variable. This is a subclass of " +":exc:`NameError`." +msgstr "" +"関数やメソッド内のローカルな変数に対して参照を行ったが、その変数には値が代入されていなかった場合に送出されます。 :exc:`NameError` " +"のサブクラスです。" + +#: ../../builtins/exceptions.rst:655 +msgid "" +"Raised when a Unicode-related encoding or decoding error occurs. It is a " +"subclass of :exc:`ValueError`." +msgstr "" +"Unicode に関するエンコードまたはデコードのエラーが発生した際に送出されます。 :exc:`ValueError` のサブクラスです。" + +#: ../../builtins/exceptions.rst:658 +msgid "" +":exc:`UnicodeError` has attributes that describe the encoding or decoding " +"error. For example, ``err.object[err.start:err.end]`` gives the particular " +"invalid input that the codec failed on." +msgstr "" +":exc:`UnicodeError` はエンコードまたはデコードのエラーの説明を属性として持っています。例えば、 " +"``err.object[err.start:err.end]`` は、無効な入力のうちコーデックが処理に失敗した箇所を表します。" + +#: ../../builtins/exceptions.rst:664 +msgid "The name of the encoding that raised the error." +msgstr "エラーを送出したエンコーディングの名前です。" + +#: ../../builtins/exceptions.rst:668 +msgid "A string describing the specific codec error." +msgstr "そのコーデックエラーを説明する文字列です。" + +#: ../../builtins/exceptions.rst:672 +msgid "The object the codec was attempting to encode or decode." +msgstr "コーデックがエンコードまたはデコードしようとしたオブジェクトです。" + +#: ../../builtins/exceptions.rst:676 +msgid "The first index of invalid data in :attr:`object`." +msgstr ":attr:`object` の最初の無効なデータのインデクスです。" + +#: ../../builtins/exceptions.rst:678 ../../builtins/exceptions.rst:685 +msgid "" +"This value should not be negative as it is interpreted as an absolute offset" +" but this constraint is not enforced at runtime." +msgstr "" + +#: ../../builtins/exceptions.rst:683 +msgid "The index after the last invalid data in :attr:`object`." +msgstr ":attr:`object` の最後の無効なデータの次のインデクスです。" + +#: ../../builtins/exceptions.rst:691 +msgid "" +"Raised when a Unicode-related error occurs during encoding. It is a " +"subclass of :exc:`UnicodeError`." +msgstr "Unicode 関連のエラーがエンコード中に発生した際に送出されます。 :exc:`UnicodeError` のサブクラスです。" + +#: ../../builtins/exceptions.rst:697 +msgid "" +"Raised when a Unicode-related error occurs during decoding. It is a " +"subclass of :exc:`UnicodeError`." +msgstr "Unicode 関連のエラーがデコード中に発生した際に送出されます。 :exc:`UnicodeError` のサブクラスです。" + +#: ../../builtins/exceptions.rst:703 +msgid "" +"Raised when a Unicode-related error occurs during translating. It is a " +"subclass of :exc:`UnicodeError`." +msgstr "Unicode 関連のエラーが変換中に発生した際に送出されます。 :exc:`UnicodeError` のサブクラスです。" + +#: ../../builtins/exceptions.rst:709 +msgid "" +"Raised when an operation or function receives an argument that has the right" +" type but an inappropriate value, and the situation is not described by a " +"more precise exception such as :exc:`IndexError`." +msgstr "" +"演算子や関数が、正しい型だが適切でない値を持つ引数を受け取ったときや、 :exc:`IndexError` " +"のようなより詳細な例外では記述できない状況で送出されます。" + +#: ../../builtins/exceptions.rst:716 +msgid "" +"Raised when the second argument of a division or modulo operation is zero. " +"The associated value is a string indicating the type of the operands and the" +" operation." +msgstr "除算や剰余演算の第二引数が 0 であった場合に送出されます。関連値は文字列で、その演算における被演算子と演算子の型を示します。" + +#: ../../builtins/exceptions.rst:721 +msgid "" +"The following exceptions are kept for compatibility with previous versions; " +"starting from Python 3.3, they are aliases of :exc:`OSError`." +msgstr "" +"以下の例外は、過去のバージョンとの後方互換性のために残されています; Python 3.3 より、これらは :exc:`OSError` " +"のエイリアスです。" + +#: ../../builtins/exceptions.rst:730 +msgid "Only available on Windows." +msgstr "Windows でのみ利用できます。" + +#: ../../builtins/exceptions.rst:734 +msgid "OS exceptions" +msgstr "OS 例外" + +#: ../../builtins/exceptions.rst:736 +msgid "" +"The following exceptions are subclasses of :exc:`OSError`, they get raised " +"depending on the system error code." +msgstr "以下の例外は :exc:`OSError` のサブクラスで、システムエラーコードに依存して送出されます。" + +#: ../../builtins/exceptions.rst:741 +msgid "" +"Raised when an operation would block on an object (e.g. socket) set for non-" +"blocking operation. Corresponds to :c:data:`errno` " +":py:const:`~errno.EAGAIN`, :py:const:`~errno.EALREADY`, " +":py:const:`~errno.EWOULDBLOCK` and :py:const:`~errno.EINPROGRESS`." +msgstr "" +"ある操作が、ノンブロッキング操作に設定されたオブジェクト (例えばソケット) をブロックしそうになった場合に送出されます。:c:data:`errno`" +" :py:const:`~errno.EAGAIN`, :py:const:`~errno.EALREADY`, " +":py:const:`~errno.EWOULDBLOCK` および :py:const:`~errno.EINPROGRESS` に対応します。" + +#: ../../builtins/exceptions.rst:746 +msgid "" +"In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can have one " +"more attribute:" +msgstr ":exc:`BlockingIOError` は、 :exc:`OSError` の属性に加えて一つの属性を持ちます:" + +#: ../../builtins/exceptions.rst:751 +msgid "" +"An integer containing the number of **bytes** written to the stream before " +"it blocked. This attribute is available when using the buffered I/O classes " +"from the :mod:`io` module." +msgstr "" + +#: ../../builtins/exceptions.rst:757 +msgid "" +"Raised when an operation on a child process failed. Corresponds to " +":c:data:`errno` :py:const:`~errno.ECHILD`." +msgstr "" +"子プロセスの操作が失敗した場合に送出されます。:c:data:`errno` :py:const:`~errno.ECHILD` に対応します。" + +#: ../../builtins/exceptions.rst:762 +msgid "A base class for connection-related issues." +msgstr "コネクション関係の問題の基底クラス。" + +#: ../../builtins/exceptions.rst:764 +msgid "" +"Subclasses are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, " +":exc:`ConnectionRefusedError` and :exc:`ConnectionResetError`." +msgstr "" +"サブクラスは :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, " +":exc:`ConnectionRefusedError`, :exc:`ConnectionResetError` です。" + +#: ../../builtins/exceptions.rst:769 +msgid "" +"A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " +"while the other end has been closed, or trying to write on a socket which " +"has been shutdown for writing. Corresponds to :c:data:`errno` " +":py:const:`~errno.EPIPE` and :py:const:`~errno.ESHUTDOWN`." +msgstr "" +":exc:`ConnectionError` " +"のサブクラスで、もう一方の端が閉じられたパイプに書き込こもうとするか、書き込みのためにシャットダウンされたソケットに書き込こもうとした場合に発生します。" +" :c:data:`errno` :py:const:`~errno.EPIPE` と :py:const:`~errno.ESHUTDOWN` " +"に対応します。" + +#: ../../builtins/exceptions.rst:776 +msgid "" +"A subclass of :exc:`ConnectionError`, raised when a connection attempt is " +"aborted by the peer. Corresponds to :c:data:`errno` " +":py:const:`~errno.ECONNABORTED`." +msgstr "" +":exc:`ConnectionError` のサブクラスで、接続の試行が通信相手によって中断された場合に発生します。 :c:data:`errno` " +":py:const:`~errno.ECONNABORTED` に対応します。" + +#: ../../builtins/exceptions.rst:782 +msgid "" +"A subclass of :exc:`ConnectionError`, raised when a connection attempt is " +"refused by the peer. Corresponds to :c:data:`errno` " +":py:const:`~errno.ECONNREFUSED`." +msgstr "" +":exc:`ConnectionError` のサブクラスで、接続の試行が通信相手によって拒否された場合に発生します。 :c:data:`errno` " +":py:const:`~errno.ECONNREFUSED` に対応します。" + +#: ../../builtins/exceptions.rst:788 +msgid "" +"A subclass of :exc:`ConnectionError`, raised when a connection is reset by " +"the peer. Corresponds to :c:data:`errno` :py:const:`~errno.ECONNRESET`." +msgstr "" +":exc:`ConnectionError` のサブクラスで、接続が通信相手によってリセットされた場合に発生します。 :c:data:`errno` " +":py:const:`~errno.ECONNRESET` に対応します。" + +#: ../../builtins/exceptions.rst:794 +msgid "" +"Raised when trying to create a file or directory which already exists. " +"Corresponds to :c:data:`errno` :py:const:`~errno.EEXIST`." +msgstr "" +"すでに存在するファイルやディレクトリを作成しようとした場合に送出されます。:c:data:`errno` " +":py:const:`~errno.EEXIST` に対応します。" + +#: ../../builtins/exceptions.rst:799 +msgid "" +"Raised when a file or directory is requested but doesn't exist. Corresponds " +"to :c:data:`errno` :py:const:`~errno.ENOENT`." +msgstr "" +"要求されたファイルやディレクトリが存在しない場合に送出されます。:c:data:`errno` :py:const:`~errno.ENOENT` " +"に対応します。" + +#: ../../builtins/exceptions.rst:804 +msgid "" +"Raised when a system call is interrupted by an incoming signal. Corresponds " +"to :c:data:`errno` :py:const:`~errno.EINTR`." +msgstr "" +"システムコールが入力信号によって中断された場合に送出されます。:c:data:`errno` :py:const:`~errno.EINTR` " +"に対応します。" + +#: ../../builtins/exceptions.rst:807 +msgid "" +"Python now retries system calls when a syscall is interrupted by a signal, " +"except if the signal handler raises an exception (see :pep:`475` for the " +"rationale), instead of raising :exc:`InterruptedError`." +msgstr "" +"シグナルハンドラが例外を送出せず、システムコールが信号で中断された場合\n" +"Python は :exc:`InterruptedError` を送出する代わりにシステムコールを再試行するようになりました (論拠については :pep:`475` を参照してください) 。" + +#: ../../builtins/exceptions.rst:814 +msgid "" +"Raised when a file operation (such as :func:`os.remove`) is requested on a " +"directory. Corresponds to :c:data:`errno` :py:const:`~errno.EISDIR`." +msgstr "" +"ディレクトリに (:func:`os.remove` などの) ファイル操作が要求された場合に送出されます。:c:data:`errno` " +":py:const:`~errno.EISDIR` に対応します。" + +#: ../../builtins/exceptions.rst:820 +msgid "" +"Raised when a directory operation (such as :func:`os.listdir`) is requested " +"on something which is not a directory. On most POSIX platforms, it may also" +" be raised if an operation attempts to open or traverse a non-directory file" +" as if it were a directory. Corresponds to :c:data:`errno` " +":py:const:`~errno.ENOTDIR`." +msgstr "" +"ディレクトリへの操作(たとえば " +":func:`os.listdir`)をディレクトリ以外に対して要求された場合に送出されます。多くのPOSIXプラットフォームではディレクトリではないファイルをディレクトリとして開いたり移動するときにも発生する場合があります。:c:data:`errno`" +" :py:const:`~errno.ENOTDIR` に対応します。" + +#: ../../builtins/exceptions.rst:828 +msgid "" +"Raised when trying to run an operation without the adequate access rights - " +"for example filesystem permissions. Corresponds to :c:data:`errno` " +":py:const:`~errno.EACCES`, :py:const:`~errno.EPERM`, and " +":py:const:`~errno.ENOTCAPABLE`." +msgstr "" +"十分なアクセス権、例えばファイルシステム権限のない操作が試みられた場合に送出されます。:c:data:`errno` " +":py:const:`~errno.EACCES`、:py:const:`~errno.EPERM` および " +":py:const:`~errno.ENOTCAPABLE` に対応します。" + +#: ../../builtins/exceptions.rst:833 +msgid "" +"WASI's :py:const:`~errno.ENOTCAPABLE` is now mapped to " +":exc:`PermissionError`." +msgstr "" +"WASIの :py:const:`~errno.ENOTCAPABLE` は :exc:`PermissionError` にマップされました。" + +#: ../../builtins/exceptions.rst:839 +msgid "" +"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` " +":py:const:`~errno.ESRCH`." +msgstr "" +"与えられたプロセスが存在しない場合に送出されます。:c:data:`errno` :py:const:`~errno.ESRCH` に対応します。" + +#: ../../builtins/exceptions.rst:844 +msgid "" +"Raised when a system function timed out at the system level. Corresponds to " +":c:data:`errno` :py:const:`~errno.ETIMEDOUT`." +msgstr "" +"システム関数がシステムレベルでタイムアウトした場合に送出されます。:c:data:`errno` " +":py:const:`~errno.ETIMEDOUT` に対応します。" + +#: ../../builtins/exceptions.rst:847 +msgid "All the above :exc:`OSError` subclasses were added." +msgstr "上記のすべての :exc:`OSError` サブクラスが追加されました。" + +#: ../../builtins/exceptions.rst:853 +msgid ":pep:`3151` - Reworking the OS and IO exception hierarchy" +msgstr ":pep:`3151` - OS および IO 例外階層の手直し" + +#: ../../builtins/exceptions.rst:859 +msgid "Warnings" +msgstr "警告" + +#: ../../builtins/exceptions.rst:861 +msgid "" +"The following exceptions are used as warning categories; see the " +":ref:`warning-categories` documentation for more details." +msgstr "" +"次の例外は警告カテゴリとして使われます。詳細については :ref:`warning-categories` のドキュメントを参照してください。" + +#: ../../builtins/exceptions.rst:866 +msgid "Base class for warning categories." +msgstr "警告カテゴリの基底クラスです。" + +#: ../../builtins/exceptions.rst:871 +msgid "Base class for warnings generated by user code." +msgstr "ユーザコードによって生成される警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:876 +msgid "" +"Base class for warnings about deprecated features when those warnings are " +"intended for other Python developers." +msgstr "他の Python 開発者へ向けて警告を発するときの、廃止予定の機能についての警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:879 +msgid "" +"Ignored by the default warning filters, except in the ``__main__`` module " +"(:pep:`565`). Enabling the :ref:`Python Development Mode ` shows " +"this warning." +msgstr "" +"``__main__`` モジュールを除いて(:pep:`565`)、デフォルトの警告フィルターで無効化されています。:ref:`Python " +"Development Mode ` を有効にするとこの警告が表示されます。" + +#: ../../builtins/exceptions.rst:883 ../../builtins/exceptions.rst:899 +msgid "The deprecation policy is described in :pep:`387`." +msgstr "" + +#: ../../builtins/exceptions.rst:888 +msgid "" +"Base class for warnings about features which are obsolete and expected to be" +" deprecated in the future, but are not deprecated at the moment." +msgstr "古くなって将来的に廃止される予定だが、今のところは廃止されていない機能についての警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:892 +msgid "" +"This class is rarely used as emitting a warning about a possible upcoming " +"deprecation is unusual, and :exc:`DeprecationWarning` is preferred for " +"already active deprecations." +msgstr "" +"近々起こる可能性のある機能廃止について警告を発することはまれなので、このクラスはめったに使われず、既に決まっている廃止については " +":exc:`DeprecationWarning` が望ましいです。" + +#: ../../builtins/exceptions.rst:896 ../../builtins/exceptions.rst:925 +#: ../../builtins/exceptions.rst:952 +msgid "" +"Ignored by the default warning filters. Enabling the :ref:`Python " +"Development Mode ` shows this warning." +msgstr "" +"デフォルトの警告フィルターで無効化されています。:ref:`Python Development Mode ` " +"を有効にするとこの警告が表示されます。" + +#: ../../builtins/exceptions.rst:904 +msgid "Base class for warnings about dubious syntax." +msgstr "曖昧な構文に対する警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:906 +msgid "" +"This warning is typically emitted when compiling Python source code, and " +"usually won't be reported when running already compiled code." +msgstr "" + +#: ../../builtins/exceptions.rst:912 +msgid "Base class for warnings about dubious runtime behavior." +msgstr "あいまいなランタイム挙動に対する警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:917 +msgid "" +"Base class for warnings about deprecated features when those warnings are " +"intended for end users of applications that are written in Python." +msgstr "Python で書かれたアプリケーションのエンドユーザーへ向けて警告を発するときの、廃止予定の機能についての警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:923 +msgid "Base class for warnings about probable mistakes in module imports." +msgstr "モジュールインポートの誤りと思われるものに対する警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:931 +msgid "Base class for warnings related to Unicode." +msgstr "Unicode に関連した警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:936 +msgid "Base class for warnings related to encodings." +msgstr "エンコーディングに関連した警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:938 +msgid "See :ref:`io-encoding-warning` for details." +msgstr "詳細は :ref:`io-encoding-warning` を参照してください。" + +#: ../../builtins/exceptions.rst:945 +msgid "" +"Base class for warnings related to :class:`bytes` and :class:`bytearray`." +msgstr ":class:`bytes` や :class:`bytearray` に関連した警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:950 +msgid "Base class for warnings related to resource usage." +msgstr "リソースの使用に関連した警告の基底クラスです。" + +#: ../../builtins/exceptions.rst:961 +msgid "Exception groups" +msgstr "例外グループ" + +#: ../../builtins/exceptions.rst:963 +msgid "" +"The following are used when it is necessary to raise multiple unrelated " +"exceptions. They are part of the exception hierarchy so they can be handled " +"with :keyword:`except` like all other exceptions. In addition, they are " +"recognised by :keyword:`except*`, which matches their subgroups" +" based on the types of the contained exceptions." +msgstr "" +"以下は関係がない複数の例外を送出する必要があるときに使用します。例外グループは例外の階層構造の一部のため、他の例外と同様 " +":keyword:`except` で処理できます。また、:keyword:`except*` " +"によって判別でき、例外グループに含まれている例外の型に基づいてサブグループにマッチします。" + +#: ../../builtins/exceptions.rst:972 +msgid "" +"Both of these exception types wrap the exceptions in the sequence ``excs``. " +"The ``msg`` parameter must be a string. The difference between the two " +"classes is that :exc:`BaseExceptionGroup` extends :exc:`BaseException` and " +"it can wrap any exception, while :exc:`ExceptionGroup` extends " +":exc:`Exception` and it can only wrap subclasses of :exc:`Exception`. This " +"design is so that ``except Exception`` catches an :exc:`ExceptionGroup` but " +"not :exc:`BaseExceptionGroup`." +msgstr "" +"この2つの例外型は一連の例外 ``excs`` を包含します。``msg`` " +"引数は文字列の必要があります。2つのクラスの異なる点は、:exc:`BaseException` は :exc:`BaseExceptionGroup`" +" を拡張して任意の例外を含められますが、:exc:`ExceptionGroup` は :exc:`Exception` を拡張して " +":exc:`Exception` のサブクラスのみを含められます。この設計により ``except Exception`` は " +":exc:`ExceptionGroup` をキャッチしますが、:exc:`BaseExceptionGroup` はキャッチしません。" + +#: ../../builtins/exceptions.rst:980 +msgid "" +"The :exc:`BaseExceptionGroup` constructor returns an :exc:`ExceptionGroup` " +"rather than a :exc:`BaseExceptionGroup` if all contained exceptions are " +":exc:`Exception` instances, so it can be used to make the selection " +"automatic. The :exc:`ExceptionGroup` constructor, on the other hand, raises " +"a :exc:`TypeError` if any contained exception is not an :exc:`Exception` " +"subclass." +msgstr "" +":exc:`BaseExceptionGroup` のコンストラクターは含まれる例外がすべて :exc:`Exception` の場合は " +":exc:`BaseExceptionGroup` ではなく :exc:`ExceptionGroup` を返すように自動的に選択されます。一方 " +":exc:`ExceptionGroup` コンストラクタは、:exc:`Exception` サブクラス以外の例外を含む場合は " +":exc:`TypeError` を送出します。" + +#: ../../builtins/exceptions.rst:987 +msgid "" +"Exception groups are :ref:`generic ` over the type of their " +"contained exceptions." +msgstr "" + +#: ../../builtins/exceptions.rst:992 +msgid "" +"The ``excs`` parameter may be any sequence, but lists and tuples are " +"specifically processed more efficiently here. For optimal performance, pass " +"a tuple as ``excs``." +msgstr "" + +#: ../../builtins/exceptions.rst:998 +msgid "" +"The ``msg`` argument to the constructor. This is a read-only attribute." +msgstr "コンストラクタの ``msg`` 引数。この属性は読み込み専用です。" + +#: ../../builtins/exceptions.rst:1002 +msgid "" +"A tuple of the exceptions in the ``excs`` sequence given to the constructor." +" This is a read-only attribute." +msgstr "コンストラクタに渡された一連の ``excs`` に含まれる例外のタプルです。この属性は読み込み専用です。" + +#: ../../builtins/exceptions.rst:1007 +msgid "" +"Returns an exception group that contains only the exceptions from the " +"current group that match *condition*, or ``None`` if the result is empty." +msgstr "現在のグループで *条件* にマッチする礼儀のみを含む例外グループを返します。結果が空の場合は ``None`` を返します。" + +#: ../../builtins/exceptions.rst:1010 +msgid "" +"The condition can be an exception type or tuple of exception types, in which" +" case each exception is checked for a match using the same check that is " +"used in an ``except`` clause. The condition can also be a callable (other " +"than a type object) that accepts an exception as its single argument and " +"returns true for the exceptions that should be in the subgroup." +msgstr "" + +#: ../../builtins/exceptions.rst:1016 +msgid "" +"The nesting structure of the current exception is preserved in the result, " +"as are the values of its :attr:`message`, " +":attr:`~BaseException.__traceback__`, :attr:`~BaseException.__cause__`, " +":attr:`~BaseException.__context__` and :attr:`~BaseException.__notes__` " +"fields. Empty nested groups are omitted from the result." +msgstr "" + +#: ../../builtins/exceptions.rst:1023 +msgid "" +"The condition is checked for all exceptions in the nested exception group, " +"including the top-level and any nested exception groups. If the condition is" +" true for such an exception group, it is included in the result in full." +msgstr "" + +#: ../../builtins/exceptions.rst:1027 +msgid "``condition`` can be any callable which is not a type object." +msgstr "" + +#: ../../builtins/exceptions.rst:1032 +msgid "" +"Like :meth:`subgroup`, but returns the pair ``(match, rest)`` where " +"``match`` is ``subgroup(condition)`` and ``rest`` is the remaining non-" +"matching part." +msgstr "" +":meth:`subgroup` と似てますが ``(match, rest)`` のペアを返します。``match`` は " +"``subgroup(condition)`` で ``rest`` は残りのマッチしない部分です。" + +#: ../../builtins/exceptions.rst:1038 +msgid "" +"Returns an exception group with the same :attr:`message`, but which wraps " +"the exceptions in ``excs``." +msgstr "同じ :attr:`message` の例外グループを返しますが、``excs`` の例外を含んでいます。" + +#: ../../builtins/exceptions.rst:1041 +msgid "" +"This method is used by :meth:`subgroup` and :meth:`split`, which are used in" +" various contexts to break up an exception group. A subclass needs to " +"override it in order to make :meth:`subgroup` and :meth:`split` return " +"instances of the subclass rather than :exc:`ExceptionGroup`." +msgstr "" + +#: ../../builtins/exceptions.rst:1047 +msgid "" +":meth:`subgroup` and :meth:`split` copy the " +":attr:`~BaseException.__traceback__`, :attr:`~BaseException.__cause__`, " +":attr:`~BaseException.__context__` and :attr:`~BaseException.__notes__` " +"fields from the original exception group to the one returned by " +":meth:`derive`, so these fields do not need to be updated by :meth:`derive`." +msgstr "" +":meth:`subgroup` と :meth:`split` は " +":attr:`~BaseException.__traceback__`、:attr:`~BaseException.__cause__`、:attr:`~BaseException.__context__`" +" と :attr:`~BaseException.__notes__` フィールドを元の例外グループから :meth:`derive` " +"が返す例外グループにコピーするため、:meth:`derive` ではこれらのフィールドを更新する必要がありません。" + +#: ../../builtins/exceptions.rst:1054 +msgid "" +">>> class MyGroup(ExceptionGroup):\n" +"... def derive(self, excs):\n" +"... return MyGroup(self.message, excs)\n" +"...\n" +">>> e = MyGroup(\"eg\", [ValueError(1), TypeError(2)])\n" +">>> e.add_note(\"a note\")\n" +">>> e.__context__ = Exception(\"context\")\n" +">>> e.__cause__ = Exception(\"cause\")\n" +">>> try:\n" +"... raise e\n" +"... except Exception as e:\n" +"... exc = e\n" +"...\n" +">>> match, rest = exc.split(ValueError)\n" +">>> exc, exc.__context__, exc.__cause__, exc.__notes__\n" +"(MyGroup('eg', [ValueError(1), TypeError(2)]), Exception('context'), Exception('cause'), ['a note'])\n" +">>> match, match.__context__, match.__cause__, match.__notes__\n" +"(MyGroup('eg', [ValueError(1)]), Exception('context'), Exception('cause'), ['a note'])\n" +">>> rest, rest.__context__, rest.__cause__, rest.__notes__\n" +"(MyGroup('eg', [TypeError(2)]), Exception('context'), Exception('cause'), ['a note'])\n" +">>> exc.__traceback__ is match.__traceback__ is rest.__traceback__\n" +"True" +msgstr "" + +#: ../../builtins/exceptions.rst:1080 +msgid "" +"Note that :exc:`BaseExceptionGroup` defines :meth:`~object.__new__`, so " +"subclasses that need a different constructor signature need to override that" +" rather than :meth:`~object.__init__`. For example, the following defines an" +" exception group subclass which accepts an exit_code and constructs the " +"group's message from it. ::" +msgstr "" + +#: ../../builtins/exceptions.rst:1086 +msgid "" +"class Errors(ExceptionGroup):\n" +" def __new__(cls, errors, exit_code):\n" +" self = super().__new__(Errors, f\"exit code: {exit_code}\", errors)\n" +" self.exit_code = exit_code\n" +" return self\n" +"\n" +" def derive(self, excs):\n" +" return Errors(excs, self.exit_code)" +msgstr "" + +#: ../../builtins/exceptions.rst:1095 +msgid "" +"Like :exc:`ExceptionGroup`, any subclass of :exc:`BaseExceptionGroup` which " +"is also a subclass of :exc:`Exception` can only wrap instances of " +":exc:`Exception`." +msgstr "" + +#: ../../builtins/exceptions.rst:1103 +msgid "Exception hierarchy" +msgstr "例外のクラス階層" + +#: ../../builtins/exceptions.rst:1105 +msgid "The class hierarchy for built-in exceptions is:" +msgstr "組み込み例外のクラス階層は以下のとおりです:" + +#: ../../builtins/exceptions.rst:1107 +msgid "" +"BaseException\n" +" ├── BaseExceptionGroup\n" +" ├── GeneratorExit\n" +" ├── KeyboardInterrupt\n" +" ├── SystemExit\n" +" └── Exception\n" +" ├── ArithmeticError\n" +" │ ├── FloatingPointError\n" +" │ ├── OverflowError\n" +" │ └── ZeroDivisionError\n" +" ├── AssertionError\n" +" ├── AttributeError\n" +" ├── BufferError\n" +" ├── EOFError\n" +" ├── ExceptionGroup [BaseExceptionGroup]\n" +" ├── ImportError\n" +" │ └── ImportCycleError\n" +" │ └── ModuleNotFoundError\n" +" ├── LookupError\n" +" │ ├── IndexError\n" +" │ └── KeyError\n" +" ├── MemoryError\n" +" ├── NameError\n" +" │ └── UnboundLocalError\n" +" ├── OSError\n" +" │ ├── BlockingIOError\n" +" │ ├── ChildProcessError\n" +" │ ├── ConnectionError\n" +" │ │ ├── BrokenPipeError\n" +" │ │ ├── ConnectionAbortedError\n" +" │ │ ├── ConnectionRefusedError\n" +" │ │ └── ConnectionResetError\n" +" │ ├── FileExistsError\n" +" │ ├── FileNotFoundError\n" +" │ ├── InterruptedError\n" +" │ ├── IsADirectoryError\n" +" │ ├── NotADirectoryError\n" +" │ ├── PermissionError\n" +" │ ├── ProcessLookupError\n" +" │ └── TimeoutError\n" +" ├── ReferenceError\n" +" ├── RuntimeError\n" +" │ ├── NotImplementedError\n" +" │ ├── PythonFinalizationError\n" +" │ └── RecursionError\n" +" ├── StopAsyncIteration\n" +" ├── StopIteration\n" +" ├── SyntaxError\n" +" │ └── IndentationError\n" +" │ └── TabError\n" +" ├── SystemError\n" +" ├── TypeError\n" +" ├── ValueError\n" +" │ └── UnicodeError\n" +" │ ├── UnicodeDecodeError\n" +" │ ├── UnicodeEncodeError\n" +" │ └── UnicodeTranslateError\n" +" └── Warning\n" +" ├── BytesWarning\n" +" ├── DeprecationWarning\n" +" ├── EncodingWarning\n" +" ├── FutureWarning\n" +" ├── ImportWarning\n" +" ├── PendingDeprecationWarning\n" +" ├── ResourceWarning\n" +" ├── RuntimeWarning\n" +" ├── SyntaxWarning\n" +" ├── UnicodeWarning\n" +" └── UserWarning\n" +msgstr "" + +#: ../../builtins/exceptions.rst:6 ../../builtins/exceptions.rst:17 +#: ../../builtins/exceptions.rst:196 +msgid "statement" +msgstr "statement" + +#: ../../builtins/exceptions.rst:6 +msgid "try" +msgstr "try" + +#: ../../builtins/exceptions.rst:6 +msgid "except" +msgstr "except" + +#: ../../builtins/exceptions.rst:17 +msgid "raise" +msgstr "raise" + +#: ../../builtins/exceptions.rst:41 +msgid "exception" +msgstr "例外" + +#: ../../builtins/exceptions.rst:41 +msgid "chaining" +msgstr "連鎖" + +#: ../../builtins/exceptions.rst:41 +msgid "__cause__ (exception attribute)" +msgstr "__cause__ (exception の属性)" + +#: ../../builtins/exceptions.rst:41 +msgid "__context__ (exception attribute)" +msgstr "__context__ (exception の属性)" + +#: ../../builtins/exceptions.rst:41 +msgid "__suppress_context__ (exception attribute)" +msgstr "__suppress_context__ (exception の属性)" + +#: ../../builtins/exceptions.rst:196 +msgid "assert" +msgstr "assert" + +#: ../../builtins/exceptions.rst:361 +msgid "module" +msgstr "module" + +#: ../../builtins/exceptions.rst:361 +msgid "errno" +msgstr "errno" diff --git a/builtins/functions.po b/builtins/functions.po new file mode 100644 index 000000000..9a588e5ee --- /dev/null +++ b/builtins/functions.po @@ -0,0 +1,4206 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# TENMYO Masakazu, 2026 +# Rafael Fontenelle , 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" +"PO-Revision-Date: 2026-09-13 17:09+0000\n" +"Last-Translator: Rafael Fontenelle , 2026\n" +"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../../builtins/functions.rst:5 ../../builtins/functions.rst:11 +msgid "Built-in Functions" +msgstr "組み込み関数" + +#: ../../builtins/functions.rst:7 +msgid "" +"The Python interpreter has a number of functions and types built into it " +"that are always available. They are listed here in alphabetical order." +msgstr "Python インタプリタには数多くの関数と型が組み込まれており、いつでも利用できます。それらをここにアルファベット順に挙げます。" + +#: ../../builtins/functions.rst:0 +msgid "**A**" +msgstr "**A**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`abs`" +msgstr ":func:`abs`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`aiter`" +msgstr ":func:`aiter`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`all`" +msgstr ":func:`all`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`anext`" +msgstr ":func:`anext`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`any`" +msgstr ":func:`any`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`ascii`" +msgstr ":func:`ascii`" + +#: ../../builtins/functions.rst:0 +msgid "**B**" +msgstr "**B**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`bin`" +msgstr ":func:`bin`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`bool`" +msgstr ":func:`bool`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`breakpoint`" +msgstr ":func:`breakpoint`" + +#: ../../builtins/functions.rst:0 +msgid "|func-bytearray|_" +msgstr "|func-bytearray|_" + +#: ../../builtins/functions.rst:0 +msgid "|func-bytes|_" +msgstr "|func-bytes|_" + +#: ../../builtins/functions.rst:0 +msgid "**C**" +msgstr "**C**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`callable`" +msgstr ":func:`callable`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`chr`" +msgstr ":func:`chr`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`classmethod`" +msgstr ":func:`classmethod`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`compile`" +msgstr ":func:`compile`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`complex`" +msgstr ":func:`complex`" + +#: ../../builtins/functions.rst:0 +msgid "**D**" +msgstr "**D**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`delattr`" +msgstr ":func:`delattr`" + +#: ../../builtins/functions.rst:0 +msgid "|func-dict|_" +msgstr "|func-dict|_" + +#: ../../builtins/functions.rst:0 +msgid ":func:`dir`" +msgstr ":func:`dir`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`divmod`" +msgstr ":func:`divmod`" + +#: ../../builtins/functions.rst:0 +msgid "**E**" +msgstr "**E**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`enumerate`" +msgstr ":func:`enumerate`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`eval`" +msgstr ":func:`eval`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`exec`" +msgstr ":func:`exec`" + +#: ../../builtins/functions.rst:0 +msgid "**F**" +msgstr "**F**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`filter`" +msgstr ":func:`filter`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`float`" +msgstr ":func:`float`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`format`" +msgstr ":func:`format`" + +#: ../../builtins/functions.rst:0 +msgid "|func-frozendict|_" +msgstr "|func-frozendict|_" + +#: ../../builtins/functions.rst:0 +msgid "|func-frozenset|_" +msgstr "|func-frozenset|_" + +#: ../../builtins/functions.rst:0 +msgid "**G**" +msgstr "**G**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`getattr`" +msgstr ":func:`getattr`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`globals`" +msgstr ":func:`globals`" + +#: ../../builtins/functions.rst:0 +msgid "**H**" +msgstr "**H**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`hasattr`" +msgstr ":func:`hasattr`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`hash`" +msgstr ":func:`hash`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`help`" +msgstr ":func:`help`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`hex`" +msgstr ":func:`hex`" + +#: ../../builtins/functions.rst:0 +msgid "**I**" +msgstr "**I**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`id`" +msgstr ":func:`id`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`input`" +msgstr ":func:`input`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`int`" +msgstr ":func:`int`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`isinstance`" +msgstr ":func:`isinstance`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`issubclass`" +msgstr ":func:`issubclass`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`iter`" +msgstr ":func:`iter`" + +#: ../../builtins/functions.rst:0 +msgid "**L**" +msgstr "**L**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`len`" +msgstr ":func:`len`" + +#: ../../builtins/functions.rst:0 +msgid "|func-list|_" +msgstr "|func-list|_" + +#: ../../builtins/functions.rst:0 +msgid ":func:`locals`" +msgstr ":func:`locals`" + +#: ../../builtins/functions.rst:0 +msgid "**M**" +msgstr "**M**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`map`" +msgstr ":func:`map`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`max`" +msgstr ":func:`max`" + +#: ../../builtins/functions.rst:0 +msgid "|func-memoryview|_" +msgstr "|func-memoryview|_" + +#: ../../builtins/functions.rst:0 +msgid ":func:`min`" +msgstr ":func:`min`" + +#: ../../builtins/functions.rst:0 +msgid "**N**" +msgstr "**N**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`next`" +msgstr ":func:`next`" + +#: ../../builtins/functions.rst:0 +msgid "**O**" +msgstr "**O**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`object`" +msgstr ":func:`object`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`oct`" +msgstr ":func:`oct`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`open`" +msgstr ":func:`open`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`ord`" +msgstr ":func:`ord`" + +#: ../../builtins/functions.rst:0 +msgid "**P**" +msgstr "**P**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`pow`" +msgstr ":func:`pow`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`print`" +msgstr ":func:`print`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`property`" +msgstr ":func:`property`" + +#: ../../builtins/functions.rst:0 +msgid "**R**" +msgstr "**R**" + +#: ../../builtins/functions.rst:0 +msgid "|func-range|_" +msgstr "|func-range|_" + +#: ../../builtins/functions.rst:0 +msgid ":func:`repr`" +msgstr ":func:`repr`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`reversed`" +msgstr ":func:`reversed`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`round`" +msgstr ":func:`round`" + +#: ../../builtins/functions.rst:0 +msgid "**S**" +msgstr "**S**" + +#: ../../builtins/functions.rst:0 +msgid "|func-set|_" +msgstr "|func-set|_" + +#: ../../builtins/functions.rst:0 +msgid ":func:`setattr`" +msgstr ":func:`setattr`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`sentinel`" +msgstr ":func:`sentinel`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`slice`" +msgstr ":func:`slice`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`sorted`" +msgstr ":func:`sorted`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`staticmethod`" +msgstr ":func:`staticmethod`" + +#: ../../builtins/functions.rst:0 +msgid "|func-str|_" +msgstr "|func-str|_" + +#: ../../builtins/functions.rst:0 +msgid ":func:`sum`" +msgstr ":func:`sum`" + +#: ../../builtins/functions.rst:0 +msgid ":func:`super`" +msgstr ":func:`super`" + +#: ../../builtins/functions.rst:0 +msgid "**T**" +msgstr "**T**" + +#: ../../builtins/functions.rst:0 +msgid "|func-tuple|_" +msgstr "|func-tuple|_" + +#: ../../builtins/functions.rst:0 +msgid ":func:`type`" +msgstr ":func:`type`" + +#: ../../builtins/functions.rst:0 +msgid "**V**" +msgstr "**V**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`vars`" +msgstr ":func:`vars`" + +#: ../../builtins/functions.rst:0 +msgid "**Z**" +msgstr "**Z**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`zip`" +msgstr ":func:`zip`" + +#: ../../builtins/functions.rst:0 +msgid "**_**" +msgstr "**_**" + +#: ../../builtins/functions.rst:0 +msgid ":func:`__import__`" +msgstr ":func:`__import__`" + +#: ../../builtins/functions.rst:61 +msgid "" +"Return the absolute value of a number. The argument may be an integer, a " +"floating-point number, or an object implementing :meth:`~object.__abs__`. If" +" the argument is a complex number, its magnitude is returned." +msgstr "" +"数の絶対値を返します。引数は整数、浮動小数点数または :meth:`~object.__abs__` " +"が実装されたオブジェクトです。引数が複素数なら、その絶対値 (magnitude) が返されます。" + +#: ../../builtins/functions.rst:69 +msgid "" +"Return an :term:`asynchronous iterator` for an :term:`asynchronous " +"iterable`. Equivalent to calling ``x.__aiter__()``." +msgstr "" +":term:`asynchronous iterable` から :term:`asynchronous iterator` を返します。 " +"``x.__aiter__()`` を呼び出すのと等価です。" + +#: ../../builtins/functions.rst:72 +msgid "Note: Unlike :func:`iter`, :func:`aiter` has no 2-argument variant." +msgstr "なお、 :func:`iter` とは異なり、 :func:`aiter` は第二引数を持ちません。" + +#: ../../builtins/functions.rst:78 +msgid "" +"Return ``True`` if all elements of the *iterable* are true (or if the " +"iterable is empty). Equivalent to::" +msgstr "" +"*iterable* の全ての要素が真ならば (もしくは *iterable* が空ならば) ``True`` を返します。以下のコードと等価です::" + +#: ../../builtins/functions.rst:81 +msgid "" +"def all(iterable):\n" +" for element in iterable:\n" +" if not element:\n" +" return False\n" +" return True" +msgstr "" +"def all(iterable):\n" +" for element in iterable:\n" +" if not element:\n" +" return False\n" +" return True" + +#: ../../builtins/functions.rst:91 +msgid "" +"When awaited, return the next item from the given :term:`asynchronous " +"iterator`, or *default* if given and the iterator is :term:`exhausted`." +msgstr "" + +#: ../../builtins/functions.rst:94 +msgid "" +"This is the async variant of the :func:`next` builtin, and behaves " +"similarly." +msgstr "これは組み込みの :func:`next` 関数の非同期版であり、同じように動作します。" + +#: ../../builtins/functions.rst:97 +msgid "" +"This calls the :meth:`~object.__anext__` method of *async_iterator*, " +"returning an :term:`awaitable`. Awaiting this returns the next value of the " +"iterator. If *default* is given, it is returned if the iterator is " +"exhausted, otherwise :exc:`StopAsyncIteration` is raised." +msgstr "" +"これは *async_iterator* の :meth:`~object.__anext__` メソッドを呼び出し、待ち受け可能オブジェクト " +"(:term:`awaitable`) を返します。待ち受けることによりイテレータの次の値を返します。 *default* " +"が与えられた場合、イテレータが枯渇したときにその値が返されます。 *default* が与えられない場合は " +":exc:`StopAsyncIteration` が送出されます。" + +#: ../../builtins/functions.rst:106 +msgid "" +"Return ``True`` if any element of the *iterable* is true. If the iterable " +"is empty, return ``False``. Equivalent to::" +msgstr "" +"*iterable* のいずれかの要素が真ならば ``True`` を返します。*iterable* が空なら ``False`` " +"を返します。以下のコードと等価です::" + +#: ../../builtins/functions.rst:109 +msgid "" +"def any(iterable):\n" +" for element in iterable:\n" +" if element:\n" +" return True\n" +" return False" +msgstr "" +"def any(iterable):\n" +" for element in iterable:\n" +" if element:\n" +" return True\n" +" return False" + +#: ../../builtins/functions.rst:118 +msgid "" +"As :func:`repr`, return a string containing a printable representation of an" +" object, but escape the non-ASCII characters in the string returned by " +":func:`repr` using ``\\x``, ``\\u``, or ``\\U`` escapes. This generates a " +"string similar to that returned by :func:`repr` in Python 2." +msgstr "" +":func:`repr` と同様、オブジェクトの印字可能な表現を含む文字列を返しますが、:func:`repr` によって返された文字列中の非 " +"ASCII 文字は ``\\x`` 、 ``\\u`` 、 ``\\U`` エスケープを使ってエスケープされます。これは Python 2 の " +":func:`repr` によって返されるのと同じ文字列を作ります。" + +#: ../../builtins/functions.rst:126 +msgid "" +"Convert an integer number to a binary string prefixed with \"0b\". The " +"result is a valid Python expression. If *integer* is not a Python " +":class:`int` object, it has to define an :meth:`~object.__index__` method " +"that returns an integer. Some examples:" +msgstr "" +"整数を先頭に \"0b\" が付いた 2 進文字列に変換します。\n" +"結果は Python の式としても使える形式になります。\n" +"*integer* が Python の :class:`int` オブジェクトでない場合、整数を返す :meth:`~object.__index__` メソッドが定義されていなければなりません。\n" +"いくつかの例を示します:" + +#: ../../builtins/functions.rst:136 +msgid "" +"If the prefix \"0b\" is desired or not, you can use either of the following " +"ways." +msgstr "先頭に \"0b\" が付いて欲しい、もしくは付いて欲しくない場合には、次の方法のどちらでも使えます。" + +#: ../../builtins/functions.rst:143 +msgid "" +"See also :func:`enum.bin` to represent negative values as twos-complement." +msgstr "負の数値を 2 の補数として表現するには、 :func:`enum.bin` も参照してください。" + +#: ../../builtins/functions.rst:145 ../../builtins/functions.rst:990 +#: ../../builtins/functions.rst:1374 +msgid "See also :func:`format` for more information." +msgstr "より詳しいことは :func:`format` も参照してください。" + +#: ../../builtins/functions.rst:150 +msgid "" +"Return a Boolean value, i.e. one of ``True`` or ``False``. The argument is " +"converted using the standard :ref:`truth testing procedure `. If the " +"argument is false or omitted, this returns ``False``; otherwise, it returns " +"``True``. The :class:`bool` class is a subclass of :class:`int` (see " +":ref:`typesnumeric`). It cannot be subclassed further. Its only instances " +"are ``False`` and ``True`` (see :ref:`typebool`)." +msgstr "" +"真偽値、すなわち ``True`` か ``False`` のいずれかを返します。引数は標準の :ref:`真偽値判定手続き ` " +"を用いて変換されます。引数が偽かまたは省略された場合、この関数は ``False`` を返します。それ以外の場合は ``True`` を返します。 " +":class:`bool` クラスは :class:`int` クラスの派生クラスです (:ref:`typesnumeric` " +"を参照してください)。このクラスからさらに派生することはできません。このクラスのインスタンスは ``False`` と ``True`` のみです " +"(:ref:`typebool` を参照してください)。" + +#: ../../builtins/functions.rst:160 ../../builtins/functions.rst:840 +msgid "The parameter is now positional-only." +msgstr "引数は位置専用になりました。" + +#: ../../builtins/functions.rst:165 +msgid "" +"This function drops you into the debugger at the call site. Specifically, " +"it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " +"through. By default, ``sys.breakpointhook()`` calls :func:`pdb.set_trace` " +"expecting no arguments. In this case, it is purely a convenience function " +"so you don't have to explicitly import :mod:`pdb` or type as much code to " +"enter the debugger. However, :func:`sys.breakpointhook` can be set to some " +"other function and :func:`breakpoint` will automatically call that, allowing" +" you to drop into the debugger of choice. If :func:`sys.breakpointhook` is " +"not accessible, this function will raise :exc:`RuntimeError`." +msgstr "" +"この関数は、呼び出された箇所にて処理をデバッガに移行します。具体的には、 :func:`sys.breakpointhook` を呼び出し、 " +"``args`` と ``kws`` をそのまま渡します。デフォルトでは、 ``sys.breakpointhook()`` は引数なしで " +":func:`pdb.set_trace` を呼び出すだけです。その場合、これは単なる便利関数でデバッガに入るために :mod:`pdb` " +"を明示的にインポートしたり多くのコードを書いたりせずに済むだけです。ですが、 :func:`sys.breakpointhook` " +"は別の関数に設定でき、 :func:`breakpoint` はそれを自動で呼び出すため、自分好みのデバッガに処理を移行させることができます。 " +":func:`sys.breakpointhook` にアクセスできない場合、この関数は :exc:`RuntimeError` を送出します。" + +#: ../../builtins/functions.rst:177 +msgid "" +"By default, the behavior of :func:`breakpoint` can be changed with the " +":envvar:`PYTHONBREAKPOINT` environment variable. See " +":func:`sys.breakpointhook` for usage details." +msgstr "" +"デフォルトでは、環境変数 :envvar:`PYTHONBREAKPOINT` をセットすることで :func:`breakpoint` の動作を変えることができます。\n" +"使い方の詳細は :func:`sys.breakpointhook` を参照してください。" + +#: ../../builtins/functions.rst:181 +msgid "" +"Note that this is not guaranteed if :func:`sys.breakpointhook` has been " +"replaced." +msgstr "" +"ただし、 :func:`sys.breakpointhook` " +"が別の関数で置き換えられている場合、上記の環境変数によって必ずしも動作を変えることができないことに注意してください。" + +#: ../../builtins/functions.rst:184 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " +"argument ``breakpointhook``." +msgstr "" +"引数 ``breakpointhook`` 付きで :ref:`監査イベント ` ``builtins.breakpoint`` " +"を送出します。" + +#: ../../builtins/functions.rst:193 +msgid "" +"Return a new array of bytes. The :class:`bytearray` class is a mutable " +"sequence of integers in the range 0 <= x < 256. It has most of the usual " +"methods of mutable sequences, described in :ref:`typesseq-mutable`, as well " +"as most methods that the :class:`bytes` type has, see :ref:`bytes-methods`." +msgstr "" +"新しいバイト配列を返します。:class:`bytearray` クラスは0 <= x < " +"256の範囲の整数からなる変更可能な配列です。:ref:`typesseq-mutable` " +"に記述されている変更可能な配列に対する普通のメソッドの大半を備えています。また、:class:`bytes` " +"型が持つメソッドの大半も備えています(see :ref:`bytes-methods`)。" + +#: ../../builtins/functions.rst:198 +msgid "" +"The optional *source* parameter can be used to initialize the array in a few" +" different ways:" +msgstr "オプションの *source* 引数は、配列を異なる方法で初期化するのに使われます:" + +#: ../../builtins/functions.rst:201 +msgid "" +"If it is a *string*, you must also give the *encoding* (and optionally, " +"*errors*) parameters; :func:`bytearray` then converts the string to bytes " +"using :meth:`str.encode`." +msgstr "" +"*文字列* の場合、 *encoding* (と、オプションの *errors*) 引数も与えなければなりません。このとき " +":func:`bytearray` は文字列を :meth:`str.encode` でバイトに変換して返します。" + +#: ../../builtins/functions.rst:205 +msgid "" +"If it is an *integer*, the array will have that size and will be initialized" +" with null bytes." +msgstr "*整数* の場合、配列はそのサイズになり、null バイトで初期化されます。" + +#: ../../builtins/functions.rst:208 +msgid "" +"If it is an object conforming to the :ref:`buffer interface " +"`, a read-only buffer of the object will be used to " +"initialize the bytes array." +msgstr "" +":ref:`バッファインターフェース ` " +"に適合するオブジェクトの場合、そのオブジェクトの読み出し専用バッファがバイト配列の初期化に使われます。" + +#: ../../builtins/functions.rst:211 +msgid "" +"If it is an *iterable*, it must be an iterable of integers in the range ``0 " +"<= x < 256``, which are used as the initial contents of the array." +msgstr "" +"*イテラブル* の場合、範囲 ``0 <= x < 256`` 内の整数のイテラブルでなければならず、それらが配列の初期の内容として使われます。" + +#: ../../builtins/functions.rst:214 +msgid "Without an argument, an array of size 0 is created." +msgstr "引数がなければ、長さ 0 の配列が生成されます。" + +#: ../../builtins/functions.rst:216 +msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." +msgstr ":ref:`binaryseq` と :ref:`typebytearray` も参照してください。" + +#: ../../builtins/functions.rst:224 +msgid "" +"Return a new \"bytes\" object which is an immutable sequence of integers in " +"the range ``0 <= x < 256``. :class:`bytes` is an immutable version of " +":class:`bytearray` -- it has the same non-mutating methods and the same " +"indexing and slicing behavior." +msgstr "" +"範囲 ``0 <= x < 256`` の整数のイミュータブルなシーケンスである \"bytes\" オブジェクトを返します。 " +":class:`bytes` は :class:`bytearray` " +"のイミュータブル版であり、オブジェクトを変化させないメソッドや、インデックス指定、オブジェクトのスライスについてのふるまいは同じです。" + +#: ../../builtins/functions.rst:229 +msgid "" +"Accordingly, constructor arguments are interpreted as for :func:`bytearray`." +msgstr "従って、コンストラクタ引数は :func:`bytearray` のものと同様に解釈されます。" + +#: ../../builtins/functions.rst:231 +msgid "Bytes objects can also be created with literals, see :ref:`strings`." +msgstr "バイト列オブジェクトはリテラルでも生成できます。 :ref:`strings` を参照してください。" + +#: ../../builtins/functions.rst:233 +msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." +msgstr ":ref:`binaryseq`, :ref:`typebytes`, :ref:`bytes-methods` も参照してください。" + +#: ../../builtins/functions.rst:238 +msgid "" +"Return :const:`True` if the *object* argument appears callable, " +":const:`False` if not. If this returns ``True``, it is still possible that " +"a call fails, but if it is ``False``, calling *object* will never succeed. " +"Note that classes are callable (calling a class returns a new instance); " +"instances are callable if their class has a :meth:`~object.__call__` method." +msgstr "" +"*object* 引数が呼び出し可能オブジェクトであれば :const:`True` を、そうでなければ :const:`False` " +"を返します。この関数が ``True`` を返しても、呼び出しは失敗する可能性がありますが、``False`` であれば、 *object* " +"の呼び出しは決して成功しません。なお、クラスは呼び出し可能 (クラスを呼び出すと新しいインスタンスを返します) です。また、インスタンスはクラスが " +":meth:`~object.__call__` メソッドを持つなら呼び出し可能です。" + +#: ../../builtins/functions.rst:244 +msgid "" +"This function was first removed in Python 3.0 and then brought back in " +"Python 3.2." +msgstr "この関数は Python 3.0 で一度取り除かれましたが、Python 3.2 で復活しました。" + +#: ../../builtins/functions.rst:251 +msgid "" +"Return the string representing a character with the specified Unicode code " +"point. For example, ``chr(97)`` returns the string ``'a'``, while " +"``chr(8364)`` returns the string ``'€'``. This is the inverse of " +":func:`ord`." +msgstr "" +"指定されたUnicode コードポイントが文字を表す文字列を返します。例えば ``chr(97)`` は文字列 ``'a'`` を、 " +"``chr(8364)`` は文字列 ``'€'`` を返します。 :func:`ord` の逆です。" + +#: ../../builtins/functions.rst:255 +msgid "" +"The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " +"base 16). :exc:`ValueError` will be raised if it is outside that range." +msgstr "" +"引数の有効な範囲は 0 から 1,114,111 (16 進数で 0x10FFFF) です。引数が範囲外の場合 :exc:`ValueError` " +"が送出されます。" + +#: ../../builtins/functions.rst:261 +msgid "Transform a method into a class method." +msgstr "メソッドをクラスメソッドへ変換します。" + +#: ../../builtins/functions.rst:263 +msgid "" +"A class method receives the class as an implicit first argument, just like " +"an instance method receives the instance. To declare a class method, use " +"this idiom::" +msgstr "" +"クラスメソッドは、インスタンスメソッドが暗黙の第一引数としてインスタンスをとるように、第一引数としてクラスをとります。クラスメソッドを宣言するには、以下のイディオムを使います::" + +#: ../../builtins/functions.rst:267 +msgid "" +"class C:\n" +" @classmethod\n" +" def f(cls, arg1, arg2): ..." +msgstr "" +"class C:\n" +" @classmethod\n" +" def f(cls, arg1, arg2): ..." + +#: ../../builtins/functions.rst:271 +msgid "" +"The ``@classmethod`` form is a function :term:`decorator` -- see " +":ref:`function` for details." +msgstr "" +"``@classmethod`` 形式は関数 :term:`デコレータ ` です。詳しくは :ref:`function` " +"を参照してください。" + +#: ../../builtins/functions.rst:274 +msgid "" +"A class method can be called either on the class (such as ``C.f()``) or on " +"an instance (such as ``C().f()``). The instance is ignored except for its " +"class. If a class method is called for a derived class, the derived class " +"object is passed as the implied first argument." +msgstr "" +"クラスメソッドは、(``C.f()`` のように) クラスから呼び出すことも、(``C().f()`` のように) インスタンスから呼び出すこともできます。\n" +"インスタンスはそのクラスが何であるかを除いて無視されます。\n" +"クラスメソッドが派生クラスから呼び出される場合は、その派生クラスオブジェクトが暗黙の第一引数として渡されます。" + +#: ../../builtins/functions.rst:279 +msgid "" +"Class methods are different than C++ or Java static methods. If you want " +"those, see :func:`staticmethod` in this section. For more information on " +"class methods, see :ref:`types`." +msgstr "" +"クラスメソッドは C++ や Java の静的メソッドとは異なります。静的メソッドは、この節の :func:`staticmethod` " +"を参照してください。クラスメソッドについてより詳しいことは :ref:`types` を参照してください。" + +#: ../../builtins/functions.rst:283 +msgid "" +"Class methods can now wrap other :term:`descriptors ` such as " +":func:`property`." +msgstr "" +"クラスメソッドは :func:`property` など、他の :term:`デスクリプタ ` " +"をラップすることができるようになりました。" + +#: ../../builtins/functions.rst:287 +msgid "" +"Class methods now inherit the method attributes " +"(:attr:`~function.__module__`, :attr:`~function.__name__`, " +":attr:`~function.__qualname__`, :attr:`~function.__doc__` and " +":attr:`~function.__annotations__`) and have a new ``__wrapped__`` attribute." +msgstr "" +"クラスメソッドはメソッド属性 (:attr:`~function.__module__`, :attr:`~function.__name__`, " +":attr:`~function.__qualname__`, :attr:`~function.__doc__` と " +":attr:`~function.__annotations__`) を継承するようになりました。また、新たに ``__wrapped__`` " +"属性を持つようになりました。" + +#: ../../builtins/functions.rst:294 +msgid "" +"Class methods can no longer wrap other :term:`descriptors ` such" +" as :func:`property`." +msgstr "" +"クラスメソッドは :func:`property` など、他の :term:`デスクリプタ ` " +"をラップすることができなくなりました。" + +#: ../../builtins/functions.rst:303 +msgid "" +"Compile the *source* into a code or AST object. Code objects can be " +"executed by :func:`exec` or :func:`eval`. *source* can either be a normal " +"string, a byte string, or an AST object. Refer to the :mod:`ast` module " +"documentation for information on how to work with AST objects." +msgstr "" +"*source* をコードオブジェクト、もしくは、 AST オブジェクトにコンパイルします。 コードオブジェクトは :func:`exec` " +"文で実行したり、 :func:`eval` 呼び出しで評価できます。 *source* は通常の文字列、 バイト列、 AST " +"オブジェクトのいずれでもかまいません。 AST オブジェクトへの、また、 AST オブジェクトからのコンパイルの方法は、 :mod:`ast` " +"モジュールのドキュメントを参照してください。" + +#: ../../builtins/functions.rst:308 +msgid "" +"The *filename* argument should give the file from which the code was read; " +"pass some recognizable value if it wasn't read from a file (``''`` " +"is commonly used)." +msgstr "" +"*filename* 引数には、コードの読み出し元のファイルを与えなければなりません; ファイルから読み出されるのでなければ、認識可能な値を渡して下さい" +" (``''`` が一般的に使われます)。" + +#: ../../builtins/functions.rst:312 +msgid "" +"The *mode* argument specifies what kind of code must be compiled; it can be " +"``'exec'`` if *source* consists of a sequence of statements, ``'eval'`` if " +"it consists of a single expression, or ``'single'`` if it consists of a " +"single interactive statement (in the latter case, expression statements that" +" evaluate to something other than ``None`` will be printed)." +msgstr "" +"*mode* 引数は、コンパイルされるコードの種類を指定します; *source* が一連の文から成るなら ``'exec'`` 、単一の式から成るなら" +" ``'eval'`` 、単一の対話的文の場合 ``'single'`` です。(後者の場合、評価が ``None`` 以外である式文が印字されます)。" + +#: ../../builtins/functions.rst:318 +msgid "" +"The optional arguments *flags* and *dont_inherit* control which " +":ref:`compiler options ` should be activated and which " +":ref:`future features ` should be allowed. If neither is present (or" +" both are zero) the code is compiled with the same flags that affect the " +"code that is calling :func:`compile`. If the *flags* argument is given and " +"*dont_inherit* is not (or is zero) then the compiler options and the future " +"statements specified by the *flags* argument are used in addition to those " +"that would be used anyway. If *dont_inherit* is a non-zero integer then the " +"*flags* argument is it -- the flags (future features and compiler options) " +"in the surrounding code are ignored." +msgstr "" +"オプション引数 *flags* と *dont_inherit* は、どの :ref:`コンパイラオプション `" +" を有効化するか、 :ref:`将来の機能 ` のどれを許可するかを制御します。どちらの引数も存在しない (またはどちらもゼロである) " +"場合は、 :func:`compile` の呼び出し元のコードに作用したものと同じフラグでコンパイルされます。 *flags* 引数が与えられて " +"*dont_inherit* が与えられない (またはゼロ) の場合、上記に加えて *flags* 引数で与えられたコンパイラオプションと future" +" 文が使われます。 *dont_inherit* がゼロでない整数の場合、 *flags* 引数で指定されたオプションだけが有効です -- " +"呼び出し元コードに適用されたフラグ (将来の機能とコンパイラオプション) は無視されます。" + +#: ../../builtins/functions.rst:329 +msgid "" +"Compiler options and future statements are specified by bits which can be " +"bitwise ORed together to specify multiple options. The bitfield required to " +"specify a given future feature can be found as the " +":attr:`~__future__._Feature.compiler_flag` attribute on the " +":class:`~__future__._Feature` instance in the :mod:`__future__` module. " +":ref:`Compiler flags ` can be found in :mod:`ast` " +"module, with ``PyCF_`` prefix." +msgstr "" +"有効化するコンパイラオプションと future 文はビットフィールドで指定可能で、ビット単位の OR " +"をとることで複数のオプションを一緒に指定することができます。特定の future 機能を指定するために必要なビットフィールドの情報は、 " +":mod:`__future__` モジュールにおける :class:`~__future__._Feature` インスタンスの " +":attr:`~__future__._Feature.compiler_flag` 属性で得ることができます。 :ref:`コンパイラフラグ " +"` の情報は :mod:`ast` モジュールの ``PyCF_`` で始まるフラグで得ることができます。" + +#: ../../builtins/functions.rst:337 +msgid "" +"The argument *optimize* specifies the optimization level of the compiler; " +"the default value of ``-1`` selects the optimization level of the " +"interpreter as given by :option:`-O` options. Explicit levels are ``0`` (no" +" optimization; ``__debug__`` is true), ``1`` (asserts are removed, " +"``__debug__`` is false) or ``2`` (docstrings are removed too)." +msgstr "" +"引数 *optimize* は、コンパイラの最適化レベルを指定します; デフォルトの値 ``-1`` は、インタプリタの :option:`-O` " +"オプションで与えられるのと同じ最適化レベルを選びます。明示的なレベルは、 ``0`` (最適化なし、 ``__debug__`` は真)、 ``1`` " +"(assert は取り除かれ、 ``__debug__`` は偽)、 ``2`` (docstring も取り除かれる) です。" + +#: ../../builtins/functions.rst:343 +msgid "" +"The optional argument *module* specifies the module name. It is needed to " +"unambiguous :ref:`filter ` syntax warnings by module name." +msgstr "" +"オプションの実引数 *module* には、モジュール名を指定します。 これはモジュール名で構文警告を明確に :ref:`filter " +"` するために必要です。" + +#: ../../builtins/functions.rst:347 +msgid "" +"This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled" +" source is invalid." +msgstr "" +"この関数は、コンパイルされたソースが不正である場合 :exc:`SyntaxError` または :exc:`ValueError` を送出します。" + +#: ../../builtins/functions.rst:350 +msgid "" +"If you want to parse Python code into its AST representation, see " +":func:`ast.parse`." +msgstr "Python コードをパースしてその AST 表現を得たいのであれば、 :func:`ast.parse` を参照してください。" + +#: ../../builtins/functions.rst:353 ../../builtins/functions.rst:355 +msgid "" +"Raises an :ref:`auditing event ` ``compile`` with arguments " +"``source`` and ``filename``. This event may also be raised by implicit " +"compilation." +msgstr "" +"引数 ``source`` と ``filename`` を指定して :ref:`監査イベント ` ``compile`` " +"を送出します。これは、暗黙に行われるコンパイルでも送出される可能性があります。" + +#: ../../builtins/functions.rst:361 +msgid "" +"When compiling a string with multi-line code in ``'single'`` or ``'eval'`` " +"mode, input must be terminated by at least one newline character. This is " +"to facilitate detection of incomplete and complete statements in the " +":mod:`code` module." +msgstr "" +"複数行に渡るコードの文字列を ``'single'`` や ``'eval'`` " +"モードでコンパイルするとき、入力は一つ以上の改行文字で終端されなければなりません。これは、 :mod:`code` " +"モジュールで不完全な文と完全な文を検知しやすくするためです。" + +#: ../../builtins/functions.rst:368 +msgid "" +"It is possible to crash the Python interpreter with a sufficiently " +"large/complex string when compiling to an AST object due to stack depth " +"limitations in Python's AST compiler." +msgstr "" +"AST オブジェクトにコンパイルしているときに、十分に大きい文字列や複雑な文字列によって Python " +"の抽象構文木コンパイラのスタックが深さの限界を越えることで、 Python インタプリタをクラッシュさせられます。" + +#: ../../builtins/functions.rst:372 +msgid "" +"Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " +"does not have to end in a newline anymore. Added the *optimize* parameter." +msgstr "" +"Windows や Mac の改行も受け付けます。また ``'exec'`` モードでの入力が改行で終わっている必要もありません。*optimize* " +"引数が追加されました。" + +#: ../../builtins/functions.rst:376 +msgid "" +"Previously, :exc:`TypeError` was raised when null bytes were encountered in " +"*source*." +msgstr "以前は *source* にヌルバイトがあったときに :exc:`TypeError` を送出していました。" + +#: ../../builtins/functions.rst:380 +msgid "" +"``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable " +"support for top-level ``await``, ``async for``, and ``async with``." +msgstr "" +"``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` フラグを渡してトップレベルの ``await``, ``async for``, " +"および ``async with`` のサポートを有効化することができるようになりました。" + +#: ../../builtins/functions.rst:384 +msgid "Added the *module* parameter." +msgstr "*module* 引数が追加されました。" + +#: ../../builtins/functions.rst:392 +msgid "" +"Convert a single string or number to a complex number, or create a complex " +"number from real and imaginary parts." +msgstr "単一の文字列や数値を複素数に変換する、あるいは実部と虚部から複素数を作成します。" + +#: ../../builtins/functions.rst:395 ../../builtins/functions.rst:783 +#: ../../builtins/functions.rst:1046 +msgid "Examples:" +msgstr "例:" + +#: ../../builtins/functions.rst:397 +msgid "" +">>> complex('+1.23')\n" +"(1.23+0j)\n" +">>> complex('-4.5j')\n" +"-4.5j\n" +">>> complex('-1.23+4.5j')\n" +"(-1.23+4.5j)\n" +">>> complex('\\t( -1.23+4.5J )\\n')\n" +"(-1.23+4.5j)\n" +">>> complex('-Infinity+NaNj')\n" +"(-inf+nanj)\n" +">>> complex(1.23)\n" +"(1.23+0j)\n" +">>> complex(imag=-4.5)\n" +"-4.5j\n" +">>> complex(-1.23, 4.5)\n" +"(-1.23+4.5j)" +msgstr "" +">>> complex('+1.23')\n" +"(1.23+0j)\n" +">>> complex('-4.5j')\n" +"-4.5j\n" +">>> complex('-1.23+4.5j')\n" +"(-1.23+4.5j)\n" +">>> complex('\\t( -1.23+4.5J )\\n')\n" +"(-1.23+4.5j)\n" +">>> complex('-Infinity+NaNj')\n" +"(-inf+nanj)\n" +">>> complex(1.23)\n" +"(1.23+0j)\n" +">>> complex(imag=-4.5)\n" +"-4.5j\n" +">>> complex(-1.23, 4.5)\n" +"(-1.23+4.5j)" + +#: ../../builtins/functions.rst:416 +msgid "" +"If the argument is a string, it must contain either a real part (in the same" +" format as for :func:`float`) or an imaginary part (in the same format but " +"with a ``'j'`` or ``'J'`` suffix), or both real and imaginary parts (the " +"sign of the imaginary part is mandatory in this case). The string can " +"optionally be surrounded by whitespaces and the round parentheses ``'('`` " +"and ``')'``, which are ignored. The string must not contain whitespace " +"between ``'+'``, ``'-'``, the ``'j'`` or ``'J'`` suffix, and the decimal " +"number. For example, ``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` " +"raises :exc:`ValueError`. More precisely, the input must conform to the " +":token:`~float:complexvalue` production rule in the following grammar, after" +" parentheses and leading and trailing whitespace characters are removed:" +msgstr "" +"引数が文字列の場合、実数部( :func:`float` と同じ形式)、虚数部(同様の形式で ``'j'`` または ``'J'`` " +"接尾辞)どちらか、あるいは両方(この場合、虚数部の符号は必須)を含まなければなりません。文字列 は空白や括弧 ``'('`` と``')'`` " +"で囲むこともできますが、無視されます。文字列は、 ``'+'`` 、``'-'`` 、 ``'j'`` または ``'J'`` 接尾辞 " +"、そして10進数の間に空白を含んではなりません。たとえば ``complex('1+2j')`` はよいですが、 ``complex('1 + " +"2j')`` は :exc:`ValueError` を送出します。より正確には、入力は括弧および先頭と末尾の空白文字を除去した後、以下の文法における " +":token:`~float:complexvalue` の生成規則を満たす必要があります:" + +#: ../../builtins/functions.rst:435 +msgid "" +"If the argument is a number, the constructor serves as a numeric conversion " +"like :class:`int` and :class:`float`. For a general Python object ``x``, " +"``complex(x)`` delegates to ``x.__complex__()``. If " +":meth:`~object.__complex__` is not defined then it falls back to " +":meth:`~object.__float__`. If :meth:`!__float__` is not defined then it " +"falls back to :meth:`~object.__index__`." +msgstr "" +"引数が数値の場合、コンストラクタは :class:`int` や :class:`float` のように数値変換します。一般的な Python " +"オブジェクト ``x`` では、 ``complex(x)`` は ``x.__complex__()`` に委譲します。 " +":meth:`~object.__complex__` が定義されていない場合は :meth:`~object.__float__` " +"にフォールバックします。 :meth:`!__float__` も定義されていない場合には、 :meth:`~object.__index__` " +"にフォールバックします。" + +#: ../../builtins/functions.rst:444 +msgid "" +"If two arguments are provided or keyword arguments are used, each argument " +"may be any numeric type (including complex). If both arguments are real " +"numbers, return a complex number with the real component *real* and the " +"imaginary component *imag*. If both arguments are complex numbers, return a " +"complex number with the real component ``real.real-imag.imag`` and the " +"imaginary component ``real.imag+imag.real``. If one of arguments is a real " +"number, only its real component is used in the above expressions." +msgstr "" +"2引数が指定されるかキーワード引数が使われている場合、各引数は任意の数値型(複素数を含む)となります。両方の引数が実数の場合には、実数成分 *real*" +" と虚数成分 *imag* を持つ複素数を返します。引数が両方とも複素数の場合、実数成分 ``real.real-imag.imag`` と虚数成分 " +"``real.imag+imag.real`` を持つ複素数を返します。引数の片方が実数の場合、前述の式ではその実数成分のみ使われます。" + +#: ../../builtins/functions.rst:454 +msgid "" +"See also :meth:`complex.from_number` which only accepts a single numeric " +"argument." +msgstr "数値を一つだけ引数にとる :meth:`complex.from_number` も参照してください。" + +#: ../../builtins/functions.rst:456 +msgid "If all arguments are omitted, returns ``0j``." +msgstr "引数がすべて省略された場合は、 ``0j`` を返します。" + +#: ../../builtins/functions.rst:458 +msgid "The complex type is described in :ref:`typesnumeric`." +msgstr "複素数型については :ref:`typesnumeric` に説明があります。" + +#: ../../builtins/functions.rst:460 ../../builtins/functions.rst:837 +#: ../../builtins/functions.rst:1094 +msgid "Grouping digits with underscores as in code literals is allowed." +msgstr "コードリテラル中で桁をグループ化するのにアンダースコアを利用できます。" + +#: ../../builtins/functions.rst:463 +msgid "" +"Falls back to :meth:`~object.__index__` if :meth:`~object.__complex__` and " +":meth:`~object.__float__` are not defined." +msgstr "" +":meth:`~object.__complex__` と :meth:`~object.__float__` が定義されていない場合、 " +":meth:`~object.__index__` へフォールバックします。" + +#: ../../builtins/functions.rst:467 +msgid "" +"Passing a complex number as the *real* or *imag* argument is now deprecated;" +" it should only be passed as a single positional argument." +msgstr "複素数を *real* 引数または *imag* 引数として渡せる機能は非推奨となりました。単一の位置引数として渡してください。" + +#: ../../builtins/functions.rst:474 +msgid "" +"This is a relative of :func:`setattr`. The arguments are an object and a " +"string. The string must be the name of one of the object's attributes. The" +" function deletes the named attribute, provided the object allows it. For " +"example, ``delattr(x, 'foobar')`` is equivalent to ``del x.foobar``. *name* " +"need not be a Python identifier (see :func:`setattr`)." +msgstr "" +":func:`setattr` " +"の親戚です。引数はオブジェクトと文字列です。文字列はオブジェクトの属性名のいずれかでなければなりません。対象のオブジェクトが許可する場合に限り、この関数は指定された名前の属性を削除します。たとえば、" +" ``delattr(x, 'foobar')`` は ``del x.foobar`` と等価です。 *name* は Python " +"の識別子である必要はありません (:func:`setattr` を参照してください)。" + +#: ../../builtins/functions.rst:487 +msgid "" +"Create a new dictionary. The :class:`dict` object is the dictionary class. " +"See also :ref:`typesmapping` for documentation about this class." +msgstr "" +"新しい辞書を作成します。 :class:`dict` オブジェクトは辞書クラスです。 このクラスに関するドキュメンテーションは " +":ref:`typesmapping` も参照してください。" + +#: ../../builtins/functions.rst:490 +msgid "" +"For other containers see the built-in :class:`frozendict`, :class:`list`, " +":class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` " +"module." +msgstr "" +"他のコンテナについては組み込みの :class:`frozendict` 、 :class:`list` 、 :class:`set` 、 " +":class:`tuple` クラスや、 :mod:`collections` モジュールを参照してください。" + +#: ../../builtins/functions.rst:497 +msgid "" +"Without arguments, return the list of names in the current local scope. " +"With an argument, attempt to return a list of valid attributes for that " +"object." +msgstr "" +"引数がない場合、現在のローカルスコープにある名前のリストを返します。引数がある場合、そのオブジェクトの有効な属性のリストを返そうと試みます。" + +#: ../../builtins/functions.rst:500 +msgid "" +"If the object has a method named :meth:`~object.__dir__`, this method will " +"be called and must return the list of attributes. This allows objects that " +"implement a custom :func:`~object.__getattr__` or " +":func:`~object.__getattribute__` function to customize the way :func:`dir` " +"reports their attributes." +msgstr "" +"オブジェクトが :meth:`~object.__dir__` " +"という名のメソッドを持つなら、そのメソッドが呼び出され、属性のリストを返さなければなりません。これにより、カスタムの " +":func:`~object.__getattr__` や :func:`~object.__getattribute__` " +"関数を実装するオブジェクトは、:func:`dir` が属性を報告するやり方をカスタマイズできます。" + +#: ../../builtins/functions.rst:507 +msgid "" +"If the object does not provide :meth:`~object.__dir__`, the function tries " +"its best to gather information from the object's :attr:`~object.__dict__` " +"attribute, if defined, and from its type object. The resulting list is not " +"necessarily complete and may be inaccurate when the object has a custom " +":func:`~object.__getattr__`." +msgstr "" +"オブジェクトが :meth:`~object.__dir__` を提供しない場合、その型オブジェクトと、定義されていればオブジェクトの " +":attr:`~object.__dict__` 属性から、できるだけ情報を集めようとします。結果のリストは必ずしも完全ではなく、カスタムの " +":func:`~object.__getattr__` を持つ場合は不正確かもしれません。" + +#: ../../builtins/functions.rst:513 +msgid "" +"The default :func:`dir` mechanism behaves differently with different types " +"of objects, as it attempts to produce the most relevant, rather than " +"complete, information:" +msgstr "" +"デフォルトの :func:`dir` メカニズムは、完全というより最重要な情報を作成しようとするため、異なる型のオブジェクトでは異なって振る舞います:" + +#: ../../builtins/functions.rst:517 +msgid "" +"If the object is a module object, the list contains the names of the " +"module's attributes." +msgstr "オブジェクトがモジュールオブジェクトの場合、リストにはモジュールの属性の名前が含まれます。" + +#: ../../builtins/functions.rst:520 +msgid "" +"If the object is a type or class object, the list contains the names of its " +"attributes, and recursively of the attributes of its bases." +msgstr "オブジェクトが型オブジェクトやクラスオブジェクトの場合、リストにはその属性の名前と、再帰的にたどったその基底クラスの属性が含まれます。" + +#: ../../builtins/functions.rst:523 +msgid "" +"Otherwise, the list contains the object's attributes' names, the names of " +"its class's attributes, and recursively of the attributes of its class's " +"base classes." +msgstr "それ以外の場合には、リストにはオブジェクトの属性名、クラス属性名、再帰的にたどった基底クラスの属性名が含まれます。" + +#: ../../builtins/functions.rst:527 +msgid "The resulting list is sorted alphabetically. For example:" +msgstr "返されるリストはアルファベット順に並べられています。例えば:" + +#: ../../builtins/functions.rst:547 +msgid "" +"Because :func:`dir` is supplied primarily as a convenience for use at an " +"interactive prompt, it tries to supply an interesting set of names more than" +" it tries to supply a rigorously or consistently defined set of names, and " +"its detailed behavior may change across releases. For example, metaclass " +"attributes are not in the result list when the argument is a class." +msgstr "" +":func:`dir` " +"は主に対話プロンプトでの使用に便利なように提供されているので、厳密性や一貫性を重視して定義された名前のセットというよりも、むしろ興味を引くような名前のセットを返そうとします。また、この関数の細かい動作はリリース間で変わる可能性があります。例えば、引数がクラスであるとき、メタクラス属性は結果のリストに含まれません。" + +#: ../../builtins/functions.rst:557 +msgid "" +"Take two (non-complex) numbers as arguments and return a pair of numbers " +"consisting of their quotient and remainder when using integer division. " +"With mixed operand types, the rules for binary arithmetic operators apply. " +"For integers, the result is the same as ``(a // b, a % b)``. For floating-" +"point numbers the result is ``(q, a % b)``, where *q* is usually " +"``math.floor(a / b)`` but may be 1 less than that. In any case ``q * b + a " +"% b`` is very close to *a*, if ``a % b`` is non-zero it has the same sign as" +" *b*, and ``0 <= abs(a % b) < abs(b)``." +msgstr "" +"2つの (複素数でない) " +"数を引数としてとり、整数の除法を行ったときの商と剰余からなる2つの数のペアを返します。被演算子の型が異なる場合、二項算術演算子での規則が適用されます。整数に対する結果は" +" ``(a // b, a % b)`` と同じです。浮動小数点数では、結果は ``(q, a % b)`` とあらわされます。 *q* は通常 " +"``math.floor(a / b)`` ですが、それより 1 少ないこともあります。いずれにせよ ``q * b + a % b`` は *a* " +"に非常に近い値になります。もし ``a % b`` がゼロでないときは、その符号は *b* と同じであり、かつ ``0 <= abs(a % b) < " +"abs(b)`` を満たします。" + +#: ../../builtins/functions.rst:569 +msgid "" +"Return an enumerate object. *iterable* must be a sequence, an " +":term:`iterator`, or some other object which supports iteration. The " +":meth:`~iterator.__next__` method of the iterator returned by " +":func:`enumerate` returns a tuple containing a count (from *start* which " +"defaults to 0) and the values obtained from iterating over *iterable*." +msgstr "" +"enumerate オブジェクトを返します。 *iterable* は、シーケンスか :term:`iterator` " +"か、あるいはイテレーションをサポートするその他のオブジェクトでなければなりません。 :func:`enumerate` によって返されたイテレータの " +":meth:`~iterator.__next__` メソッドは、 (デフォルトでは 0 となる *start* からの) カウントと、 " +"*iterable* 上のイテレーションによって得られた値を含むタプルを返します。" + +#: ../../builtins/functions.rst:581 +msgid "Equivalent to::" +msgstr "次と等価です::" + +#: ../../builtins/functions.rst:583 +msgid "" +"def enumerate(iterable, start=0):\n" +" n = start\n" +" for elem in iterable:\n" +" yield n, elem\n" +" n += 1" +msgstr "" +"def enumerate(iterable, start=0):\n" +" n = start\n" +" for elem in iterable:\n" +" yield n, elem\n" +" n += 1" + +#: ../../builtins/functions.rst:0 +msgid "Parameters" +msgstr "パラメーター" + +#: ../../builtins/functions.rst:593 +msgid "A Python expression." +msgstr "Python 式。" + +#: ../../builtins/functions.rst:597 +msgid "The global namespace (default: ``None``)." +msgstr "グローバル名前空間 (default: ``None``) 。" + +#: ../../builtins/functions.rst:601 +msgid "The local namespace (default: ``None``)." +msgstr "ローカル名前空間 (default: ``None``) 。" + +#: ../../builtins/functions.rst:0 +msgid "Returns" +msgstr "返り値" + +#: ../../builtins/functions.rst:605 +msgid "The result of the evaluated expression." +msgstr "評価された式の結果。" + +#: ../../builtins/functions.rst:0 +msgid "raises" +msgstr "例外" + +#: ../../builtins/functions.rst:606 +msgid "Syntax errors are reported as exceptions." +msgstr "構文エラーは例外として報告されます。" + +#: ../../builtins/functions.rst:610 ../../builtins/functions.rst:680 +msgid "" +"This function executes arbitrary code. Calling it with untrusted user-" +"supplied input will lead to security vulnerabilities." +msgstr "この関数は任意のコードを実行します。 信頼できないユーザ入力にて この関数を呼び出すと、セキュリティの脆弱性につながります。" + +#: ../../builtins/functions.rst:613 +msgid "" +"The *source* argument is parsed and evaluated as a Python expression " +"(technically speaking, an :ref:`expression list `) using the " +"*globals* and *locals* mappings as global and local namespace. If the " +"*globals* dictionary is present and does not contain a value for the key " +"``__builtins__``, a reference to the dictionary of the built-in module " +":mod:`builtins` is inserted under that key before *source* is parsed. " +"Overriding ``__builtins__`` can be used to restrict or change the available " +"names, but this is **not** a security mechanism: the executed code can still" +" access all builtins. If the *locals* mapping is omitted it defaults to the " +"*globals* dictionary. If both mappings are omitted, the source is executed " +"with the *globals* and *locals* in the environment where :func:`eval` is " +"called. Note, *eval()* will only have access to the :term:`nested scopes " +"` (non-locals) in the enclosing environment if they are " +"already referenced in the scope that is calling :func:`eval` (e.g. via a " +":keyword:`nonlocal` statement)." +msgstr "" +"*source* 実引数のパースと評価は、 *globals* / *locals* のマッピング(訳注:dict相当)をグローバル / " +"ローカルの名前空間とした Python 式 (技術的な言葉では :ref:`expression list `) " +"として行われます。 *globals* 辞書が渡され それが ``__builtins__`` " +"キーの値を含まない場合は、そのキーの下に組み込みモジュール :mod:`builtins` の辞書への参照が挿入されてから、*source* " +"が解析されます。 ``__builtins__`` の上書きで 利用可能な名前を制限や変更できますが、これはセキュリティ機構では **ありません** " +":実行されるコードは依然として全組み込み機能にアクセスできます。 *locals* マッピングが省略された場合、デフォルトで *globals* " +"辞書が使われます。 どちらのマッピングも省略された場合、 :func:`eval` が呼び出された環境における *globals* と " +"*locals* のもとで式が評価されます。 注意点として、*eval()* がその外側の環境内の :term:`ネストされたスコープ ` (ローカルでないオブジェクト) へのアクセスを持つのは、( :keyword:`nonlocal` 文などにより)それらが " +":func:`eval` を呼び出したスコープですでに参照されている場合のみです。" + +#: ../../builtins/functions.rst:631 +msgid "Example:" +msgstr "例:" + +#: ../../builtins/functions.rst:640 +msgid "" +"This function can also be used to execute arbitrary code objects (such as " +"those created by :func:`compile`). In this case, pass a code object instead" +" of a string. If the code object has been compiled with ``'exec'`` as the " +"*mode* argument, :func:`eval`\\'s return value will be ``None``." +msgstr "" +"この関数は (:func:`compile` で生成されるような) " +"任意のコードオブジェクトを実行するのにも利用できます。この場合、文字列の代わりにコードオブジェクトを渡してください。このコードオブジェクトが、引数 " +"*mode* を ``'exec'`` としてコンパイルされている場合、 :func:`eval` の戻り値は ``None`` になります。" + +#: ../../builtins/functions.rst:645 +msgid "" +"Hints: dynamic execution of statements is supported by the :func:`exec` " +"function. The :func:`globals` and :func:`locals` functions return the " +"current global and local dictionary, respectively, which may be useful to " +"pass around for use by :func:`eval` or :func:`exec`." +msgstr "" +"ヒント: :func:`exec` 関数により文の動的な実行がサポートされています。:func:`globals` および :func:`locals`" +" 関数は、それぞれ現在のグローバルおよびローカルな辞書を返すので、それらを :func:`eval` や :func:`exec` " +"に渡して使うことができます。" + +#: ../../builtins/functions.rst:650 +msgid "" +"If the given source is a string, then leading and trailing spaces and tabs " +"are stripped." +msgstr "ソースコードとして文字列が与えられた場合、先頭と末尾の空白文字およびタブは取り去られます。" + +#: ../../builtins/functions.rst:653 +msgid "" +"See :func:`ast.literal_eval` for a function to evaluate strings with " +"expressions containing only literals." +msgstr "リテラルだけを含む式の文字列を評価する関数、 :func:`ast.literal_eval` も参照してください。" + +#: ../../builtins/functions.rst:656 ../../builtins/functions.rst:658 +#: ../../builtins/functions.rst:723 ../../builtins/functions.rst:725 +msgid "" +"Raises an :ref:`auditing event ` ``exec`` with the code object as " +"the argument. Code compilation events may also be raised." +msgstr "" +"コードオブジェクトを引数として :ref:`監査イベント ` ``exec`` " +"を送出します。コードコンパイルのイベントも送出されることがあります。" + +#: ../../builtins/functions.rst:663 ../../builtins/functions.rst:745 +msgid "The *globals* and *locals* arguments can now be passed as keywords." +msgstr "*globals* と *locals* 引数 はキーワードとして渡せるようになった。" + +#: ../../builtins/functions.rst:667 ../../builtins/functions.rst:749 +msgid "" +"The semantics of the default *locals* namespace have been adjusted as " +"described for the :func:`locals` builtin." +msgstr "デフォルトの *locals* 名前空間のセマンティクスは、 組み込み :func:`locals` の説明のように調整された。" + +#: ../../builtins/functions.rst:672 ../../builtins/functions.rst:754 +msgid "*globals* can now be a :class:`frozendict`." +msgstr "*globals* は :class:`frozendict` になるようになった。" + +#: ../../builtins/functions.rst:683 +msgid "" +"This function supports dynamic execution of Python code. *source* must be " +"either a string or a code object. If it is a string, the string is parsed " +"as a suite of Python statements which is then executed (unless a syntax " +"error occurs). [#]_ If it is a code object, it is simply executed. In all " +"cases, the code that's executed is expected to be valid as file input (see " +"the section :ref:`file-input` in the Reference Manual). Be aware that the " +":keyword:`nonlocal`, :keyword:`yield`, and :keyword:`return` statements may" +" not be used outside of function definitions even within the context of code" +" passed to the :func:`exec` function. The return value is ``None``." +msgstr "" +"この関数は Python コードの動的な実行をサポートします。 *source* " +"は文字列かコードオブジェクトでなければなりません。文字列の場合、その文字列は一連の Python 文として解析され、そして (構文エラーにならない限り)" +" 実行されます。 [#]_ " +"コードオブジェクトの場合は、単純に実行されます。どの場合でも、実行されるコードはファイル入力形式として有効であることが期待されます " +"(リファレンスマニュアルの :ref:`file-input` 節を参照してください)。 :keyword:`nonlocal`, " +":keyword:`yield`, および :keyword:`return` 文は、 :func:`exec` " +"関数に渡されたコードの文脈中でさえ、関数定義の外側で使うことはできません。戻り値は ``None`` です。" + +#: ../../builtins/functions.rst:694 +msgid "" +"In all cases, if the optional parts are omitted, the code is executed in the" +" current scope. If only *globals* is provided, it must be a dictionary (and" +" not a subclass of dictionary), which will be used for both the global and " +"the local variables. If *globals* and *locals* are given, they are used for" +" the global and local variables, respectively. If provided, *locals* can be" +" any mapping object. Remember that at the module level, globals and locals " +"are the same dictionary." +msgstr "" +"どの場合でも、オプションの部分が省略されると、コードは現在のスコープ内で実行されます。 *globals* " +"だけが与えられた場合、その値は辞書でなければならず (かつ辞書のサブクラスであってはならず)、グローバル変数とローカル変数の両方に使われます。 " +"*globals* と *locals* の両方が与えられた場合、それぞれグローバル変数とローカル変数に使われます。 *locals* " +"を指定する場合、その値はマップ型オブジェクトでなければなりません。モジュールレベルでは globals と locals " +"は同じ辞書であることに留意してください。" + +#: ../../builtins/functions.rst:704 +msgid "" +"When ``exec`` gets two separate objects as *globals* and *locals*, the code " +"will be executed as if it were embedded in a class definition. This means " +"functions and classes defined in the executed code will not be able to " +"access variables assigned at the top level (as the \"top level\" variables " +"are treated as class variables in a class definition)." +msgstr "" +"``exec`` が *globals* と *locals* " +"2つ別々のオブジェクトを取る場合、コードはクラス定義に埋め込まれたかのように実行されます。これは、実行されたコードで定義された関数とクラスが、トップレベルで割り当てられた変数にアクセスできないことを意味します(「トップレベル」変数はクラス定義にてクラス変数として扱われるため)。" + +#: ../../builtins/functions.rst:710 +msgid "" +"If the *globals* dictionary does not contain a value for the key " +"``__builtins__``, a reference to the dictionary of the built-in module " +":mod:`builtins` is inserted under that key. Overriding ``__builtins__`` can " +"be used to restrict or change the available names, but this is **not** a " +"security mechanism: the executed code can still access all builtins." +msgstr "" + +#: ../../builtins/functions.rst:717 +msgid "" +"The *closure* argument specifies a closure--a tuple of cellvars. It's only " +"valid when the *object* is a code object containing :term:`free (closure) " +"variables `. The length of the tuple must exactly match " +"the length of the code object's :attr:`~codeobject.co_freevars` attribute." +msgstr "" + +#: ../../builtins/functions.rst:730 +msgid "" +"The built-in functions :func:`globals` and :func:`locals` return the current" +" global and local namespace, respectively, which may be useful to pass " +"around for use as the second and third argument to :func:`exec`." +msgstr "" +"組み込み関数 :func:`globals` および :func:`locals` " +"は、それぞれ現在のグローバルおよびローカルの名前空間を返すので、それらを :func:`exec` " +"の第二、第三引数にそのまま渡して使うと便利なことがあります。" + +#: ../../builtins/functions.rst:736 +msgid "" +"The default *locals* act as described for function :func:`locals` below. " +"Pass an explicit *locals* dictionary if you need to see effects of the code " +"on *locals* after function :func:`exec` returns." +msgstr "" +"標準では *locals* は後に述べる関数 :func:`locals` のように動作します。 :func:`exec` の呼び出しが返る時にコードが" +" *locals* に与える影響を知りたいなら、明示的に *locals* 辞書を渡してください。" + +#: ../../builtins/functions.rst:740 +msgid "Added the *closure* parameter." +msgstr "*closure* パラメータが追加されました。" + +#: ../../builtins/functions.rst:759 +msgid "" +"Construct an iterator from those elements of *iterable* for which *function*" +" is true. *iterable* may be either a sequence, a container which supports " +"iteration, or an iterator. If *function* is ``None``, the identity function" +" is assumed, that is, all elements of *iterable* that are false are removed." +msgstr "" +"*iterable* の要素のうち、 *function* が真であるものからイテレータを構築します。 *iterable* " +"にはシーケンスか、イテレーションをサポートするコンテナか、イテレータを渡せます。 *function* が ``None`` " +"のときは恒等関数が指定されたものとして扱われ、 *iterable* のうち偽であるものがすべて取り除かれます。" + +#: ../../builtins/functions.rst:765 +msgid "" +"Note that ``filter(function, iterable)`` is equivalent to the generator " +"expression ``(item for item in iterable if function(item))`` if function is " +"not ``None`` and ``(item for item in iterable if item)`` if function is " +"``None``." +msgstr "" +"なお、``filter(function, iterable)`` は、関数が ``None`` でなければジェネレータ式 ``(item for " +"item in iterable if function(item))`` と同等で、関数が ``None`` なら ``(item for item " +"in iterable if item)`` と同等です。" + +#: ../../builtins/functions.rst:770 +msgid "" +"See :func:`itertools.filterfalse` for the complementary function that " +"returns elements of *iterable* for which *function* is false." +msgstr "" +"逆の働きをする関数については、 :func:`itertools.filterfalse` を参照してください。 *iterable* の要素のうち、 " +"*function* が偽であるものを返します。" + +#: ../../builtins/functions.rst:781 +msgid "Return a floating-point number constructed from a number or a string." +msgstr "数または文字列から生成された浮動小数点数を返します。" + +#: ../../builtins/functions.rst:785 +msgid "" +">>> float('+1.23')\n" +"1.23\n" +">>> float(' -12345\\n')\n" +"-12345.0\n" +">>> float('1e-003')\n" +"0.001\n" +">>> float('+1E6')\n" +"1000000.0\n" +">>> float('-Infinity')\n" +"-inf" +msgstr "" +">>> float('+1.23')\n" +"1.23\n" +">>> float(' -12345\\n')\n" +"-12345.0\n" +">>> float('1e-003')\n" +"0.001\n" +">>> float('+1E6')\n" +"1000000.0\n" +">>> float('-Infinity')\n" +"-inf" + +#: ../../builtins/functions.rst:798 +msgid "" +"If the argument is a string, it should contain a decimal number, optionally " +"preceded by a sign, and optionally embedded in whitespace. The optional " +"sign may be ``'+'`` or ``'-'``; a ``'+'`` sign has no effect on the value " +"produced. The argument may also be a string representing a NaN (not-a-" +"number), or positive or negative infinity. More precisely, the input must " +"conform to the :token:`~float:floatvalue` production rule in the following " +"grammar, after leading and trailing whitespace characters are removed:" +msgstr "" +"引数が文字列の場合、10進数でなければなりません。先頭に符号または空白を含んでもかまいません。符号は ``'+'`` か ``'-'`` " +"のいずれかです。正符号 ``'+'`` は生成される値に対して何の効果もありません。引数は NaN (not-a-number) " +"や正または負の無限大をあらわす文字列でもかまいません。より正確にいうと、入力は先頭と末尾の空白文字を除き、以下に示す " +":token:`~float:floatvalue` の生成規則に従う必要があります:" + +#: ../../builtins/functions.rst:819 +msgid "" +"Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " +"and \"iNfINity\" are all acceptable spellings for positive infinity." +msgstr "" +"大文字と小文字は重要ではないので、例えば、 \"inf\", \"Inf\", \"INFINITY\", \"iNfINity\" " +"はすべて正の無限大を表す綴りとして受け入れられます。" + +#: ../../builtins/functions.rst:822 +msgid "" +"Otherwise, if the argument is an integer or a floating-point number, a " +"floating-point number with the same value (within Python's floating-point " +"precision) is returned. If the argument is outside the range of a Python " +"float, an :exc:`OverflowError` will be raised." +msgstr "" +"また、引数が整数または浮動小数点数なら、 (Python の浮動小数点数の精度で) 同じ値の浮動小数点数が返されます。 引数が Python " +"の浮動小数点数の範囲外なら、 :exc:`OverflowError` が送出されます。" + +#: ../../builtins/functions.rst:827 +msgid "" +"For a general Python object ``x``, ``float(x)`` delegates to " +"``x.__float__()``. If :meth:`~object.__float__` is not defined then it " +"falls back to :meth:`~object.__index__`." +msgstr "" +"一般の Python オブジェクト ``x`` に対して、``float(x)`` は ``x.__float__()`` に委譲します。 " +":meth:`~object.__float__()` が定義されていない場合、:meth:`~object.__index__` " +"へフォールバックします。" + +#: ../../builtins/functions.rst:831 +msgid "" +"See also :meth:`float.from_number` which only accepts a numeric argument." +msgstr "数値型の値のみ引数にとる :meth:`float.from_number` も参照してください。" + +#: ../../builtins/functions.rst:833 +msgid "If no argument is given, ``0.0`` is returned." +msgstr "引数が与えられなければ、``0.0`` が返されます。" + +#: ../../builtins/functions.rst:835 +msgid "The float type is described in :ref:`typesnumeric`." +msgstr "浮動小数点数型については、 :ref:`typesnumeric` も参照してください。" + +#: ../../builtins/functions.rst:843 +msgid "" +"Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " +"defined." +msgstr "" +":meth:`~object.__float__` が定義されていない場合、 :meth:`~object.__index__` " +"へフォールバックします。" + +#: ../../builtins/functions.rst:853 +msgid "" +"Convert a *value* to a \"formatted\" representation, as controlled by " +"*format_spec*. The interpretation of *format_spec* will depend on the type " +"of the *value* argument; however, there is a standard formatting syntax that" +" is used by most built-in types: :ref:`formatspec`." +msgstr "" +"*value* を *format_spec* で指示された通りに \"整形\" した文字列表現に変換します。 *format_spec* の解釈は " +"*value* 引数の型に依存しますが、ほとんどの組み込み型で使われる標準的な構文が存在します: :ref:`formatspec`。" + +#: ../../builtins/functions.rst:858 +msgid "" +"The default *format_spec* is an empty string which usually gives the same " +"effect as calling :func:`str(value) `." +msgstr "" +"デフォルトの *format_spec* は空の文字列です。それは通常 :func:`str(value) ` " +"の呼び出しと同じ結果になります。" + +#: ../../builtins/functions.rst:861 +msgid "" +"A call to ``format(value, format_spec)`` is translated to " +"``type(value).__format__(value, format_spec)`` which bypasses the instance " +"dictionary when searching for the value's :meth:`~object.__format__` method." +" A :exc:`TypeError` exception is raised if the method search reaches " +":mod:`object` and the *format_spec* is non-empty, or if either the " +"*format_spec* or the return value are not strings." +msgstr "" +"``format(value, format_spec)`` の呼び出しは、 ``type(value).__format__(value, " +"format_spec)`` に翻訳され、これは value の :meth:`~object.__format__` " +"メソッドの検索をするとき、インスタンス辞書を回避します。このメソッドの探索が :mod:`object` に到達しても *format_spec* " +"が空にならなかったり、 *format_spec* や返り値が文字列でなかったりした場合、 :exc:`TypeError` が送出されます。" + +#: ../../builtins/functions.rst:868 +msgid "" +"``object().__format__(format_spec)`` raises :exc:`TypeError` if " +"*format_spec* is not an empty string." +msgstr "" +"*format_spec* が空の文字列でない場合 ``object().__format__(format_spec)`` は " +":exc:`TypeError` を送出します。" + +#: ../../builtins/functions.rst:879 +msgid "" +"Create a new frozen dictionary. The :class:`frozendict` object is a built-" +"in class. See also :ref:`typesmapping` for documentation about this class." +msgstr "" + +#: ../../builtins/functions.rst:882 +msgid "" +"For other containers see the built-in :class:`dict`, :class:`list`, " +":class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` " +"module." +msgstr "" + +#: ../../builtins/functions.rst:892 +msgid "" +"Return a new :class:`frozenset` object, optionally with elements taken from " +"*iterable*. :class:`frozenset` is a built-in class. See also :ref:`types-" +"set` for documentation about this class." +msgstr "" + +#: ../../builtins/functions.rst:896 +msgid "" +"For other containers see the built-in :class:`set`, :class:`list`, " +":class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections`" +" module." +msgstr "" +"他のコンテナについては、ビルトインクラス :class:`set`, :class:`list`, :class:`tuple`, " +":class:`dict` や :mod:`collections` モジュールを見てください。" + +#: ../../builtins/functions.rst:904 +msgid "" +"Return the value of the named attribute of *object*. *name* must be a " +"string. If the string is the name of one of the object's attributes, the " +"result is the value of that attribute. For example, ``getattr(x, " +"'foobar')`` is equivalent to ``x.foobar``. If the named attribute does not " +"exist, *default* is returned if provided, otherwise :exc:`AttributeError` is" +" raised. *name* need not be a Python identifier (see :func:`setattr`)." +msgstr "" +"*object* の指定された属性の値を返します。 *name* " +"は文字列でなければなりません。与えられた文字列がオブジェクトの属性名のうちいずれかに一致すれば、戻り値はその属性の値になります。たとえば、 " +"``getattr(x, 'foobar')`` は ``x.foobar`` と等価です。もし指定された属性が存在しない場合、 *default* " +"が指定されていればその値が返されます。そうでない場合は :exc:`AttributeError` が送出されます。 *name* は Python " +"識別子である必要はありません (:func:`setattr` を参照してください)。" + +#: ../../builtins/functions.rst:913 +msgid "" +"Since :ref:`private name mangling ` happens at " +"compilation time, one must manually mangle a private attribute's (attributes" +" with two leading underscores) name in order to retrieve it with " +":func:`getattr`." +msgstr "" +":ref:`プライベートな名前のマングリング ` はコンパイル時に行われます。そのため、プライベートな属性" +" (先頭に2つのアンダースコアを伴う名前を持つ属性) の値を :func:`getattr` " +"で取り出すためには、属性名を手動でマングリングする必要があります。" + +#: ../../builtins/functions.rst:921 +msgid "" +"Return the dictionary implementing the current module namespace. For code " +"within functions, this is set when the function is defined and remains the " +"same regardless of where the function is called." +msgstr "" +"現在のモジュールの名前空間を実装した辞書を返します。関数内のコードに対しては、関数が定義されるときに辞書が設定され、その関数がどこから呼ばれたかにかかわらず同じ内容になります。" + +#: ../../builtins/functions.rst:928 +msgid "" +"The arguments are an object and a string. The result is ``True`` if the " +"string is the name of one of the object's attributes, ``False`` if not. " +"(This is implemented by calling ``getattr(object, name)`` and seeing whether" +" it raises an :exc:`AttributeError` or not.)" +msgstr "" +"引数はオブジェクトと文字列です。文字列がオブジェクトの属性名の一つであった場合 ``True`` を、そうでない場合 ``False`` を返します。 " +"(この関数は、 ``getattr(object, name)`` を呼び出して :exc:`AttributeError` " +"を送出するかどうかを見ることで実装されています。)" + +#: ../../builtins/functions.rst:936 +msgid "" +"Return the hash value of the object (if it has one). Hash values are " +"integers. They are used to quickly compare dictionary keys during a " +"dictionary lookup. Numeric values that compare equal have the same hash " +"value (even if they are of different types, as is the case for 1 and 1.0)." +msgstr "" +"オブジェクトのハッシュ値を (存在すれば) " +"返します。ハッシュ値は整数です。これらは辞書を検索する際に辞書のキーを高速に比較するために使われます。等しい値となる数値は等しいハッシュ値を持ちます " +"(1 と 1.0 のように型が異なっていてもです)。" + +#: ../../builtins/functions.rst:943 +msgid "" +"For objects with custom :meth:`~object.__hash__` methods, note that " +":func:`hash` truncates the return value based on the bit width of the host " +"machine." +msgstr "" +"独自の :meth:`~object.__hash__` メソッドを実装したオブジェクトを使う場合、:func:`hash` " +"が実行するマシンのビット幅に合わせて戻り値を切り捨てることに注意してください。" + +#: ../../builtins/functions.rst:950 +msgid "" +"Invoke the built-in help system. (This function is intended for interactive" +" use.) If no argument is given, the interactive help system starts on the " +"interpreter console. If the argument is a string, then the string is looked" +" up as the name of a module, function, class, method, keyword, or " +"documentation topic, and a help page is printed on the console. If the " +"argument is any other kind of object, a help page on the object is " +"generated." +msgstr "" +"組み込みヘルプシステムを起動します。(この関数は対話的な使用のためのものです。) " +"引数が与えられていない場合、対話的ヘルプシステムはインタプリタコンソール上で起動します。引数が文字列の場合、文字列はモジュール、関数、クラス、メソッド、キーワード、またはドキュメントの項目名として検索され、ヘルプページがコンソール上に印字されます。引数がその他のオブジェクトの場合、そのオブジェクトに関するヘルプページが生成されます。" + +#: ../../builtins/functions.rst:957 +msgid "" +"Note that if a slash(/) appears in the parameter list of a function when " +"invoking :func:`help`, it means that the parameters prior to the slash are " +"positional-only. For more info, see :ref:`the FAQ entry on positional-only " +"parameters `." +msgstr "" +":func:`help` を呼び出したときに関数の引数リストにスラッシュ (/) " +"が現れた場合は、スラッシュより前の引数が位置専用引数だという意味であることに注意してください。より詳しい情報は、 :ref:`位置専用引数についての " +"FAQ の項目 ` を参照してください。" + +#: ../../builtins/functions.rst:962 +msgid "" +"This function is added to the built-in namespace by the :mod:`site` module." +msgstr "この関数は、 :mod:`site` モジュールから、組み込みの名前空間に移されました。" + +#: ../../builtins/functions.rst:964 +msgid "" +"Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures" +" for callables are now more comprehensive and consistent." +msgstr "" +":mod:`pydoc` と :mod:`inspect` " +"への変更により、呼び出し可能オブジェクトの報告されたシグニチャがより包括的で一貫性のあるものになりました。" + +#: ../../builtins/functions.rst:971 +msgid "" +"Convert an integer number to a lowercase hexadecimal string prefixed with " +"\"0x\". If *integer* is not a Python :class:`int` object, it has to define " +"an :meth:`~object.__index__` method that returns an integer. Some examples:" +msgstr "" +"整数を先頭に \"0x\" が付いた小文字の 16 進文字列に変換します。\n" +"*integer* が Python の :class:`int` オブジェクトでない場合、整数を返す :meth:`~object.__index__` メソッドが定義されていなければなりません。\n" +"いくつかの例を示します:" + +#: ../../builtins/functions.rst:980 +msgid "" +"If you want to convert an integer number to an uppercase or lower " +"hexadecimal string with prefix or not, you can use either of the following " +"ways:" +msgstr "整数を大文字の 16 進文字列や小文字の 16 進文字列、先頭の \"0x\" 付きや \"0x\" 無しに変換したい場合は、次に挙げる方法が使えます:" + +#: ../../builtins/functions.rst:992 +msgid "" +"See also :func:`int` for converting a hexadecimal string to an integer using" +" a base of 16." +msgstr "16を底として16進数文字列を整数に変換するには :func:`int` も参照してください。" + +#: ../../builtins/functions.rst:997 +msgid "" +"To obtain a hexadecimal string representation for a float, use the " +":meth:`float.hex` method." +msgstr "浮動小数点数の16進文字列表記を得たい場合には、 :meth:`float.hex` メソッドを使って下さい。" + +#: ../../builtins/functions.rst:1003 +msgid "" +"Return the \"identity\" of an object. This is an integer which is " +"guaranteed to be unique and constant for this object during its lifetime. " +"Two objects with non-overlapping lifetimes may have the same :func:`id` " +"value." +msgstr "" +"オブジェクトの \"識別値\" を返します。この値は整数で、このオブジェクトの有効期間中は一意かつ定数であることが保証されています。有効期間が重ならない" +" 2 つのオブジェクトは同じ :func:`id` 値を持つかもしれません。" + +#: ../../builtins/functions.rst:1008 +msgid "This is the address of the object in memory." +msgstr "これはオブジェクトのメモリアドレスです。" + +#: ../../builtins/functions.rst:1010 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.id`` with argument " +"``id``." +msgstr "引数 ``id`` を指定して :ref:`監査イベント ` ``builtins.id`` を送出します。 " + +#: ../../builtins/functions.rst:1016 +msgid "" +"If the *prompt* argument is present, it is written to standard output " +"without a trailing newline. The function then reads a line from input, " +"converts it to a string (stripping a trailing newline), and returns that. " +"When EOF is read, :exc:`EOFError` is raised. Example::" +msgstr "" +"引数 *prompt* が存在すれば、それが末尾の改行を除いて標準出力に書き出されます。次に、この関数は入力から 1 行を読み込み、文字列に変換して " +"(末尾の改行を除いて) 返します。 EOF が読み込まれたとき、 :exc:`EOFError` が送出されます。例::" + +#: ../../builtins/functions.rst:1021 +msgid "" +">>> s = input('--> ')\n" +"--> Monty Python's Flying Circus\n" +">>> s\n" +"\"Monty Python's Flying Circus\"" +msgstr "" +">>> s = input('--> ')\n" +"--> Monty Python's Flying Circus\n" +">>> s\n" +"\"Monty Python's Flying Circus\"" + +#: ../../builtins/functions.rst:1026 +msgid "" +"If the :mod:`readline` module was loaded, then :func:`input` will use it to " +"provide elaborate line editing and history features." +msgstr "" +":mod:`readline` モジュールが読み込まれていれば、 :func:`input` はそれを使って精緻な行編集やヒストリ機能を提供します。" + +#: ../../builtins/functions.rst:1029 ../../builtins/functions.rst:1031 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.input`` with argument " +"``prompt`` before reading input" +msgstr "" +"入力を読み込む前に、引数 ``prompt`` 付きで :ref:`監査イベント ` ``builtins.input`` " +"を送出します。" + +#: ../../builtins/functions.rst:1034 ../../builtins/functions.rst:1036 +msgid "" +"Raises an :ref:`auditing event ` ``builtins.input/result`` with " +"the result after successfully reading input." +msgstr "" +"入力の読み込みに成功した後に、その結果付きで :ref:`監査イベント ` ``builtins.input/result`` " +"を送出します。" + +#: ../../builtins/functions.rst:1043 +msgid "" +"Return an integer object constructed from a number or a string, or return " +"``0`` if no arguments are given." +msgstr "数または文字列から生成された整数オブジェクトを返します。引数が指定されない場合は ``0`` を返します。" + +#: ../../builtins/functions.rst:1048 +msgid "" +">>> int(123.45)\n" +"123\n" +">>> int('123')\n" +"123\n" +">>> int(' -12_345\\n')\n" +"-12345\n" +">>> int('FACE', 16)\n" +"64206\n" +">>> int('0xface', 0)\n" +"64206\n" +">>> int('01110011', base=2)\n" +"115" +msgstr "" +">>> int(123.45)\n" +"123\n" +">>> int('123')\n" +"123\n" +">>> int(' -12_345\\n')\n" +"-12345\n" +">>> int('FACE', 16)\n" +"64206\n" +">>> int('0xface', 0)\n" +"64206\n" +">>> int('01110011', base=2)\n" +"115" + +#: ../../builtins/functions.rst:1063 +msgid "" +"If the argument defines :meth:`~object.__int__`, ``int(x)`` returns " +"``x.__int__()``. If the argument defines :meth:`~object.__index__`, it " +"returns ``x.__index__()``. For floating-point numbers, this truncates " +"towards zero." +msgstr "" +"引数に :meth:`~object.__int__` が定義されている場合は、 ``int(x)`` は ``x.__int__()`` " +"を返します。引数に :meth:`~object.__index__` が定義されている場合は、 ``x.__index__()`` " +"を返します。浮動小数点数については、これは 0 に近い側へ切り捨てます。" + +#: ../../builtins/functions.rst:1068 +msgid "" +"If the argument is not a number or if *base* is given, then it must be a " +"string, :class:`bytes`, or :class:`bytearray` instance representing an " +"integer in radix *base*. Optionally, the string can be preceded by ``+`` or" +" ``-`` (with no space in between), have leading zeros, be surrounded by " +"whitespace, and have single underscores interspersed between digits." +msgstr "" +"引数が数値でないか、または *base* が与えられた場合、引数は *base* を基数とした整数を表現する文字列、 :class:`bytes` " +"インスタンス、または :class:`bytearray` インスタンスのいずれかでなければなりません。文字列は先頭に ``+`` または ``-`` " +"を伴ったり " +"(符号と数値の間に空白文字を入れてはいけません)、数値の先頭に任意の数のゼロを付けたり、前後に空白文字を付けたり、各桁を単一の下線で区切ったりしても有効です。" + +#: ../../builtins/functions.rst:1074 +msgid "" +"A base-n integer string contains digits, each representing a value from 0 to" +" n-1. The values 0--9 can be represented by any Unicode decimal digit. The " +"values 10--35 can be represented by ``a`` to ``z`` (or ``A`` to ``Z``). The " +"default *base* is 10. The allowed bases are 0 and 2--36. Base-2, -8, and -16" +" strings can be optionally prefixed with ``0b``/``0B``, ``0o``/``0O``, or " +"``0x``/``0X``, as with integer literals in code. For base 0, the string is " +"interpreted in a similar way to an :ref:`integer literal in code " +"`, in that the actual base is 2, 8, 10, or 16 as determined by the" +" prefix. Base 0 also disallows leading zeros: ``int('010', 0)`` is not " +"legal, while ``int('010')`` and ``int('010', 8)`` are." +msgstr "" +"n-進数の整数文字列は、各桁が0から n-1 の数値で表されます。ユニコードの10進数では、各桁は0から9のいずれかです。また10から35までの値は " +"``a`` から ``z`` (または ``A`` から ``Z``) で表されます。デフォルトの *base* " +"は10です。基数に指定可能な値は0および2から36までの整数です。2進数、8進数、16進数の文字列は、整数リテラルと同様に、それぞれ " +"``0b``/``0B``, ``0o``/``0O``, または ``0x``/``0X`` " +"をプレフィックスとして追加することができます。基数を0に指定した場合、文字列は :ref:`コードにおける整数リテラル ` " +"と同じように解釈されます。すなわち、プレフィックスによって基数が2, 8, 10, または 16 " +"のどれになるかが決まります。基数を0にした場合先頭にゼロを追加することはできません: すなわち ``int('010', 0)`` " +"は基数を0に指定しているため不正ですが、 ``int('010')`` や ``int('010', 8)`` は有効です。" + +#: ../../builtins/functions.rst:1085 +msgid "The integer type is described in :ref:`typesnumeric`." +msgstr "整数型については、 :ref:`typesnumeric` も参照してください。" + +#: ../../builtins/functions.rst:1087 +msgid "" +"If *base* is not an instance of :class:`int` and the *base* object has a " +":meth:`base.__index__ ` method, that method is called to " +"obtain an integer for the base. Previous versions used :meth:`base.__int__ " +"` instead of :meth:`base.__index__ `." +msgstr "" +"*base* が :class:`int` のインスタンスでなく、*base* オブジェクトが :meth:`base.__index__ " +"` メソッドを持っている場合、そのメソッドを呼んで底に対する整数を得ることができます。以前のバージョンでは " +":meth:`base.__index__ ` ではなく :meth:`base.__int__ " +"` を使用していました。" + +#: ../../builtins/functions.rst:1097 +msgid "The first parameter is now positional-only." +msgstr "第1引数は位置専用になりました。" + +#: ../../builtins/functions.rst:1100 +msgid "" +"Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " +"defined." +msgstr "" +":meth:`~object.__int__` が定義されていない場合、 :meth:`~object.__index__` へフォールバックします。" + +#: ../../builtins/functions.rst:1103 +msgid "" +":class:`int` string inputs and string representations can be limited to help" +" avoid denial of service attacks. A :exc:`ValueError` is raised when the " +"limit is exceeded while converting a string to an :class:`int` or when " +"converting an :class:`int` into a string would exceed the limit. See the " +":ref:`integer string conversion length limitation ` " +"documentation." +msgstr "" +":class:`int` への文字列入力やその文字列表現は、サービス拒否攻撃 (DoS 攻撃) を避けるために制限されることがあります。文字列を " +":class:`int` に変換したり :class:`int` を文字列に変換したりする際にその制限を超えた場合、 :exc:`ValueError`" +" が送出されます。詳しくは :ref:`整数文字列の変換における長さ制限 ` を参照してください。" + +#: ../../builtins/functions.rst:1111 +msgid "" +":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." +msgstr "" + +#: ../../builtins/functions.rst:1116 +msgid "" +"Return ``True`` if the *object* argument is an instance of the *classinfo* " +"argument, or of a (direct, indirect, or :term:`virtual `) subclass thereof. If *object* is not an object of the given type, " +"the function always returns ``False``. If *classinfo* is a tuple of type " +"objects (or recursively, other such tuples) or a :ref:`types-union` of " +"multiple types, return ``True`` if *object* is an instance of any of the " +"types. If *classinfo* is not a type or tuple of types and such tuples, a " +":exc:`TypeError` exception is raised. :exc:`TypeError` may not be raised for" +" an invalid type if an earlier check succeeds." +msgstr "" +"*object* 引数が *classinfo* 引数に指定した型、またはその (直接、間接、または :term:`仮想 ` の) サブクラスのインスタンスである場合に ``True`` を返します。 *object* " +"が与えられた型のオブジェクトでない場合、この関数は常に ``False`` を返します。 *classinfo* が型オブジェクトのタプル " +"(または再帰的にそのようなタプルを含むタプル) や複数の型の :ref:`types-union` である場合、 *object* " +"がそれらの型のいずれかのインスタンスであれば ``True`` を返します。 *classinfo* " +"が型や型からなるタプルまたは再帰的タプルのいずれでもない場合、 :exc:`TypeError` " +"例外が送出されます。タプルの中で先行する型に対するチェックが成功した場合、後続の不正な型に対して :exc:`TypeError` " +"が送出されないことがあります。" + +#: ../../builtins/functions.rst:1127 ../../builtins/functions.rst:1141 +msgid "*classinfo* can be a :ref:`types-union`." +msgstr "*classinfo* に :ref:`types-union` を指定できるようになりました。" + +#: ../../builtins/functions.rst:1133 +msgid "" +"Return ``True`` if *cls* is a subclass (direct, indirect, or :term:`virtual " +"`) of *classinfo*. A class is considered a subclass of" +" itself. *classinfo* may be a tuple of class objects (or recursively, other " +"such tuples) or a :ref:`types-union`, in which case return ``True`` if *cls*" +" is a subclass of any entry in *classinfo*. In any other case, a " +":exc:`TypeError` exception is raised." +msgstr "" + +#: ../../builtins/functions.rst:1148 +msgid "" +"Return an :term:`iterator` object. The first argument is interpreted very " +"differently depending on the presence of the second argument. Without a " +"second argument, the single argument must be a collection object which " +"supports the :term:`iterable` protocol (the :meth:`~object.__iter__` " +"method), or it must support the sequence protocol (the " +":meth:`~object.__getitem__` method with integer arguments starting at " +"``0``). If it does not support either of those protocols, :exc:`TypeError` " +"is raised. If the second argument, *sentinel*, is given, then the first " +"argument must be a callable object. The iterator created in this case will " +"call *callable* with no arguments for each call to its " +":meth:`~iterator.__next__` method; if the value returned is equal to " +"*sentinel*, :exc:`StopIteration` will be raised, otherwise the value will be" +" returned." +msgstr "" +":term:`iterator` " +"オブジェクトを返します。第二引数があるかどうかによって第一引数の解釈は大きく異なります。第二引数がない場合、単一の引数は " +":term:`iterable` プロトコル (:meth:`~object.__iter__` メソッド) " +"をサポートするコレクションオブジェクトか、またはシーケンスプロトコル (``0`` から始まる整数を引数にとる " +":meth:`~object.__getitem__` メソッド) " +"をサポートするオブジェクトでなければなりません。第一引数がどちらのプロトコルもサポートしない場合は :exc:`TypeError` " +"例外が送出されます。第二引数 *sentinel* " +"が与えられた場合、第一引数は呼び出し可能オブジェクトでなければなりません。この場合に生成されるイテレータは " +":meth:`~iterator.__next__` メソッドを呼び出すごとに引数なしで *callable* を呼び出します; 戻り値が " +"*sentinel* と等しければ、 :exc:`StopIteration` が送出されます。それ以外の場合は戻り値がそのまま返されます。" + +#: ../../builtins/functions.rst:1162 +msgid "See also :ref:`typeiter`." +msgstr ":ref:`typeiter` も見てください。" + +#: ../../builtins/functions.rst:1164 +msgid "" +"One useful application of the second form of :func:`iter` is to build a " +"block-reader. For example, reading fixed-width blocks from a binary database" +" file until the end of file is reached::" +msgstr "" +"2引数形式の :func:`iter` の便利な利用方法の1つは、ブロックリーダーの構築です。\n" +"例えば、バイナリのデータベースファイルから固定幅のブロックをファイルの終端に到達するまで読み出すには次のようにします::" + +#: ../../builtins/functions.rst:1168 +msgid "" +"from functools import partial\n" +"with open('mydata.db', 'rb') as f:\n" +" for block in iter(partial(f.read, 64), b''):\n" +" process_block(block)" +msgstr "" +"from functools import partial\n" +"with open('mydata.db', 'rb') as f:\n" +" for block in iter(partial(f.read, 64), b''):\n" +" process_block(block)" + +#: ../../builtins/functions.rst:1176 +msgid "" +"Return the length (the number of items) of an object. The argument may be a" +" sequence (such as a string, bytes, tuple, list, or range) or a collection " +"(such as a dictionary, set, or frozen set)." +msgstr "" +"オブジェクトの長さ (要素の数) を返します。引数はシーケンス (文字列、バイト列、タプル、リスト、range 等) かコレクション " +"(辞書、集合、凍結集合等) です。" + +#: ../../builtins/functions.rst:1182 +msgid "" +"``len`` raises :exc:`OverflowError` on lengths larger than " +":data:`sys.maxsize`, such as :class:`range(2 ** 100) `." +msgstr "" +"``len`` は、例えば :class:`range(2 ** 100) ` のような、 :data:`sys.maxsize` " +"を超える長さに対して :exc:`OverflowError` を送出します。" + +#: ../../builtins/functions.rst:1190 +msgid "" +"Rather than being a function, :class:`list` is actually a mutable sequence " +"type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." +msgstr "" +":class:`list` は、実際には関数ではなくミュータブルなシーケンス型で、 :ref:`typesseq-list` と " +":ref:`typesseq` にドキュメント化されています。" + +#: ../../builtins/functions.rst:1196 +msgid "" +"Return a mapping object representing the current local symbol table, with " +"variable names as the keys, and their currently bound references as the " +"values." +msgstr "" +"現在のローカル シンボル テーブルを表すマッピング オブジェクトを返します。これは変数名をキーとし、現在バインドされている参照を値とします。" + +#: ../../builtins/functions.rst:1200 +msgid "" +"At module scope, as well as when using :func:`exec` or :func:`eval` with a " +"single namespace, this function returns the same namespace as " +":func:`globals`." +msgstr "" +"モジュール スコープでは、単一の名前空間で :func:`exec` や :func:`eval` を使う場合と同じく、この関数は " +":func:`globals` と同じ名前空間を返します。" + +#: ../../builtins/functions.rst:1204 +msgid "" +"At class scope, it returns the namespace that will be passed to the " +"metaclass constructor." +msgstr "クラス スコープでは、メタクラス コンストラクタに渡された名前空間を返します。" + +#: ../../builtins/functions.rst:1207 +msgid "" +"When using ``exec()`` or ``eval()`` with separate local and global " +"arguments, it returns the local namespace passed in to the function call." +msgstr "" +"``exec()`` や ``eval()`` が引数 local と global " +"が分けて使われてる場合では、関数の呼び出しで渡されたローカル名前空間を返します。" + +#: ../../builtins/functions.rst:1210 +msgid "" +"In all of the above cases, each call to ``locals()`` in a given frame of " +"execution will return the *same* mapping object. Changes made through the " +"mapping object returned from ``locals()`` will be visible as assigned, " +"reassigned, or deleted local variables, and assigning, reassigning, or " +"deleting local variables will immediately affect the contents of the " +"returned mapping object." +msgstr "" +"上記どの場合でも、特定の実行フレーム内での各 ``locals()`` は *同じ* マッピング オブジェクトを返します。 ``locals()`` " +"から返されたマッピング " +"オブジェクトを通じて行われた変更は、代入、再代入、または削除されたローカル変数として可視化されます。そしてローカル変数の代入、再代入、または削除は、返されたマッピング" +" オブジェクトの内容へ直ちに反映されます。" + +#: ../../builtins/functions.rst:1217 +msgid "" +"In an :term:`optimized scope` (including functions, generators, and " +"coroutines), each call to ``locals()`` instead returns a fresh dictionary " +"containing the current bindings of the function's local variables and any " +"nonlocal cell references. In this case, name binding changes made via the " +"returned dict are *not* written back to the corresponding local variables or" +" nonlocal cell references, and assigning, reassigning, or deleting local " +"variables and nonlocal cell references does *not* affect the contents of " +"previously returned dictionaries." +msgstr "" +":term:`optimized scope` (関数、ジェネレーター、コルーチンを含む)では、 ``locals()`` " +"を呼び出すと、代わりに関数のローカル変数と非ローカル " +"セル参照の現在のバインディングを含んだ新しい辞書を返します。この場合、返された辞書を使って行われた変更は、対応するローカル変数や非ローカル セル参照には" +" *書き戻されません* 。また、ローカル変数や非ローカル セル参照へ代入、再代入、削除を行っても、以前に返された辞書の内容には *影響しません* 。" + +#: ../../builtins/functions.rst:1226 +msgid "" +"Calling ``locals()`` as part of a comprehension in a function, generator, or" +" coroutine is equivalent to calling it in the containing scope, except that " +"the comprehension's initialised iteration variables will be included. In " +"other scopes, it behaves as if the comprehension were running as a nested " +"function." +msgstr "" +"``locals()`` " +"呼び出しが関数、ジェネレータ、コルーチン内の内包表記内にあれば、これはそれを含むスコープから呼び出すことと同等です。ただし内包表記の初期化された反復変数が含まれます。他のスコープでは、内包表記がネストされた関数として実行されているかのように振舞います。" + +#: ../../builtins/functions.rst:1232 +msgid "" +"Calling ``locals()`` as part of a generator expression is equivalent to " +"calling it in a nested generator function." +msgstr "``locals()`` 呼び出しがジェネレータ式の一部であれば、ネストされたジェネレータ関数内の呼び出しと同等です。" + +#: ../../builtins/functions.rst:1235 +msgid "" +"The behaviour of ``locals()`` in a comprehension has been updated as " +"described in :pep:`709`." +msgstr "内包表記における ``locals()`` の振る舞い は、 :pep:`709` で説明されているように更新されました。" + +#: ../../builtins/functions.rst:1239 +msgid "" +"As part of :pep:`667`, the semantics of mutating the mapping objects " +"returned from this function are now defined. The behavior in " +":term:`optimized scopes ` is now as described above. Aside " +"from being defined, the behaviour in other scopes remains unchanged from " +"previous versions." +msgstr "" +":pep:`667` の一部として、この関数から返されるマッピングオブジェクトを変更するセマンティクスが定義されました。 " +":term:`optimized scopes ` " +"の振る舞いは上記のようになりました。定義されただけで、その他のスコープの振る舞いは以前のバージョンのままです。" + +#: ../../builtins/functions.rst:1249 +msgid "" +"Return an iterator that applies *function* to every item of *iterable*, " +"yielding the results. If additional *iterables* arguments are passed, " +"*function* must take that many arguments and is applied to the items from " +"all iterables in parallel. With multiple iterables, the iterator stops when" +" the shortest iterable is :term:`exhausted`. If *strict* is ``True`` and " +"one of the iterables is exhausted before the others, a :exc:`ValueError` is " +"raised. For cases where the function inputs are already arranged into " +"argument tuples, see :func:`itertools.starmap`." +msgstr "" + +#: ../../builtins/functions.rst:1258 +msgid "Added the *strict* parameter." +msgstr "*strict* パラメータが追加されました。" + +#: ../../builtins/functions.rst:1266 +msgid "" +"Return the largest item in an iterable or the largest of two or more " +"arguments." +msgstr "iterable の中で最大の要素、または2つ以上の引数の中で最大のものを返します。" + +#: ../../builtins/functions.rst:1269 +msgid "" +"If one positional argument is provided, it should be an :term:`iterable`. " +"The largest item in the iterable is returned. If two or more positional " +"arguments are provided, the largest of the positional arguments is returned." +msgstr "" +"位置引数が1つだけ与えられた場合、それは空でない :term:`iterable` でなくてはいけません。その iterable " +"の最大の要素が返されます。2 つ以上のキーワード無しの位置引数が与えられた場合、その位置引数の中で最大のものが返されます。" + +#: ../../builtins/functions.rst:1274 ../../builtins/functions.rst:1312 +msgid "" +"There are two optional keyword-only arguments. The *key* argument specifies " +"a one-argument ordering function like that used for :meth:`list.sort`. The " +"*default* argument specifies an object to return if the provided iterable is" +" empty. If the iterable is empty and *default* is not provided, a " +":exc:`ValueError` is raised." +msgstr "" +"任意のキーワード専用引数が 2 つあります。\n" +"*key* 引数は引数を 1 つ取る順序関数 (:meth:`list.sort` のもののように) を指定します。\n" +"*default* 引数は与えられたイテラブルが空の場合に返すオブジェクトを指定します。\n" +"イテラブルが空で *default* が与えられていない場合 :exc:`ValueError` が送出されます。" + +#: ../../builtins/functions.rst:1280 +msgid "" +"If multiple items are maximal, the function returns the first one " +"encountered. This is consistent with other sort-stability preserving tools " +"such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and " +"``heapq.nlargest(1, iterable, key=keyfunc)``." +msgstr "" +"最大の要素が複数あるとき、この関数はそのうち最初に現れたものを返します。これは、``sorted(iterable, key=keyfunc, " +"reverse=True)[0]`` や ``heapq.nlargest(1, iterable, key=keyfunc)`` " +"のような、他のソート安定性を維持するツールと両立します。" + +#: ../../builtins/functions.rst:1285 ../../builtins/functions.rst:1323 +msgid "Added the *default* keyword-only parameter." +msgstr "キーワード専用引数 *default* が追加されました。" + +#: ../../builtins/functions.rst:1288 ../../builtins/functions.rst:1326 +msgid "The *key* can be ``None``." +msgstr "*key* 引数が ``None`` であることを許容します。" + +#: ../../builtins/functions.rst:1296 +msgid "" +"Return a \"memory view\" object created from the given argument. See " +":ref:`typememoryview` for more information." +msgstr "" +"与えられたオブジェクトから作られた \"メモリビュー\" オブジェクトを返します。詳しくは :ref:`typememoryview` " +"を参照してください。" + +#: ../../builtins/functions.rst:1304 +msgid "" +"Return the smallest item in an iterable or the smallest of two or more " +"arguments." +msgstr "iterable の中で最小の要素、または2つ以上の引数の中で最小のものを返します。" + +#: ../../builtins/functions.rst:1307 +msgid "" +"If one positional argument is provided, it should be an :term:`iterable`. " +"The smallest item in the iterable is returned. If two or more positional " +"arguments are provided, the smallest of the positional arguments is " +"returned." +msgstr "" +"位置引数が1つだけ与えられた場合、それは空でない :term:`iterable` でなくてはいけません。その iterable " +"の最小の要素が返されます。2 つ以上のキーワード無しの位置引数が与えられた場合、その位置引数の中で最小のものが返されます。" + +#: ../../builtins/functions.rst:1318 +msgid "" +"If multiple items are minimal, the function returns the first one " +"encountered. This is consistent with other sort-stability preserving tools " +"such as ``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1, " +"iterable, key=keyfunc)``." +msgstr "" +"最小の要素が複数あるとき、この関数はそのうち最初に現れたものを返します。これは、``sorted(iterable, key=keyfunc)[0]``" +" や ``heapq.nsmallest(1, iterable, key=keyfunc)`` " +"のような、他のソート安定性を維持するツールと両立します。" + +#: ../../builtins/functions.rst:1333 +msgid "" +"Retrieve the next item from the :term:`iterator` by calling its " +":meth:`~iterator.__next__` method. If *default* is given, it is returned if" +" the iterator is :term:`exhausted`, otherwise :exc:`StopIteration` is " +"raised." +msgstr "" + +#: ../../builtins/functions.rst:1340 +msgid "" +"This is the ultimate base class of all other classes. It has methods that " +"are common to all instances of Python classes. When the constructor is " +"called, it returns a new featureless object. The constructor does not accept" +" any arguments." +msgstr "" +"これが、あらゆるクラスに継承される大本のベースクラスです。このクラスが持つメソッドは、どの Python " +"クラスのインスタンスにもあります。コンストラクタを呼び出すと、まっさらなオブジェクトが返ります。コンストラクタに引数は指定できません。" + +#: ../../builtins/functions.rst:1347 +msgid "" +":class:`object` instances do *not* have :attr:`~object.__dict__` attributes," +" so you can't assign arbitrary attributes to an instance of :class:`object`." +msgstr "" +":class:`object` インスタンスは :attr:`~object.__dict__` 属性を *持たない* ので、 " +":class:`object` クラスのインスタンスに任意の属性を代入することはできません。" + +#: ../../builtins/functions.rst:1354 +msgid "" +"Convert an integer number to an octal string prefixed with \"0o\". The " +"result is a valid Python expression. If *integer* is not a Python " +":class:`int` object, it has to define an :meth:`~object.__index__` method " +"that returns an integer. For example:" +msgstr "" +"整数を先頭に \"0o\" が付いた 8 進文字列に変換します。\n" +"結果は Python の式としても使える形式になります。\n" +"*integer* が Python の :class:`int` オブジェクトでない場合、整数を返す :meth:`~object.__index__` メソッドが定義されていなければなりません。\n" +"例えば、次のようになります:" + +#: ../../builtins/functions.rst:1364 +msgid "" +"If you want to convert an integer number to an octal string either with the " +"prefix \"0o\" or not, you can use either of the following ways." +msgstr "整数を接頭辞 \"0o\" 付きや \"0o\" 無しの 8 進文字列に変換したい場合は、次に挙げる方法のいずれかを使ってください。" + +#: ../../builtins/functions.rst:1381 +msgid "" +"Open *file* and return a corresponding :term:`file object`. If the file " +"cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more" +" examples of how to use this function." +msgstr "" +"*file* を開き、対応する :term:`ファイルオブジェクト ` を返します。ファイルを開くことができなければ、:exc:`OSError` が送出されます。\n" +"この関数の利用例について、 :ref:`tut-files` を参照してください。" + +#: ../../builtins/functions.rst:1385 +msgid "" +"*file* is a :term:`path-like object` giving the pathname (absolute or " +"relative to the current working directory) of the file to be opened or an " +"integer file descriptor of the file to be wrapped. (If a file descriptor is" +" given, it is closed when the returned I/O object is closed unless *closefd*" +" is set to ``False``.)" +msgstr "" +"*file* は :term:`path-like object` で、開くファイルのパス名 (絶対パスまたは現在の作業ディレクトリからの相対パス) " +"あるいはラップするファイルの整数のファイルデスクリプタを与えます。 (ファイルデスクリプタが与えられた場合、 *closefd* が ``False``" +" に設定されていないかぎり、この関数が返す I/O オブジェクトがクローズされるときにファイルデスクリプタもクローズされます。)" + +#: ../../builtins/functions.rst:1391 +msgid "" +"*mode* is an optional string that specifies the mode in which the file is " +"opened. It defaults to ``'r'`` which means open for reading in text mode. " +"Other common values are ``'w'`` for writing (truncating the file if it " +"already exists), ``'x'`` for exclusive creation, and ``'a'`` for appending " +"(which on *some* Unix systems, means that *all* writes append to the end of " +"the file regardless of the current seek position). In text mode, if " +"*encoding* is not specified the encoding used is platform-dependent: " +":func:`locale.getencoding` is called to get the current locale encoding. " +"(For reading and writing raw bytes use binary mode and leave *encoding* " +"unspecified.) The available modes are:" +msgstr "" +"*mode* オプション文字列はファイルが開かれる際のモードを指定します。デフォルトは ``'r'`` " +"で、読み込み用にテキストモードで開くという意味です。その他によく使われるモードとして、書き込み用の ``'w'`` " +"(ファイルが既に存在する場合は上書きします) 、排他的な生成をあらわす ``'x'`` 、そして追記用の ``'a'`` ( *いくつかの* Unix " +"システムでは、 *すべての* 書き込みは現在のシーク位置にかかわらずファイルの末尾に追記する、という意味です) です。テキストモードで " +"*encoding* が指定されない場合に使われるエンコーディングは、プラットフォーム依存です: 現在のロケールエンコーディングを取得するために " +":func:`locale.getencoding` が呼ばれます。 (生のバイトデータを読み書きする際にはバイナリモードを使い、 *encoding*" +" は指定しません。) 指定できるモードは以下の通りです:" + +#: ../../builtins/functions.rst:1408 +msgid "Character" +msgstr "文字" + +#: ../../builtins/functions.rst:1408 +msgid "Meaning" +msgstr "意味" + +#: ../../builtins/functions.rst:1410 +msgid "``'r'``" +msgstr "``'r'``" + +#: ../../builtins/functions.rst:1410 +msgid "open for reading (default)" +msgstr "読み込み用に開く (デフォルト)" + +#: ../../builtins/functions.rst:1411 +msgid "``'w'``" +msgstr "``'w'``" + +#: ../../builtins/functions.rst:1411 +msgid "open for writing, truncating the file first" +msgstr "書き込み用に開き、まずファイルを切り詰める" + +#: ../../builtins/functions.rst:1412 +msgid "``'x'``" +msgstr "``'x'``" + +#: ../../builtins/functions.rst:1412 +msgid "open for exclusive creation, failing if the file already exists" +msgstr "排他的な生成に開き、ファイルが存在する場合は失敗する" + +#: ../../builtins/functions.rst:1413 +msgid "``'a'``" +msgstr "``'a'``" + +#: ../../builtins/functions.rst:1413 +msgid "open for writing, appending to the end of file if it exists" +msgstr "書き込み用に開き、ファイルが存在する場合には末尾に追記する" + +#: ../../builtins/functions.rst:1414 +msgid "``'b'``" +msgstr "``'b'``" + +#: ../../builtins/functions.rst:1414 ../../builtins/functions.rst:1530 +msgid "binary mode" +msgstr "バイナリモード" + +#: ../../builtins/functions.rst:1415 +msgid "``'t'``" +msgstr "``'t'``" + +#: ../../builtins/functions.rst:1415 +msgid "text mode (default)" +msgstr "テキストモード (デフォルト)" + +#: ../../builtins/functions.rst:1416 +msgid "``'+'``" +msgstr "``'+'``" + +#: ../../builtins/functions.rst:1416 +msgid "open for updating (reading and writing)" +msgstr "更新用に開く (読み込み・書き込み用)" + +#: ../../builtins/functions.rst:1419 +msgid "" +"The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " +"Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and" +" ``'r+b'`` open the file with no truncation." +msgstr "" +"デフォルトのモードは ``'r'`` (テキストの読み込み用に開く、 ``'rt'`` と同義) です。 ``'w+'`` と ``'w+b'`` " +"はファイルを開いて上書きします。 ``'r+'`` と ``'r+b'`` はファイルを上書きせずに開きます。" + +#: ../../builtins/functions.rst:1423 +msgid "" +"As mentioned in the :ref:`io-overview`, Python distinguishes between binary " +"and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " +"argument) return contents as :class:`bytes` objects without any decoding. " +"In text mode (the default, or when ``'t'`` is included in the *mode* " +"argument), the contents of the file are returned as :class:`str`, the bytes " +"having been first decoded using a platform-dependent encoding or using the " +"specified *encoding* if given." +msgstr "" +":ref:`io-overview` で触れられているように、Python はバイナリとテキストの I/O を区別します。(*mode* 引数に " +"``'b'`` を含めて) バイナリモードで開かれたファイルは、内容をいかなるデコーディングもせずに :class:`bytes` " +"オブジェクトとして返します。(デフォルトや、 *mode* 引数に ``'t'`` が含まれたときの) テキストモードでは、ファイルの内容は " +":class:`str` として返され、バイト列はまず、プラットフォーム依存のエンコーディングか、*encoding* " +"が指定された場合は指定されたエンコーディングを使ってデコードされます。" + +#: ../../builtins/functions.rst:1433 +msgid "" +"Python doesn't depend on the underlying operating system's notion of text " +"files; all the processing is done by Python itself, and is therefore " +"platform-independent." +msgstr "" +"Python は、下層のオペレーティングシステムがテキストファイルをどう認識するかには依存しません; すべての処理は Python " +"自身で行われ、よってプラットフォーム非依存です。" + +#: ../../builtins/functions.rst:1437 +msgid "" +"*buffering* is an optional integer used to set the buffering policy. Pass 0" +" to switch buffering off (only allowed in binary mode), 1 to select line " +"buffering (only usable when writing in text mode), and an integer > 1 to " +"indicate the size in bytes of a fixed-size chunk buffer. Note that " +"specifying a buffer size this way applies for binary buffered I/O, but " +"``TextIOWrapper`` (i.e., files opened with ``mode='r+'``) would have another" +" buffering. To disable buffering in ``TextIOWrapper``, consider using the " +"``write_through`` flag for :func:`io.TextIOWrapper.reconfigure`. When no " +"*buffering* argument is given, the default buffering policy works as " +"follows:" +msgstr "" +"*buffering* はオプションの整数で、バッファリングのポリシーを設定するために使われます。 " +"バッファリングを無効化するためには0を渡してください (バイナリモードでのみ設定可能です)。また行単位でのバッファリングには1を設定してください " +"(テキストモードでの書き込み時のみ有効です)。固定サイズのチャンクバッファに対するサイズをバイト単位で指定したい場合は、1より大きい整数を渡してください。この形式でバッファサイズを指定した場合、バイナリ形式でバッファリングをサポートする" +" I/O (buffered I/O) にはそのまま適用されますが、 ``TextIOWrapper`` (すなわち ``mode='r+'`` " +"のモードでオープンされたファイル) では別のバッファリングを行うかもしれません。 ``TextIOWrapper`` でバッファリングを無効化するには、" +" :func:`io.TextIOWrapper.reconfigure` で ``write_through`` フラグを使うことを検討してください。" +" *buffering* 引数が与えられなかった場合、デフォルトのバッファリングポリシーは以下のように動作します:" + +#: ../../builtins/functions.rst:1447 +msgid "" +"Binary files are buffered in fixed-size chunks; the size of the buffer is " +"``max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE)`` when the device block " +"size is available. On most systems, the buffer will typically be 128 " +"kilobytes long." +msgstr "" +"バイナリモードでは、固定サイズのチャンクバッファが使われます。バッファのサイズは、デバイスのブロックサイズが取得できる場合は " +"``max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE)`` です。ほとんどの環境では、このバッファは通常 " +"128 キロバイトです。" + +#: ../../builtins/functions.rst:1452 +msgid "" +"\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " +"returns ``True``) use line buffering. Other text files use the policy " +"described above for binary files." +msgstr "" +"「対話的な」テキストファイル (:meth:`~io.IOBase.isatty` が ``True`` を返すファイル) " +"は行バッファリングを使用します。 その他のテキストファイルは、上で説明したバイナリファイル用の方針を使用します。" + +#: ../../builtins/functions.rst:1456 +msgid "" +"*encoding* is the name of the encoding used to decode or encode the file. " +"This should only be used in text mode. The default encoding is platform " +"dependent (whatever :func:`locale.getencoding` returns), but any :term:`text" +" encoding` supported by Python can be used. See the :mod:`codecs` module for" +" the list of supported encodings." +msgstr "" +"*encoding* はファイルのエンコードやデコードに使われる :term:`text encoding` " +"の名前です。このオプションはテキストモードでのみ使用してください。デフォルトエンコーディングはプラットフォーム依存 " +"(:func:`locale.getencoding` が返すもの) " +"ですが、Pythonでサポートされているエンコーディングはどれでも使えます。詳しくは :mod:`codecs` " +"モジュール内のサポートしているエンコーディングのリストを参照してください。" + +#: ../../builtins/functions.rst:1462 +msgid "" +"*errors* is an optional string that specifies how encoding and decoding " +"errors are to be handled—this cannot be used in binary mode. A variety of " +"standard error handlers are available, though any error handling name that " +"has been registered with :func:`codecs.register_error` is also valid. The " +"standard names can be found in :ref:`error-handlers`." +msgstr "" + +#: ../../builtins/functions.rst:1474 +msgid "" +"*newline* determines how to parse newline characters from the stream. It can" +" be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " +"follows:" +msgstr "" +"*newline* はストリームから受け取った改行文字をどのようにパースするかを決定します。 ``None``, ``''``, ``'\\n'``, " +"``'\\r'``, または ``'\\r\\n'`` のいずれかを指定できます。これは以下のように動作します:" + +#: ../../builtins/functions.rst:1478 +msgid "" +"When reading input from the stream, if *newline* is ``None``, universal " +"newlines mode is enabled. Lines in the input can end in ``'\\n'``, " +"``'\\r'``, or ``'\\r\\n'``, and these are translated into ``'\\n'`` before " +"being returned to the caller. If it is ``''``, universal newlines mode is " +"enabled, but line endings are returned to the caller untranslated. If it " +"has any of the other legal values, input lines are only terminated by the " +"given string, and the line ending is returned to the caller untranslated." +msgstr "" +"ストリームからの入力の読み込み時、*newline* が ``None`` の場合、ユニバーサル改行モードが有効になります。入力中の行は " +"``'\\n'``, ``'\\r'``, または ``'\\r\\n'`` で終わり、呼び出し元に返される前に ``'\\n'`` に変換されます。 " +"``''`` " +"の場合、ユニバーサル改行モードは有効になりますが、行末は変換されずに呼び出し元に返されます。その他の正当な値の場合、入力行は与えられた文字列でのみ終わり、行末は変換されずに呼び出し元に返されます。" + +#: ../../builtins/functions.rst:1486 +msgid "" +"When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " +"characters written are translated to the system default line separator, " +":data:`os.linesep`. If *newline* is ``''`` or ``'\\n'``, no translation " +"takes place. If *newline* is any of the other legal values, any ``'\\n'`` " +"characters written are translated to the given string." +msgstr "" +"ストリームへの出力の書き込み時、*newline* が ``None`` の場合、全ての ``'\\n'`` 文字はシステムのデフォルトの行セパレータ " +":data:`os.linesep` に変換されます。 *newline* が ``''`` または ``'\\n'`` " +"の場合は変換されません。*newline* がその他の正当な値の場合、全ての ``'\\n'`` 文字は与えられた文字列に変換されます。" + +#: ../../builtins/functions.rst:1492 +msgid "" +"If *closefd* is ``False`` and a file descriptor rather than a filename was " +"given, the underlying file descriptor will be kept open when the file is " +"closed. If a filename is given *closefd* must be ``True`` (the default); " +"otherwise, an error will be raised." +msgstr "" +"*closefd* が ``False`` で、ファイル名ではなくてファイル記述子が与えられた場合、下層のファイル記述子はファイルが閉じられた後も開いたままとなります。\n" +"ファイル名が与えられた場合、*closefd* は ``True`` (デフォルト値) でなければなりません。\n" +"そうでない場合エラーが送出されます。" + +#: ../../builtins/functions.rst:1497 +msgid "" +"A custom opener can be used by passing a callable as *opener*. The " +"underlying file descriptor for the file object is then obtained by calling " +"*opener* with (*file*, *flags*). *opener* must return an open file " +"descriptor (passing :mod:`os.open` as *opener* results in functionality " +"similar to passing ``None``)." +msgstr "" +"呼び出し可能オブジェクトを *opener* " +"として与えることで、カスタムのオープナーが使えます。そしてファイルオブジェクトの下層のファイル記述子は、*opener* を (*file*, " +"*flags*) で呼び出して得られます。*opener* は開いたファイル記述子を返さなければなりません。 (:mod:`os.open` を " +"*opener* として渡すと、``None`` を渡したのと同様の機能になります)。" + +#: ../../builtins/functions.rst:1503 +msgid "The newly created file is :ref:`non-inheritable `." +msgstr "新たに作成されたファイルは :ref:`継承不可 ` です。" + +#: ../../builtins/functions.rst:1505 +msgid "" +"The following example uses the :ref:`dir_fd ` parameter of the " +":func:`os.open` function to open a file relative to a given directory::" +msgstr "" +"次の例は :func:`os.open` 関数の :ref:`dir_fd ` " +"引数を使い、与えられたディレクトリからの相対パスで指定されたファイルを開きます::" + +#: ../../builtins/functions.rst:1508 +msgid "" +">>> import os\n" +">>> dir_fd = os.open('somedir', os.O_RDONLY)\n" +">>> def opener(path, flags):\n" +"... return os.open(path, flags, dir_fd=dir_fd)\n" +"...\n" +">>> with open('spamspam.txt', 'w', opener=opener) as f:\n" +"... print('This will be written to somedir/spamspam.txt', file=f)\n" +"...\n" +">>> os.close(dir_fd) # don't leak a file descriptor" +msgstr "" +">>> import os\n" +">>> dir_fd = os.open('somedir', os.O_RDONLY)\n" +">>> def opener(path, flags):\n" +"... return os.open(path, flags, dir_fd=dir_fd)\n" +"...\n" +">>> with open('spamspam.txt', 'w', opener=opener) as f:\n" +"... print('This will be written to somedir/spamspam.txt', file=f)\n" +"...\n" +">>> os.close(dir_fd) # ファイル記述子の解放漏れがないように" + +#: ../../builtins/functions.rst:1518 +msgid "" +"The type of :term:`file object` returned by the :func:`open` function " +"depends on the mode. When :func:`open` is used to open a file in a text " +"mode (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, etc.), it returns a subclass of " +":class:`io.TextIOBase` (specifically :class:`io.TextIOWrapper`). When used " +"to open a file in a binary mode with buffering, the returned class is a " +"subclass of :class:`io.BufferedIOBase`. The exact class varies: in read " +"binary mode, it returns an :class:`io.BufferedReader`; in write binary and " +"append binary modes, it returns an :class:`io.BufferedWriter`, and in " +"read/write mode, it returns an :class:`io.BufferedRandom`. When buffering " +"is disabled, the raw stream, a subclass of :class:`io.RawIOBase`, " +":class:`io.FileIO`, is returned." +msgstr "" +":func:`open` 関数が返す :term:`file object` の型はモードに依存します。 :func:`open` をファイルをテキストモード (``'w'``, ``'r'``, ``'wt'``, ``'rt'``, など) で開くのに使ったときは :class:`io.TextIOBase` (特に :class:`io.TextIOWrapper`) のサブクラスを返します。\n" +"ファイルをバッファリング付きのバイナリモードで開くのに使ったときは :class:`io.BufferedIOBase` のサブクラスを返します。\n" +"実際のクラスは様々です。\n" +"読み込みバイナリモードでは :class:`io.BufferedReader` を返します。\n" +"書き込みバイナリモードや追記バイナリモードでは :class:`io.BufferedWriter` を返します。\n" +"読み書きモードでは :class:`io.BufferedRandom` を返します。\n" +"バッファリングが無効なときはrawストリーム、すなわち :class:`io.RawIOBase` のサブクラスである :class:`io.FileIO` を返します。" + +#: ../../builtins/functions.rst:1539 +msgid "" +"See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " +"(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, " +":mod:`tempfile`, and :mod:`shutil`." +msgstr "" +":mod:`fileinput` 、(:func:`open` が宣言された場所である) :mod:`io` 、 :mod:`os` 、 " +":mod:`os.path` 、 :mod:`tempfile` 、 :mod:`shutil` などの、ファイル操作モジュールも参照してください。" + +#: ../../builtins/functions.rst:1543 +msgid "" +"Raises an :ref:`auditing event ` ``open`` with arguments ``path``," +" ``mode``, ``flags``." +msgstr "" +"引数 ``path``, ``mode``, ``flags`` を指定して :ref:`監査イベント ` ``open`` " +"を送出します。" + +#: ../../builtins/functions.rst:1545 +msgid "" +"The ``mode`` and ``flags`` arguments may have been modified or inferred from" +" the original call." +msgstr "``mode`` と ``flags`` の2つの引数は呼び出し時の値から修正されたり、推量により設定されたりする可能性があります。" + +#: ../../builtins/functions.rst:1550 +msgid "The *opener* parameter was added." +msgstr "*opener* 引数を追加しました。" + +#: ../../builtins/functions.rst:1551 +msgid "The ``'x'`` mode was added." +msgstr "``'x'`` モードを追加しました。" + +#: ../../builtins/functions.rst:1552 +msgid "" +":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." +msgstr "以前は :exc:`IOError` が送出されました; それは現在 :exc:`OSError` のエイリアスです。" + +#: ../../builtins/functions.rst:1553 +msgid "" +":exc:`FileExistsError` is now raised if the file opened in exclusive " +"creation mode (``'x'``) already exists." +msgstr "" +"既存のファイルを 排他的生成モード(``'x'``)で開いた場合、 :exc:`FileExistsError` を送出するようになりました。" + +#: ../../builtins/functions.rst:1558 +msgid "The file is now non-inheritable." +msgstr "ファイルが継承不可になりました。" + +#: ../../builtins/functions.rst:1562 +msgid "" +"If the system call is interrupted and the signal handler does not raise an " +"exception, the function now retries the system call instead of raising an " +":exc:`InterruptedError` exception (see :pep:`475` for the rationale)." +msgstr "" +"システムコールが中断されシグナルハンドラが例外を送出しなかった場合、この関数は :exc:`InterruptedError` " +"例外を送出する代わりにシステムコールを再試行するようになりました (論拠については :pep:`475` を参照してください)。" + +#: ../../builtins/functions.rst:1565 +msgid "The ``'namereplace'`` error handler was added." +msgstr "``'namereplace'`` エラーハンドラが追加されました。" + +#: ../../builtins/functions.rst:1569 +msgid "Support added to accept objects implementing :class:`os.PathLike`." +msgstr ":class:`os.PathLike` を実装したオブジェクトを受け入れるようになりました。" + +#: ../../builtins/functions.rst:1570 +msgid "" +"On Windows, opening a console buffer may return a subclass of " +":class:`io.RawIOBase` other than :class:`io.FileIO`." +msgstr "" +"Windowsでは、コンソールバッファのオープンは、:class:`io.FileIO` ではなく、:class:`io.RawIOBase` " +"のサブクラスを返すでしょう。" + +#: ../../builtins/functions.rst:1573 +msgid "The ``'U'`` mode has been removed." +msgstr "``'U'`` モードは削除されました。" + +#: ../../builtins/functions.rst:1578 +msgid "Return the ordinal value of a character." +msgstr "文字の番号を返します。" + +#: ../../builtins/functions.rst:1580 +msgid "" +"If the argument is a one-character string, return the Unicode code point of " +"that character. For example, ``ord('a')`` returns the integer ``97`` and " +"``ord('€')`` (Euro sign) returns ``8364``. This is the inverse of " +":func:`chr`." +msgstr "" +"引数が1文字の文字列の場合は、その文字の Unicode コードポイントを返します。例えば ``ord('a')`` は ``97`` 、 " +"``ord('€')`` (ユーロ) は ``8364`` になります。 :func:`chr` と反対の操作です。" + +#: ../../builtins/functions.rst:1585 +msgid "" +"If the argument is a :class:`bytes` or :class:`bytearray` object of length " +"1, return its single byte value. For example, ``ord(b'a')`` returns the " +"integer ``97``." +msgstr "" +"引数が 長さ1の :class:`bytes` または :class:`bytearray` である場合は、そのバイト値を返します。例えば、 " +"``ord(b'a')`` は ``97`` になります。" + +#: ../../builtins/functions.rst:1592 +msgid "" +"Return *base* to the power *exp*; if *mod* is present, return *base* to the " +"power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) %" +" mod``). The two-argument form ``pow(base, exp)`` is equivalent to using the" +" power operator: ``base**exp``." +msgstr "" +"*base* の *exp* 乗を返します; *mod* があれば、*base* の *exp* 乗に対する *mod* の剰余を返します " +"(``pow(base, exp) % mod`` より効率よく計算されます)。二引数の形式 ``pow(base, exp)`` " +"は、冪乗演算子を使った ``base**exp`` と等価です。" + +#: ../../builtins/functions.rst:1597 +msgid "" +"When arguments are builtin numeric types with mixed operand types, the " +"coercion rules for binary arithmetic operators apply. For :class:`int` " +"operands, the result has the same type as the operands (after coercion) " +"unless the second argument is negative; in that case, all arguments are " +"converted to float and a float result is delivered. For example, ``pow(10, " +"2)`` returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative " +"base of type :class:`int` or :class:`float` and a non-integral exponent, a " +"complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value " +"close to ``3j``. Whereas, for a negative base of type :class:`int` or " +":class:`float` with an integral exponent, a float result is delivered. For " +"example, ``pow(-9, 2.0)`` returns ``81.0``." +msgstr "" + +#: ../../builtins/functions.rst:1609 +msgid "" +"For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " +"also be of integer type and *mod* must be nonzero. If *mod* is present and " +"*exp* is negative, *base* must be relatively prime to *mod*. In that case, " +"``pow(inv_base, -exp, mod)`` is returned, where *inv_base* is an inverse to " +"*base* modulo *mod*." +msgstr "" +"*base* と *exp* が :class:`int` オペランドで *mod* が存在するとき、 *mod* " +"もまた整数型でなければならず、かつゼロであってはいけません。 *mod* が存在して *exp* が負の整数の場合、 *base* は *mod* " +"と互いに素 (最大公約数が1) でなければなりません。この場合、 *inv_base* を *base* に対する *mod* を法とするモジュラ逆数 " +"(*base* と *inv_base* の積を *mod* で割った余りが1になるような数) として、 ``pow(inv_base, -exp, " +"mod)`` が返されます。" + +#: ../../builtins/functions.rst:1615 +msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" +msgstr "以下は ``97`` を法とする ``38`` のモジュラ逆数の計算例です::" + +#: ../../builtins/functions.rst:1617 +msgid "" +">>> pow(38, -1, mod=97)\n" +"23\n" +">>> 23 * 38 % 97 == 1\n" +"True" +msgstr "" +">>> pow(38, -1, mod=97)\n" +"23\n" +">>> 23 * 38 % 97 == 1\n" +"True" + +#: ../../builtins/functions.rst:1622 +msgid "" +"For :class:`int` operands, the three-argument form of ``pow`` now allows the" +" second argument to be negative, permitting computation of modular inverses." +msgstr "" +":class:`int` オペランドに対して、三引数形式の ``pow`` " +"で第二引数に負の値を取ることができるようになりました。これによりモジュラ逆数の計算が可能になります。" + +#: ../../builtins/functions.rst:1627 +msgid "" +"Allow keyword arguments. Formerly, only positional arguments were " +"supported." +msgstr "キーワード引数を取ることができるようになりました。以前は位置引数だけがサポートされていました。" + +#: ../../builtins/functions.rst:1634 +msgid "" +"Print *objects* to the text stream *file*, separated by *sep* and followed " +"by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " +"keyword arguments." +msgstr "" +"*objects* を *sep* で区切りながらテキストストリーム *file* に表示し、最後に *end* を表示します。*sep* 、 " +"*end* 、 *file* 、 *flush* を与える場合、キーワード引数として与える必要があります。" + +#: ../../builtins/functions.rst:1638 +msgid "" +"All non-keyword arguments are converted to strings like :func:`str` does and" +" written to the stream, separated by *sep* and followed by *end*. Both " +"*sep* and *end* must be strings; they can also be ``None``, which means to " +"use the default values. If no *objects* are given, :func:`print` will just " +"write *end*." +msgstr "" +"キーワードなしの引数はすべて、 :func:`str` がするように文字列に変換され、 *sep* で区切られながらストリームに書き出され、最後に " +"*end* が続きます。 *sep* と *end* の両方とも、文字列でなければなりません。これらを ``None`` " +"にすると、デフォルトの値が使われます。 *objects* が与えられなければ、 :func:`print` は *end* だけを書き出します。" + +#: ../../builtins/functions.rst:1644 +msgid "" +"The *file* argument must be an object with a ``write(string)`` method; if it" +" is not present or ``None``, :data:`sys.stdout` will be used. Since printed" +" arguments are converted to text strings, :func:`print` cannot be used with " +"binary mode file objects. For these, use ``file.write(...)`` instead." +msgstr "" +"*file* 引数は、 ``write(string)`` メソッドを持つオブジェクトでなければなりません。指定されないか、 ``None`` " +"である場合、 :data:`sys.stdout` が使われます。表示される引数は全てテキスト文字列に変換されますから、 :func:`print` " +"はバイナリモードファイルオブジェクトには使用できません。代わりに ``file.write(...)`` を使ってください。" + +#: ../../builtins/functions.rst:1649 +msgid "" +"Output buffering is usually determined by *file*. However, if *flush* is " +"true, the stream is forcibly flushed." +msgstr "" +"出力がバッファ化されるかどうかは通常 *file* で決まりますが、*flush* キーワード引数が真ならストリームは強制的にフラッシュされます。" + +#: ../../builtins/functions.rst:1653 +msgid "Added the *flush* keyword argument." +msgstr "キーワード引数 *flush* が追加されました。" + +#: ../../builtins/functions.rst:1659 +msgid "Return a property attribute." +msgstr "property 属性を返します。" + +#: ../../builtins/functions.rst:1661 +msgid "" +"*fget* is a function for getting an attribute value. *fset* is a function " +"for setting an attribute value. *fdel* is a function for deleting an " +"attribute value. And *doc* creates a docstring for the attribute." +msgstr "" +"*fget* は属性値を取得するための関数です。*fset* は属性値を設定するための関数です。*fdel* " +"は属性値を削除するための関数です。*doc* は属性の docstring を作成します。" + +#: ../../builtins/functions.rst:1665 +msgid "A typical use is to define a managed attribute ``x``::" +msgstr "典型的な使用法は、属性 ``x`` の処理の定義です::" + +#: ../../builtins/functions.rst:1667 +msgid "" +"class C:\n" +" def __init__(self):\n" +" self._x = None\n" +"\n" +" def getx(self):\n" +" return self._x\n" +"\n" +" def setx(self, value):\n" +" self._x = value\n" +"\n" +" def delx(self):\n" +" del self._x\n" +"\n" +" x = property(getx, setx, delx, \"I'm the 'x' property.\")" +msgstr "" +"class C:\n" +" def __init__(self):\n" +" self._x = None\n" +"\n" +" def getx(self):\n" +" return self._x\n" +"\n" +" def setx(self, value):\n" +" self._x = value\n" +"\n" +" def delx(self):\n" +" del self._x\n" +"\n" +" x = property(getx, setx, delx, \"I'm the 'x' property.\")" + +#: ../../builtins/functions.rst:1682 +msgid "" +"If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " +"value`` will invoke the setter, and ``del c.x`` the deleter." +msgstr "" +"*c* が *C* のインスタンスならば、``c.x`` は getter を呼び出し、``c.x = value`` は setter を、``del" +" c.x`` は deleter を呼び出します。" + +#: ../../builtins/functions.rst:1685 +msgid "" +"If given, *doc* will be the docstring of the property attribute. Otherwise, " +"the property will copy *fget*'s docstring (if it exists). This makes it " +"possible to create read-only properties easily using :deco:`property` as a " +":term:`decorator`::" +msgstr "" + +#: ../../builtins/functions.rst:1689 +msgid "" +"class Parrot:\n" +" def __init__(self):\n" +" self._voltage = 100000\n" +"\n" +" @property\n" +" def voltage(self):\n" +" \"\"\"Get the current voltage.\"\"\"\n" +" return self._voltage" +msgstr "" +"class Parrot:\n" +" def __init__(self):\n" +" self._voltage = 100000\n" +"\n" +" @property\n" +" def voltage(self):\n" +" \"\"\"Get the current voltage.\"\"\"\n" +" return self._voltage" + +#: ../../builtins/functions.rst:1698 +msgid "" +"The ``@property`` decorator turns the :meth:`!voltage` method into a " +"\"getter\" for a read-only attribute with the same name, and it sets the " +"docstring for *voltage* to \"Get the current voltage.\"" +msgstr "" +"``@property`` デコレータは :meth:`!voltage` を同じ名前のまま 読み出し専用属性の \"getter\" " +"にし、*voltage* のドキュメント文字列を \"Get the current voltage.\" に設定します。" + +#: ../../builtins/functions.rst:1706 +msgid "" +"A property object has ``getter``, ``setter``, and ``deleter`` methods usable" +" as decorators that create a copy of the property with the corresponding " +"accessor function set to the decorated function. This is best explained " +"with an example:" +msgstr "" +"property オブジェクトは ``getter``, ``setter``, ``deleter`` " +"メソッドを持っています。これらのメソッドをデコレータとして使うと、対応するアクセサ関数がデコレートされた関数に設定された、 property " +"のコピーを作成できます。 これを一番分かりやすく説明する例があります:" + +#: ../../builtins/functions.rst:1711 +msgid "" +"class C:\n" +" def __init__(self):\n" +" self._x = None\n" +"\n" +" @property\n" +" def x(self):\n" +" \"\"\"I'm the 'x' property.\"\"\"\n" +" return self._x\n" +"\n" +" @x.setter\n" +" def x(self, value):\n" +" self._x = value\n" +"\n" +" @x.deleter\n" +" def x(self):\n" +" del self._x" +msgstr "" +"class C:\n" +" def __init__(self):\n" +" self._x = None\n" +"\n" +" @property\n" +" def x(self):\n" +" \"\"\"I'm the 'x' property.\"\"\"\n" +" return self._x\n" +"\n" +" @x.setter\n" +" def x(self, value):\n" +" self._x = value\n" +"\n" +" @x.deleter\n" +" def x(self):\n" +" del self._x" + +#: ../../builtins/functions.rst:1730 +msgid "" +"This code is exactly equivalent to the first example. Be sure to give the " +"additional functions the same name as the original property (``x`` in this " +"case.)" +msgstr "このコードは最初の例と等価です。追加の関数には、必ず元の property と同じ名前 (この例では ``x``) を与えて下さい。" + +#: ../../builtins/functions.rst:1734 +msgid "" +"The returned property object also has the attributes ``fget``, ``fset``, and" +" ``fdel`` corresponding to the constructor arguments." +msgstr "" +"返される property オブジェクトも、コンストラクタの引数に対応した ``fget``, ``fset``, および ``fdel`` " +"属性を持ちます。" + +#: ../../builtins/functions.rst:1737 +msgid "The docstrings of property objects are now writeable." +msgstr "属性オブジェクトのドックストリングが書き込み可能になりました。" + +#: ../../builtins/functions.rst:1742 +msgid "" +"Attribute holding the name of the property. The name of the property can be " +"changed at runtime." +msgstr "プロパティ名を保持する属性。プロパティ名は実行時に変更できます。" + +#: ../../builtins/functions.rst:1753 +msgid "" +"Rather than being a function, :class:`range` is actually an immutable " +"sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." +msgstr "" +":class:`range` は、実際には関数ではなくイミュータブルなシーケンス型で、 :ref:`typesseq-range` と " +":ref:`typesseq` にドキュメント化されています。" + +#: ../../builtins/functions.rst:1759 +msgid "" +"Return a string containing a printable representation of an object. For " +"many types, this function makes an attempt to return a string that would " +"yield an object with the same value when passed to :func:`eval`; otherwise, " +"the representation is a string enclosed in angle brackets that contains the " +"name of the type of the object together with additional information often " +"including the name and address of the object. A class can control what this" +" function returns for its instances by defining a :meth:`~object.__repr__` " +"method. If :func:`sys.displayhook` is not accessible, this function will " +"raise :exc:`RuntimeError`." +msgstr "" +"オブジェクトの印字可能な表現を含む文字列を返します。この関数は多くの型について、 :func:`eval` " +"に渡されたときと同じ値を持つようなオブジェクトを表す文字列を生成しようとします。そうでない場合は、山括弧に囲まれたオブジェクトの型の名前と追加の情報 " +"(大抵の場合はオブジェクトの名前とアドレスを含みます) を返します。クラスは、 :meth:`~object.__repr__` " +"メソッドを定義することで、この関数によりそのクラスのインスタンスが返すものを制御することができます。:func:`sys.displayhook` " +"にアクセスできない場合、この関数は :exc:`RuntimeError` を送出します。" + +#: ../../builtins/functions.rst:1770 +msgid "This class has a custom representation that can be evaluated::" +msgstr "このクラスは、eval 評価可能な独自の representation を持ちます::" + +#: ../../builtins/functions.rst:1772 +msgid "" +"class Person:\n" +" def __init__(self, name, age):\n" +" self.name = name\n" +" self.age = age\n" +"\n" +" def __repr__(self):\n" +" return f\"Person({self.name!r}, {self.age!r})\"" +msgstr "" + +#: ../../builtins/functions.rst:1783 +msgid "" +"Return a reverse :term:`iterator`. The argument must be an object which has" +" a :meth:`~object.__reversed__` method or supports the sequence protocol " +"(the :meth:`~object.__len__` method and the :meth:`~object.__getitem__` " +"method with integer arguments starting at ``0``)." +msgstr "" +"要素を逆順に取り出すイテレータ (reverse :term:`iterator`) を返します。引数は " +":meth:`~object.__reversed__` メソッドを持つか、シーケンス型プロトコル ( :meth:`~object.__len__` " +"メソッド、および、 ``0`` 以上の整数を引数とする :meth:`~object.__getitem__` メソッド) " +"をサポートするオブジェクトでなければなりません。" + +#: ../../builtins/functions.rst:1791 +msgid "" +"Return *number* rounded to *ndigits* precision after the decimal point. If " +"*ndigits* is omitted or is ``None``, it returns the nearest integer to its " +"input." +msgstr "" +"*number* を小数点以下 *ndigits* 桁の精度で丸めた値を返します。*ndigits* が省略されたり、``None`` " +"だった場合、入力値に最も近い整数を返します。" + +#: ../../builtins/functions.rst:1795 +msgid "" +"For the built-in types supporting :func:`round`, values are rounded to the " +"closest multiple of 10 to the power minus *ndigits*; if two multiples are " +"equally close, rounding is done toward the even choice (so, for example, " +"both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is " +"``2``). Any integer value is valid for *ndigits* (positive, zero, or " +"negative). The return value is an integer if *ndigits* is omitted or " +"``None``. Otherwise, the return value has the same type as *number*." +msgstr "" +":func:`round` をサポートする組み込み型では、値は 10 のマイナス *ndigits* 乗の倍数の中で最も近いものに丸められます; 二つの倍数が同じだけ近いなら、偶数を選ぶ方に (そのため、例えば ``round(0.5)`` と ``round(-0.5)`` は両方とも ``0`` に、 ``round(1.5)`` は ``2`` に) 丸められます。\n" +"*ndigits* には任意の整数値が有効となります (正の整数、ゼロ、負の整数)。\n" +"返り値は *ndigits* が指定されていないか ``None`` の場合は整数、そうでなければ返り値は *number* と同じ型です。" + +#: ../../builtins/functions.rst:1804 +msgid "" +"For a general Python object ``number``, ``round`` delegates to " +"``number.__round__``." +msgstr "" +"一般的な Python オブジェクト ``number`` に対して、``round`` は処理を `number.__round__` に移譲します。" + +#: ../../builtins/functions.rst:1809 +msgid "" +"The behavior of :func:`round` for floats can be surprising: for example, " +"``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is" +" not a bug: it's a result of the fact that most decimal fractions can't be " +"represented exactly as a float. See :ref:`tut-fp-issues` for more " +"information." +msgstr "" +"浮動小数点数に対する :func:`round` の振る舞いは意外なものかもしれません: 例えば、 ``round(2.675, 2)`` は予想通りの" +" ``2.68`` ではなく ``2.67`` を与えます。これはバグではありません: " +"これはほとんどの小数が浮動小数点数で正確に表せないことの結果です。詳しくは :ref:`tut-fp-issues` を参照してください。" + +#: ../../builtins/functions.rst:1820 +msgid "" +"Return a new :class:`set` object, optionally with elements taken from " +"*iterable*. :class:`set` is a built-in class. See also :ref:`types-set` " +"for documentation about this class." +msgstr "" + +#: ../../builtins/functions.rst:1824 +msgid "" +"For other containers see the built-in :class:`frozenset`, :class:`list`, " +":class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections`" +" module." +msgstr "" +"他のコンテナについては :mod:`collections` モジュールや組み込みの :class:`frozenset` 、 " +":class:`list` 、 :class:`tuple` 、 :class:`dict` クラスを参照してください。" + +#: ../../builtins/functions.rst:1831 +msgid "" +"This is the counterpart of :func:`getattr`. The arguments are an object, a " +"string, and an arbitrary value. The string may name an existing attribute " +"or a new attribute. The function assigns the value to the attribute, " +"provided the object allows it. For example, ``setattr(x, 'foobar', 123)`` " +"is equivalent to ``x.foobar = 123``." +msgstr "" +":func:`getattr` " +"の相方です。引数はオブジェクト、文字列、それから任意の値です。文字列は既存の属性または新たな属性の名前にできます。この関数は指定したオブジェクトが許せば、値を属性に関連付けます。例えば、" +" ``setattr(x, 'foobar', 123)`` は ``x.foobar = 123`` と等価です。" + +#: ../../builtins/functions.rst:1837 +msgid "" +"*name* need not be a Python identifier as defined in :ref:`identifiers` " +"unless the object chooses to enforce that, for example in a custom " +":meth:`~object.__getattribute__` or via :attr:`~object.__slots__`. An " +"attribute whose name is not an identifier will not be accessible using the " +"dot notation, but is accessible through :func:`getattr` etc.." +msgstr "" +":meth:`~object.__getattribute__` のカスタマイズや :attr:`~object.__slots__` " +"を通じてオブジェクトが強制していない限り、 *name* は :ref:`identifiers` で定義されている Python " +"識別子である必要はありません。属性名が識別子でない場合、ドットを使った属性へのアクセスはできませんが、 :func:`getattr` " +"などを通じてアクセス可能です。" + +#: ../../builtins/functions.rst:1845 +msgid "" +"Since :ref:`private name mangling ` happens at " +"compilation time, one must manually mangle a private attribute's (attributes" +" with two leading underscores) name in order to set it with :func:`setattr`." +msgstr "" +":ref:`プライベートな名前のマングリング ` はコンパイル時に行われます。そのため、プライベートな属性" +" (先頭に2つのアンダースコアを伴う名前を持つ属性) の値を :func:`setattr` " +"でセットするためには、属性名を手動でマングリングする必要があります。" + +#: ../../builtins/functions.rst:1853 +msgid "" +"Return a new unique sentinel object. *name* must be a :class:`str`, and is " +"used by default as the returned object's representation::" +msgstr "" + +#: ../../builtins/functions.rst:1856 +msgid "" +">>> MISSING = sentinel(\"MISSING\")\n" +">>> MISSING\n" +"MISSING" +msgstr "" + +#: ../../builtins/functions.rst:1860 +msgid "" +"The optional *repr* argument can be used to specify a different " +"representation::" +msgstr "" + +#: ../../builtins/functions.rst:1862 +msgid "" +">>> MISSING = sentinel(\"MISSING\", repr=\"\")\n" +">>> MISSING\n" +"" +msgstr "" + +#: ../../builtins/functions.rst:1866 +msgid "" +"Sentinel objects are truthy and compare equal only to themselves. They are " +"intended to be compared with the :keyword:`is` operator." +msgstr "" + +#: ../../builtins/functions.rst:1869 +msgid "``sentinel`` does not support subclassing." +msgstr "" + +#: ../../builtins/functions.rst:1871 +msgid "Shallow and deep copies of a sentinel object return the object itself." +msgstr "" + +#: ../../builtins/functions.rst:1873 +msgid "" +"Sentinels are conventionally assigned to a variable with a matching name. " +"Sentinels defined in this way can be used in :term:`type hints `::" +msgstr "" + +#: ../../builtins/functions.rst:1876 +msgid "" +"MISSING = sentinel(\"MISSING\")\n" +"\n" +"def next_value(default: int | MISSING = MISSING):\n" +" ..." +msgstr "" + +#: ../../builtins/functions.rst:1881 +msgid "" +"Sentinel objects support the :ref:`| ` operator for use in type " +"expressions." +msgstr "" + +#: ../../builtins/functions.rst:1883 +msgid "" +":mod:`Pickling ` is supported for sentinel objects that are placed " +"in the global scope of a module under a name matching the sentinel's name, " +"and for sentinels placed in class scopes with a name matching the " +":term:`qualified name` of the sentinel. Other sentinels, such as those " +"defined in a function scope, are not picklable. The identity of the sentinel" +" is preserved after pickling::" +msgstr "" + +#: ../../builtins/functions.rst:1890 +msgid "" +"import pickle\n" +"\n" +"PICKLABLE = sentinel(\"PICKLABLE\")\n" +"\n" +"assert pickle.loads(pickle.dumps(PICKLABLE)) is PICKLABLE\n" +"\n" +"class Cls:\n" +" PICKLABLE = sentinel(\"Cls.PICKLABLE\")\n" +"\n" +"assert pickle.loads(pickle.dumps(Cls.PICKLABLE)) is Cls.PICKLABLE" +msgstr "" + +#: ../../builtins/functions.rst:1901 +msgid "Sentinel objects have the following attributes:" +msgstr "" + +#: ../../builtins/functions.rst:1905 +msgid "The sentinel's name." +msgstr "" + +#: ../../builtins/functions.rst:1909 +msgid "" +"The name of the module where the sentinel was created. This attribute is " +"writable." +msgstr "" + +#: ../../builtins/functions.rst:1917 +msgid "" +"Return a :term:`slice` object representing the set of indices specified by " +"``range(start, stop, step)``. The *start* and *step* arguments default to " +"``None``." +msgstr "" +"``range(start, stop, step)`` で指定されたインデックスのセットを表す :term:`slice` オブジェクトを返します。" +" 引数 *start* と *step* のデフォルトは ``None`` です。" + +#: ../../builtins/functions.rst:1921 +msgid "" +"Slice objects are also generated when :ref:`slicing syntax ` is " +"used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``." +msgstr "" +"slice オブジェクトは :ref:`スライス表記 ` を使用したときにも作られます。例えば " +"``a[start:stop:step]`` や ``a[start:stop, i]`` です。" + +#: ../../builtins/functions.rst:1924 +msgid "" +"See :func:`itertools.islice` for an alternate version that returns an " +":term:`iterator`." +msgstr ":term:`iterator` 版として :func:`itertools.islice` 関数があります。" + +#: ../../builtins/functions.rst:1931 +msgid "" +"These read-only attributes are set to the argument values (or their " +"default). They have no other explicit functionality; however, they are used" +" by NumPy and other third-party packages." +msgstr "" +"これらの属性は読み取り専用で、引数として渡された値 (またはデフォルト値) " +"にセットされます。値を格納する以外に他に直接的な機能はありません。ただし、Numpy などのサードパーティパッケージが使用します。" + +#: ../../builtins/functions.rst:1935 +msgid "" +"Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, " +":attr:`~slice.stop`, and :attr:`~slice.step` are hashable)." +msgstr "" +"スライスオブジェクトが :term:`hashable` (ハッシュ可能) となりました (ただし、属性 :attr:`~slice.start` 、 " +":attr:`~slice.stop` 、 :attr:`~slice.step` がすべてハッシュ可能である場合に限ります)。" + +#: ../../builtins/functions.rst:1941 +msgid "Return a new sorted list from the items in *iterable*." +msgstr "*iterable* の要素を並べ替えた新たなリストを返します。" + +#: ../../builtins/functions.rst:1943 +msgid "" +"Has two optional arguments which must be specified as keyword arguments." +msgstr "2 つのオプション引数があり、これらはキーワード引数として指定されなければなりません。" + +#: ../../builtins/functions.rst:1945 +msgid "" +"*key* specifies a function of one argument that is used to extract a " +"comparison key from each element in *iterable* (for example, " +"``key=str.lower``). The default value is ``None`` (compare the elements " +"directly)." +msgstr "" +"*key* には 1 引数関数を指定します。これは *iterable* の各要素から比較キーを展開するのに使われます (例えば、 ``key=str.lower`` のように指定します)。\n" +"デフォルト値は ``None`` です (要素を直接比較します)。" + +#: ../../builtins/functions.rst:1949 +msgid "" +"*reverse* is a boolean value. If set to ``True``, then the list elements " +"are sorted as if each comparison were reversed." +msgstr "*reverse* は真偽値です。 ``True`` がセットされた場合、リストの要素は個々の比較が反転したものとして並び替えられます。" + +#: ../../builtins/functions.rst:1952 +msgid "" +"Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a" +" *key* function." +msgstr "旧式の *cmp* 関数を *key* 関数に変換するには :func:`functools.cmp_to_key` を使用してください。" + +#: ../../builtins/functions.rst:1955 +msgid "" +"The built-in :func:`sorted` function is guaranteed to be stable. A sort is " +"stable if it guarantees not to change the relative order of elements that " +"compare equal --- this is helpful for sorting in multiple passes (for " +"example, sort by department, then by salary grade)." +msgstr "" +"組み込みの :func:`sorted` " +"関数は安定なことが保証されています。同等な要素の相対順序を変更しないことが保証されていれば、ソートは安定です。これは複数のパスでソートを行なうのに役立ちます(例えば部署でソートしてから給与の等級でソートする場合)。" + +#: ../../builtins/functions.rst:1960 +msgid "" +"The sort algorithm uses only ``<`` comparisons between items. While " +"defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8`" +" recommends that all six :ref:`rich comparisons ` be " +"implemented. This will help avoid bugs when using the same data with other " +"ordering tools such as :func:`max` that rely on a different underlying " +"method. Implementing all six comparisons also helps avoid confusion for " +"mixed type comparisons which can call the reflected :meth:`~object.__gt__` " +"method." +msgstr "" +"ソートアルゴリズムは、要素間の比較に ``<`` 演算子だけを使います。したがってソートのためには :meth:`~object.__lt__` " +"メソッドを定義すれば十分なはずですが、 :PEP:`8` は6つの :ref:`比較演算子 ` " +"を全て実装することを推奨しています。これにより、異なるメソッドを必要とする :func:`max` " +"のような他のソートツールを、同じデータに対して適用することによって起こりうるバグを避ける助けになります。6つの比較演算子を全て実装することは、リフレクションによって" +" :meth:`~object.__gt__` メソッドを呼び出す可能性のある型混合の比較での混乱を避けることにも役立ちます。 " + +#: ../../builtins/functions.rst:1969 +msgid "" +"For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." +msgstr "ソートの例と簡単なチュートリアルは :ref:`sortinghowto` を参照して下さい。" + +#: ../../builtins/functions.rst:1973 +msgid "Transform a method into a static method." +msgstr "メソッドを静的メソッドへ変換します。" + +#: ../../builtins/functions.rst:1975 +msgid "" +"A static method does not receive an implicit first argument. To declare a " +"static method, use this idiom::" +msgstr "静的メソッドは暗黙の第一引数を受け取りません。静的メソッドを宣言するには、このイディオムを使ってください::" + +#: ../../builtins/functions.rst:1978 +msgid "" +"class C:\n" +" @staticmethod\n" +" def f(arg1, arg2, argN): ..." +msgstr "" +"class C:\n" +" @staticmethod\n" +" def f(arg1, arg2, argN): ..." + +#: ../../builtins/functions.rst:1982 +msgid "" +"The ``@staticmethod`` form is a function :term:`decorator` -- see " +":ref:`function` for details." +msgstr "" +"``@staticmethod`` 形式は関数 :term:`デコレータ ` です。詳しくは :ref:`function` " +"を参照してください。" + +#: ../../builtins/functions.rst:1985 +msgid "" +"A static method can be called either on the class (such as ``C.f()``) or on " +"an instance (such as ``C().f()``). Moreover, the static method " +":term:`descriptor` is also callable, so it can be used in the class " +"definition (such as ``f()``)." +msgstr "" +"静的メソッドは (``C.f()`` のように) クラスに対して呼び出すことも、 (``C().f()`` のように) " +"インスタンスに対して呼び出すこともできます。さらに、静的メソッド :term:`descriptor` は呼び出し可能でもあるため、(``f()`` " +"のように) クラス定義の中でも使用できます。" + +#: ../../builtins/functions.rst:1990 +msgid "" +"Static methods in Python are similar to those found in Java or C++. Also, " +"see :deco:`classmethod` for a variant that is useful for creating alternate " +"class constructors." +msgstr "" + +#: ../../builtins/functions.rst:1994 +msgid "" +"Like all decorators, it is also possible to call ``staticmethod`` as a " +"regular function and do something with its result. This is needed in some " +"cases where you need a reference to a function from a class body and you " +"want to avoid the automatic transformation to instance method. For these " +"cases, use this idiom::" +msgstr "" +"あらゆるデコレータと同じく、 ``staticmethod`` は普通の関数のように呼べ、その返り値で処理が行えます。\n" +"この機能は、クラス本体から関数を参照する必要があり、かつ、インスタンスメソッドに自動変換されるのを避けたいケースで必要になります。\n" +"そのようなケースでは、このイディオムが使えます::" + +#: ../../builtins/functions.rst:2000 +msgid "" +"def regular_function():\n" +" ...\n" +"\n" +"class C:\n" +" method = staticmethod(regular_function)" +msgstr "" +"def regular_function():\n" +" ...\n" +"\n" +"class C:\n" +" method = staticmethod(regular_function)" + +#: ../../builtins/functions.rst:2006 +msgid "For more information on static methods, see :ref:`types`." +msgstr "静的メソッドについて詳しい情報は :ref:`types` を参照してください。" + +#: ../../builtins/functions.rst:2008 +msgid "" +"Static methods now inherit the method attributes " +"(:attr:`~function.__module__`, :attr:`~function.__name__`, " +":attr:`~function.__qualname__`, :attr:`~function.__doc__` and " +":attr:`~function.__annotations__`), have a new ``__wrapped__`` attribute, " +"and are now callable as regular functions." +msgstr "" + +#: ../../builtins/functions.rst:2026 +msgid "" +"Return a :class:`str` version of *object*. See :func:`str` for details." +msgstr "*object* の :class:`str` 版を返します。詳細は :func:`str` を参照してください。" + +#: ../../builtins/functions.rst:2028 +msgid "" +"``str`` is the built-in string :term:`class`. For general information about" +" strings, see :ref:`textseq`." +msgstr "" +"``str`` は組み込みの文字列 :term:`クラス` です。文字列に関する一般的な情報は、:ref:`textseq` " +"を参照してください。" + +#: ../../builtins/functions.rst:2034 +msgid "" +"Sums *start* and the items of an *iterable* from left to right and returns " +"the total. The *iterable*'s items are normally numbers, and the start value" +" is not allowed to be a string." +msgstr "" +"*start* と *iterable* の要素を左から右へ合計し、総和を返します。 *iterable* の要素は通常は数値で、start " +"の値は文字列であってはなりません。" + +#: ../../builtins/functions.rst:2038 +msgid "" +"For some use cases, there are good alternatives to :func:`sum`. The " +"preferred, fast way to concatenate a sequence of strings is by calling " +"``''.join(sequence)``. To add floating-point values with extended " +"precision, see :func:`math.fsum`\\. To concatenate a series of iterables, " +"consider using :func:`itertools.chain`." +msgstr "" +"使う場面によっては、 :func:`sum` よりもいい選択肢があります。文字列からなるシーケンスを結合する高速かつ望ましい方法は " +"``''.join(sequence)`` を呼ぶことです。浮動小数点数値を拡張された精度で加算するには、 :func:`math.fsum` " +"を参照してください。一連のイテラブルを連結するには、 :func:`itertools.chain` の使用を考えてください。" + +#: ../../builtins/functions.rst:2044 +msgid "The *start* parameter can be specified as a keyword argument." +msgstr "*start* パラメータをキーワード引数として指定することができるようになりました。" + +#: ../../builtins/functions.rst:2047 +msgid "" +"Summation of floats switched to an algorithm that gives higher accuracy and " +"better commutativity on most builds." +msgstr "浮動小数点数の総和を計算するとき、ほとんどの環境でより高精度な結果とより良い互換性が得られるアルゴリズムを使用するようになりました。" + +#: ../../builtins/functions.rst:2050 +msgid "" +"Added specialization for summation of complexes, using same algorithm as for" +" summation of floats." +msgstr "" + +#: ../../builtins/functions.rst:2058 +msgid "" +"Return a proxy object that delegates method calls to a parent or sibling " +"class of *type*. This is useful for accessing inherited methods that have " +"been overridden in a class." +msgstr "" +"メソッドの呼び出しを *type* " +"の親または兄弟クラスに委譲するプロキシオブジェクトを返します。これはクラスの中でオーバーライドされた継承メソッドにアクセスするのに便利です。" + +#: ../../builtins/functions.rst:2062 +msgid "" +"The *object_or_type* determines the :term:`method resolution order` to be " +"searched. The search starts from the class right after the *type*." +msgstr "" +"*object_or_type* はメソッドの検索のための :term:`method resolution order` (メソッド解決順序) " +"を決定します。検索は *type* 直後のクラスから開始します。" + +#: ../../builtins/functions.rst:2066 +msgid "" +"For example, if :attr:`~type.__mro__` of *object_or_type* is ``D -> B -> C " +"-> A -> object`` and the value of *type* is ``B``, then :func:`super` " +"searches ``C -> A -> object``." +msgstr "" +"例えば *object_or_type* の :attr:`~type.__mro__` 属性が ``D -> B -> C -> A -> " +"object`` であり、 *type* の値が ``B`` だとすると、 :func:`super` は ``C -> A -> object`` " +"の順番でメソッドを検索します。" + +#: ../../builtins/functions.rst:2070 +msgid "" +"The :attr:`~type.__mro__` attribute of the class corresponding to " +"*object_or_type* lists the method resolution search order used by both " +":func:`getattr` and :func:`super`. The attribute is dynamic and can change " +"whenever the inheritance hierarchy is updated." +msgstr "" + +#: ../../builtins/functions.rst:2075 +msgid "" +"If the second argument is omitted, the super object returned is unbound. If" +" the second argument is an object, ``isinstance(obj, type)`` must be true. " +"If the second argument is a type, ``issubclass(type2, type)`` must be true " +"(this is useful for classmethods)." +msgstr "" +"第 2 引数が省かれたなら、返されるスーパーオブジェクトは束縛されません。第 2 引数がオブジェクトであれば、 ``isinstance(obj, " +"type)`` は真でなければなりません。第 2 引数が型であれば、 ``issubclass(type2, type)`` は真でなければなりません " +"(これはクラスメソッドに役に立つでしょう)。" + +#: ../../builtins/functions.rst:2080 +msgid "" +"When called directly within an ordinary method of a class, both arguments " +"may be omitted (\"zero-argument :func:`!super`\"). In this case, *type* will" +" be the enclosing class, and *obj* will be the first argument of the " +"immediately enclosing function (typically ``self``). (This means that zero-" +"argument :func:`!super` will not work as expected within nested functions, " +"including generator expressions, which implicitly create nested functions.)" +msgstr "" +"クラスの通常のメソッド中で直接呼び出される場合、どちらの引数も省けます (「ゼロ引数 :func:`!super` 」) 。この場合、 *type* " +"はその囲んでいるクラスとなり、 *obj* は直接囲んでいる関数の第一引数 (通常は ``self`` ) となります。 (つまり、ゼロ引数 " +":func:`!super` は、ネストされた関数では期待どおりに動作しません。これには 暗にネストされた関数を作るジェネレータ式も含まれます)" + +#: ../../builtins/functions.rst:2087 +msgid "" +"There are two typical use cases for *super*. In a class hierarchy with " +"single inheritance, *super* can be used to refer to parent classes without " +"naming them explicitly, thus making the code more maintainable. This use " +"closely parallels the use of *super* in other programming languages." +msgstr "" +"*super* の典型的な用途は 2 つあります。第一に、単継承のクラス階層構造で *super* " +"は名前を明示することなく親クラスを参照するのに使え、それゆえコードをメンテナンスしやすくなります。この用途は他のプログラミング言語で見られる " +"*super* の用途によく似ています。" + +#: ../../builtins/functions.rst:2092 +msgid "" +"The second use case is to support cooperative multiple inheritance in a " +"dynamic execution environment. This use case is unique to Python and is not" +" found in statically compiled languages or languages that only support " +"single inheritance. This makes it possible to implement \"diamond " +"diagrams\" where multiple base classes implement the same method. Good " +"design dictates that such implementations have the same calling signature in" +" every case (because the order of calls is determined at runtime, because " +"that order adapts to changes in the class hierarchy, and because that order " +"can include sibling classes that are unknown prior to runtime)." +msgstr "" +"2つ目の用途は動的な実行環境において協調的 (cooperative) な多重継承をサポートすることです。これは Python " +"に特有の用途で、静的にコンパイルされる言語や、単継承のみをサポートする言語には見られないものです。この機能により、同じ名前のメソッドを実装する複数の基底クラスを使った" +" \"ダイヤモンド型* " +"の継承構造を実装することができます。良い設計は、そのような実装において、どのような場合でも同じ呼び出しシグネチャを持つように強制します。 " +"(理由は呼び出しの順序が実行時に決定されること、呼び出し順序はクラス階層構造の変化に順応すること、そして呼び出し順序が実行時まで未知の兄弟クラスが含まれる場合があることです)。" + +#: ../../builtins/functions.rst:2102 +msgid "For both use cases, a typical superclass call looks like this::" +msgstr "両方の用途において、典型的なスーパークラスの呼び出しは次のようになります::" + +#: ../../builtins/functions.rst:2104 +msgid "" +"class C(B):\n" +" def method(self, arg):\n" +" super().method(arg) # This does the same thing as:\n" +" # super(C, self).method(arg)" +msgstr "" +"class C(B):\n" +" def method(self, arg):\n" +" super().method(arg) # これは次と同じことを行います:\n" +" # super(C, self).method(arg)" + +#: ../../builtins/functions.rst:2109 +msgid "" +"In addition to method lookups, :func:`super` also works for attribute " +"lookups. One possible use case for this is calling :term:`descriptors " +"` in a parent or sibling class." +msgstr "" +"メソッドのルックアップに加えて、 :func:`super` " +"は属性のルックアップに対しても同様に動作します。考えうる用途のひとつは親クラスや兄弟クラスの :term:`descriptors " +"` (デスクリプタ) を呼び出すことです。" + +#: ../../builtins/functions.rst:2113 +msgid "" +"Note that :func:`super` is implemented as part of the binding process for " +"explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " +"does so by implementing its own :meth:`~object.__getattribute__` method for " +"searching classes in a predictable order that supports cooperative multiple " +"inheritance. Accordingly, :func:`super` is undefined for implicit lookups " +"using statements or operators such as ``super()[name]``." +msgstr "" +"なお、:func:`super` は ``super().__getitem__(name)`` " +"のような明示的なドット表記属性探索の束縛処理の一部として実装されています。これは、 :meth:`~object.__getattribute__` " +"メソッドを予測可能な順序でクラスを検索するように実装し、協調的な多重継承をサポートすることで実現されています。従って、 :func:`super` " +"は文や ``super()[name]`` のような演算子を使った暗黙の探索向けには定義されていません。" + +#: ../../builtins/functions.rst:2121 +msgid "" +"Also note that, aside from the zero argument form, :func:`super` is not " +"limited to use inside methods. The two argument form specifies the " +"arguments exactly and makes the appropriate references. The zero argument " +"form only works inside a class definition, as the compiler fills in the " +"necessary details to correctly retrieve the class being defined, as well as " +"accessing the current instance for ordinary methods." +msgstr "" +"また、 :func:`super` " +"の使用は引数無しの形式を除きメソッド内部に限定されないことにも注目して下さい。2引数の形式は、必要な要素を正確に指定するので、適当な参照を作ることができます。クラス定義中における引数無しの形式は、定義されているクラスを取り出すのに必要な詳細を、通常の方法で現在のインスタンスにアクセスするようにコンパイラが埋めるのではたらきます。" + +#: ../../builtins/functions.rst:2128 +msgid "" +"For practical suggestions on how to design cooperative classes using " +":func:`super`, see `guide to using super() " +"`_." +msgstr "" +":func:`super` を用いて協調的なクラスを設計する方法の実践的な提案は、 `guide to using super() " +"`_ " +"を参照してください。" + +#: ../../builtins/functions.rst:2132 +msgid "" +":class:`super` objects are now :mod:`pickleable ` and " +":mod:`copyable `." +msgstr "" +":class:`super` オブジェクトは :term:`pickle 可能 ` かつ :term:`コピー可能 ` " +"になりました。" + +#: ../../builtins/functions.rst:2141 +msgid "" +"Rather than being a function, :class:`tuple` is actually an immutable " +"sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." +msgstr "" +":class:`tuple` は、実際は関数ではなくイミュータブルなシーケンス型で、:ref:`typesseq-tuple` と " +":ref:`typesseq` にドキュメント化されています。" + +#: ../../builtins/functions.rst:2150 +msgid "" +"With one argument, return the type of an *object*. The return value is a " +"type object and generally the same object as returned by " +":attr:`object.__class__`." +msgstr "" +"引数が1つだけの場合、*object* の型を返します。返り値は型オブジェクトで、一般に :attr:`object.__class__` " +"によって返されるのと同じオブジェクトです。" + +#: ../../builtins/functions.rst:2154 +msgid "" +"The :func:`isinstance` built-in function is recommended for testing the type" +" of an object, because it takes subclasses into account." +msgstr "" +"オブジェクトの型の判定には、 :func:`isinstance` 組み込み関数を使うことが推奨されます。これはサブクラスを考慮するからです。" + +#: ../../builtins/functions.rst:2157 +msgid "" +"With three arguments, return a new type object. This is essentially a " +"dynamic form of the :keyword:`class` statement. The *name* string is the " +"class name and becomes the :attr:`~type.__name__` attribute. The *bases* " +"tuple contains the base classes and becomes the :attr:`~type.__bases__` " +"attribute; if empty, :class:`object`, the ultimate base of all classes, is " +"added. The *dict* dictionary contains attribute and method definitions for " +"the class body; it may be copied or wrapped before becoming the " +":attr:`~type.__dict__` attribute. The following two statements create " +"identical :class:`!type` objects:" +msgstr "" +"引数が3つの場合、新しい型オブジェクトを返します。これは本質的には :keyword:`class` 文の動的な書式です。 *name* " +"文字列はクラス名で、 :attr:`~type.__name__` 属性になります。 *bases* 基底クラスのタプルで、 " +":attr:`~type.__bases__` 属性になります; 空の場合は全てのクラスの基底クラスである :class:`object` " +"が追加されます。 *dict* は、クラス本体の属性とメソッドの定義を含む辞書です; 辞書は :attr:`~type.__dict__` " +"属性になる前にコピーされたり、ラップされることがあります。以下の2つの文は同じ :class:`!type` オブジェクトを生成します:" + +#: ../../builtins/functions.rst:2172 +msgid "See also:" +msgstr "下記を参照してください。" + +#: ../../builtins/functions.rst:2174 +msgid "" +":ref:`Documentation on attributes and methods on classes `." +msgstr "" +":ref:`Documentation on attributes and methods on classes `." + +#: ../../builtins/functions.rst:2175 +msgid ":ref:`bltin-type-objects`" +msgstr ":ref:`bltin-type-objects`" + +#: ../../builtins/functions.rst:2177 +msgid "" +"Keyword arguments provided to the three argument form are passed to the " +"appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " +"in the same way that keywords in a class definition (besides *metaclass*) " +"would." +msgstr "" +"三引数形式の呼び出しに与えられたキーワード引数は、(*metaclass* を除く) クラス定義におけるキーワード引数と同様に、適切なメタクラスの機構 " +"(通常は :meth:`~object.__init_subclass__`) に渡されます。" + +#: ../../builtins/functions.rst:2182 +msgid "" +"Unlike a :keyword:`class` statement, the three argument form does not call " +"the metaclass ``__prepare__`` method (see :ref:`prepare`). Use " +":func:`types.new_class` to dynamically create a class using the appropriate " +"metaclass." +msgstr "" + +#: ../../builtins/functions.rst:2187 +msgid "See also :ref:`class-customization`." +msgstr ":ref:`class-customization` も参照してください。" + +#: ../../builtins/functions.rst:2189 +msgid "" +"Subclasses of :class:`!type` which don't override ``type.__new__`` may no " +"longer use the one-argument form to get the type of an object." +msgstr "" +"``type.__new__`` をオーバーライドしていない :class:`!type` " +"のサブクラスは、オブジェクトの型を得るのに1引数形式を利用することができません。" + +#: ../../builtins/functions.rst:2195 +msgid "*dict* can now be a :class:`frozendict`." +msgstr "" + +#: ../../builtins/functions.rst:2200 +msgid "" +"Return the :attr:`~object.__dict__` attribute for a module, class, instance," +" or any other object with a :attr:`!__dict__` attribute." +msgstr "" +"モジュール、クラス、インスタンス、あるいはそれ以外の :attr:`!__dict__` 属性を持つオブジェクトの、 " +":attr:`~object.__dict__` 属性を返します。" + +#: ../../builtins/functions.rst:2203 +msgid "" +"Objects such as modules and instances have an updateable " +":attr:`~object.__dict__` attribute; however, other objects may have write " +"restrictions on their :attr:`!__dict__` attributes (for example, classes use" +" a :class:`types.MappingProxyType` to prevent direct dictionary updates)." +msgstr "" +"モジュールやインスタンスのようなオブジェクトは、更新可能な :attr:`~object.__dict__` " +"属性を持っています。ただし、それ以外のオブジェクトでは :attr:`!__dict__` " +"属性への書き込みが制限されている場合があります。書き込みに制限がある例としては、辞書を直接更新されることを防ぐために " +":class:`types.MappingProxyType` を使っているクラスがあります。" + +#: ../../builtins/functions.rst:2208 +msgid "Without an argument, :func:`vars` acts like :func:`locals`." +msgstr "引数がない場合 :func:`vars` は :func:`locals` のように動作します。" + +#: ../../builtins/functions.rst:2210 +msgid "" +"A :exc:`TypeError` exception is raised if an object is specified but it " +"doesn't have a :attr:`~object.__dict__` attribute (for example, if its class" +" defines the :attr:`~object.__slots__` attribute)." +msgstr "" +"指定されたオブジェクトに :attr:`~object.__dict__` 属性がない場合 (たとえばそのクラスが " +":attr:`~object.__slots__` 属性を定義している場合)、 :exc:`TypeError` 例外が送出されます。" + +#: ../../builtins/functions.rst:2216 +msgid "" +"The result of calling this function without an argument has been updated as " +"described for the :func:`locals` builtin." +msgstr "この関数を引数なしで呼び出したときの返り値は、 :func:`locals` 組み込み関数での説明に更新されました。" + +#: ../../builtins/functions.rst:2222 +msgid "" +"Iterate over several iterables in parallel, producing tuples with an item " +"from each one." +msgstr "複数のイテラブルを並行に反復処理し、各イテラブルの要素からなるタプルを生成します。" + +#: ../../builtins/functions.rst:2225 +msgid "Example::" +msgstr "以下はプログラム例です::" + +#: ../../builtins/functions.rst:2227 +msgid "" +">>> for item in zip([1, 2, 3], ['sugar', 'spice', 'everything nice']):\n" +"... print(item)\n" +"...\n" +"(1, 'sugar')\n" +"(2, 'spice')\n" +"(3, 'everything nice')" +msgstr "" +">>> for item in zip([1, 2, 3], ['sugar', 'spice', 'everything nice']):\n" +"... print(item)\n" +"...\n" +"(1, 'sugar')\n" +"(2, 'spice')\n" +"(3, 'everything nice')" + +#: ../../builtins/functions.rst:2234 +msgid "" +"More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " +"tuple contains the *i*-th element from each of the argument iterables." +msgstr "" +"より正式な定義: :func:`zip` は、 *i* 番目のタプルが 引数に与えた各イテラブルの *i* " +"番目の要素を含むような、タプルのイテレータを返します。" + +#: ../../builtins/functions.rst:2237 +msgid "" +"Another way to think of :func:`zip` is that it turns rows into columns, and " +"columns into rows. This is similar to `transposing a matrix " +"`_." +msgstr "" +":func:`zip` に対する別の考え方は、この関数は行を列に、また列を行に変換するということです。これは `行列の転置 " +"`_ とよく似ています。" + +#: ../../builtins/functions.rst:2241 +msgid "" +":func:`zip` is lazy: The elements won't be processed until the iterable is " +"iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a " +":class:`list`." +msgstr "" +":func:`zip` は遅延評価です: イテラブルが :keyword:`!for` ループに渡されたり、 :class:`list` " +"でラップされたりするなどして反復処理されるまで、要素が実際に処理されることはありません。" + +#: ../../builtins/functions.rst:2245 +msgid "" +"One thing to consider is that the iterables passed to :func:`zip` could have" +" different lengths; sometimes by design, and sometimes because of a bug in " +"the code that prepared these iterables. Python offers three different " +"approaches to dealing with this issue:" +msgstr "" +"ここで考慮すべきことは、 :func:`zip` に渡されるイテラブルが異なる長さを持つことがあるという点です; " +"ときには意図的な場合もあり、またときにはイテラブルを準備するコードにおけるバグのこともあるでしょう。 Python " +"はこの問題に対して3つの異なるアプローチを提供します:" + +#: ../../builtins/functions.rst:2250 +msgid "" +"By default, :func:`zip` stops when the shortest iterable is " +":term:`exhausted`. It will ignore the remaining items in the longer " +"iterables, cutting off the result to the length of the shortest iterable::" +msgstr "" + +#: ../../builtins/functions.rst:2254 +msgid "" +">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n" +"[(0, 'fee'), (1, 'fi'), (2, 'fo')]" +msgstr "" +">>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum']))\n" +"[(0, 'fee'), (1, 'fi'), (2, 'fo')]" + +#: ../../builtins/functions.rst:2257 +msgid "" +":func:`zip` is often used in cases where the iterables are assumed to be of " +"equal length. In such cases, it's recommended to use the ``strict=True`` " +"option. Its output is the same as regular :func:`zip`::" +msgstr "" +":func:`zip` は、しばしば受け取ったイテラブルが全て同じ長さであるという想定の下で使われます。そのような場合、 ``strict=True``" +" オプションの利用が推奨されます。その出力は通常の :func:`zip` と同じです::" + +#: ../../builtins/functions.rst:2261 +msgid "" +">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n" +"[('a', 1), ('b', 2), ('c', 3)]" +msgstr "" +">>> list(zip(('a', 'b', 'c'), (1, 2, 3), strict=True))\n" +"[('a', 1), ('b', 2), ('c', 3)]" + +#: ../../builtins/functions.rst:2264 +msgid "" +"Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " +"is :term:`exhausted` before the others:" +msgstr "" + +#: ../../builtins/functions.rst:2282 +msgid "" +"Without the ``strict=True`` argument, any bug that results in iterables of " +"different lengths will be silenced, possibly manifesting as a hard-to-find " +"bug in another part of the program." +msgstr "" +"``strict=True`` " +"引数なしの場合、長さの異なるイテラブルを生じる原因となるいかなるバグも、この時点では問題なく処理されます。そして代わりにプログラムの別の場所で、原因を特定しにくいバグとして検出されることになるでしょう。" + +#: ../../builtins/functions.rst:2286 +msgid "" +"Shorter iterables can be padded with a constant value to make all the " +"iterables have the same length. This is done by " +":func:`itertools.zip_longest`." +msgstr "" +"短いイテラブルを一定の値でパディングして全てのイテラブルが同じ長さになるようにすることもできます。この機能は " +":func:`itertools.zip_longest` で提供されます。" + +#: ../../builtins/functions.rst:2290 +msgid "" +"Edge cases: With a single iterable argument, :func:`zip` returns an iterator" +" of 1-tuples. With no arguments, it returns an empty iterator." +msgstr "" +"エッジケース: 引数としてイテラブルをひとつだけ渡した場合、 :func:`zip` は 1 " +"タプルのイテレータを返します。引数なしの場合は空のイテレータを返します。" + +#: ../../builtins/functions.rst:2293 +msgid "Tips and tricks:" +msgstr "ヒントとコツ:" + +#: ../../builtins/functions.rst:2295 +msgid "" +"The left-to-right evaluation order of the iterables is guaranteed. This " +"makes possible an idiom for clustering a data series into n-length groups " +"using ``zip(*[iter(s)]*n, strict=True)``. This repeats the *same* iterator " +"``n`` times so that each output tuple has the result of ``n`` calls to the " +"iterator. This has the effect of dividing the input into n-length chunks." +msgstr "" +"イテラブルの左から右への評価順序は保証されています。そのため ``zip(*[iter(s)]*n, strict=True)`` " +"を使ってデータ系列を長さ n のグループにクラスタリングするイディオムが使えます。これは、各出力タプルがイテレータを ``n`` " +"回呼び出した結果となるよう、 *同じ* イテレータを ``n`` 回繰り返します。これは入力を長さ n のチャンクに分割する効果があります。" + +#: ../../builtins/functions.rst:2301 +msgid "" +":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " +"list::" +msgstr ":func:`zip` に続けて ``*`` 演算子を使うと、zip したリストを元に戻せます::" + +#: ../../builtins/functions.rst:2304 +msgid "" +">>> x = [1, 2, 3]\n" +">>> y = [4, 5, 6]\n" +">>> list(zip(x, y))\n" +"[(1, 4), (2, 5), (3, 6)]\n" +">>> x2, y2 = zip(*zip(x, y))\n" +">>> x == list(x2) and y == list(y2)\n" +"True" +msgstr "" +">>> x = [1, 2, 3]\n" +">>> y = [4, 5, 6]\n" +">>> list(zip(x, y))\n" +"[(1, 4), (2, 5), (3, 6)]\n" +">>> x2, y2 = zip(*zip(x, y))\n" +">>> x == list(x2) and y == list(y2)\n" +"True" + +#: ../../builtins/functions.rst:2312 +msgid "Added the ``strict`` argument." +msgstr "``strict`` 引数が追加されました。" + +#: ../../builtins/functions.rst:2324 +msgid "" +"This is an advanced function that is not needed in everyday Python " +"programming, unlike :func:`importlib.import_module`." +msgstr "" +"これは :func:`importlib.import_module` とは違い、日常の Python プログラミングでは必要ない高等な関数です。" + +#: ../../builtins/functions.rst:2327 +msgid "" +"This function is invoked by the :keyword:`import` statement. It can be " +"replaced (by importing the :mod:`builtins` module and assigning to " +"``builtins.__import__``) in order to change semantics of the " +":keyword:`!import` statement, but doing so is **strongly** discouraged as it" +" is usually simpler to use import hooks (see :pep:`302`) to attain the same " +"goals and does not cause issues with code which assumes the default import " +"implementation is in use. Direct use of :func:`__import__` is also " +"discouraged in favor of :func:`importlib.import_module`." +msgstr "" +"この関数は :keyword:`import` 文により呼び出されます。 (:mod:`builtins` モジュールをインポートして " +"``builtins.__import__`` に代入することで) この関数を置き換えて :keyword:`!import` " +"文のセマンティクスを変更することができますが、同様のことをするのに通常はインポートフック (:pep:`302` 参照) " +"を利用する方が簡単で、かつデフォルトのインポート実装が使用されていることを仮定するコードとの間で問題が起きないので、このやり方は *強く* " +"推奨されません。 :func:`__import__` を直接使用することも推奨されず、 :func:`importlib.import_module`" +" の方が好まれます。" + +#: ../../builtins/functions.rst:2336 +msgid "" +"The function imports the module *name*, potentially using the given " +"*globals* and *locals* to determine how to interpret the name in a package " +"context. The *fromlist* gives the names of objects or submodules that should" +" be imported from the module given by *name*. The standard implementation " +"does not use its *locals* argument at all and uses its *globals* only to " +"determine the package context of the :keyword:`import` statement." +msgstr "" +"この関数は、モジュール *name* をインポートし、 *globals* と *locals* " +"が与えられれば、パッケージのコンテキストで名前をどう解釈するか決定するのに使います。 *fromlist* は *name* " +"で与えられるモジュールからインポートされるべきオブジェクトまたはサブモジュールの名前を与ます。標準の実装では *locals* 引数はまったく使われず、" +" *globals* は :keyword:`import` 文のパッケージコンテキストを決定するためにのみ使われます。" + +#: ../../builtins/functions.rst:2343 +msgid "" +"*level* specifies whether to use absolute or relative imports. ``0`` (the " +"default) means only perform absolute imports. Positive values for *level* " +"indicate the number of parent directories to search relative to the " +"directory of the module calling :func:`__import__` (see :pep:`328` for the " +"details)." +msgstr "" +"*level* は絶対と相対どちらのインポートを使うかを指定します。 ``0`` (デフォルト) は絶対インポートのみ実行します。正の *level* " +"の値は、 :func:`__import__` を呼び出したディレクトリから検索対象となる親ディレクトリの数を示します (詳細は :pep:`328` " +"を参照してください)。" + +#: ../../builtins/functions.rst:2349 +msgid "" +"When the *name* variable is of the form ``package.module``, normally, the " +"top-level package (the name up till the first dot) is returned, *not* the " +"module named by *name*. However, when a non-empty *fromlist* argument is " +"given, the module named by *name* is returned." +msgstr "" +"*name* 変数が ``package.module`` 形式であるとき、通常は、*name* で指名されたモジュール " +"*ではなく*、最上位のパッケージ (最初のドットまでの名前) が返されます。しかしながら、空でない *fromlist* 引数が与えられると、 " +"*name* で指名されたモジュールが返されます。" + +#: ../../builtins/functions.rst:2354 +msgid "" +"For example, the statement ``import spam`` results in bytecode resembling " +"the following code::" +msgstr "例えば、文 ``import spam`` は、以下のコードのようなバイトコードに帰結します::" + +#: ../../builtins/functions.rst:2357 +msgid "spam = __import__('spam', globals(), locals(), [], 0)" +msgstr "spam = __import__('spam', globals(), locals(), [], 0)" + +#: ../../builtins/functions.rst:2359 +msgid "The statement ``import spam.ham`` results in this call::" +msgstr "文 ``import spam.ham`` は、この呼び出しになります::" + +#: ../../builtins/functions.rst:2361 +msgid "spam = __import__('spam.ham', globals(), locals(), [], 0)" +msgstr "spam = __import__('spam.ham', globals(), locals(), [], 0)" + +#: ../../builtins/functions.rst:2363 +msgid "" +"Note how :func:`__import__` returns the toplevel module here because this is" +" the object that is bound to a name by the :keyword:`import` statement." +msgstr "" +"ここで :func:`__import__` がどのように最上位モジュールを返しているかに注意して下さい。 :keyword:`import` " +"文により名前が束縛されたオブジェクトになっています。" + +#: ../../builtins/functions.rst:2366 +msgid "" +"On the other hand, the statement ``from spam.ham import eggs, sausage as " +"saus`` results in ::" +msgstr "一方で、文 ``from spam.ham import eggs, sausage as saus`` は、以下となります ::" + +#: ../../builtins/functions.rst:2369 +msgid "" +"_temp = __import__('spam.ham', globals(), locals(), ['eggs', 'sausage'], 0)\n" +"eggs = _temp.eggs\n" +"saus = _temp.sausage" +msgstr "" +"_temp = __import__('spam.ham', globals(), locals(), ['eggs', 'sausage'], 0)\n" +"eggs = _temp.eggs\n" +"saus = _temp.sausage" + +#: ../../builtins/functions.rst:2373 +msgid "" +"Here, the ``spam.ham`` module is returned from :func:`__import__`. From " +"this object, the names to import are retrieved and assigned to their " +"respective names." +msgstr "" +"ここで、:func:`__import__` から ``spam.ham`` " +"モジュールが返されます。このオブジェクトから、インポートされる名前が取り出され、それぞれの名前として代入されます。" + +#: ../../builtins/functions.rst:2377 +msgid "" +"If you simply want to import a module (potentially within a package) by " +"name, use :func:`importlib.import_module`." +msgstr "" +"単純に名前からモジュール (パッケージの範囲内であるかも知れません) をインポートしたいなら、 " +":func:`importlib.import_module` を使ってください。" + +#: ../../builtins/functions.rst:2380 +msgid "" +"Negative values for *level* are no longer supported (which also changes the " +"default value to 0)." +msgstr "負の *level* の値はサポートされなくなりました (デフォルト値の 0 に変更されます)。" + +#: ../../builtins/functions.rst:2384 +msgid "" +"When the command line options :option:`-E` or :option:`-I` are being used, " +"the environment variable :envvar:`PYTHONCASEOK` is now ignored." +msgstr "" +"コマンドラインオプション :option:`-E` or :option:`-I` が指定された場合、環境変数 " +":envvar:`PYTHONCASEOK` は無視されるようになりました。" + +#: ../../builtins/functions.rst:2389 +msgid "Footnotes" +msgstr "脚注" + +#: ../../builtins/functions.rst:2390 +msgid "" +"Note that the parser only accepts the Unix-style end of line convention. If " +"you are reading the code from a file, make sure to use newline conversion " +"mode to convert Windows or Mac-style newlines." +msgstr "" +"なお、パーサは Unix スタイルの行末の記法しか受け付けません。コードをファイルから読んでいるなら、必ず、改行変換モードで Windows や Mac" +" スタイルの改行を変換してください。" + +#: ../../builtins/functions.rst:158 +msgid "Boolean" +msgstr "Boolean" + +#: ../../builtins/functions.rst:158 ../../builtins/functions.rst:2148 +msgid "type" +msgstr "type" + +#: ../../builtins/functions.rst:674 +msgid "built-in function" +msgstr "組み込み関数" + +#: ../../builtins/functions.rst:674 +msgid "exec" +msgstr "exec" + +#: ../../builtins/functions.rst:777 +msgid "NaN" +msgstr "NaN" + +#: ../../builtins/functions.rst:777 +msgid "Infinity" +msgstr "Infinity" + +#: ../../builtins/functions.rst:847 +msgid "__format__" +msgstr "__format__" + +#: ../../builtins/functions.rst:847 ../../builtins/functions.rst:2016 +msgid "string" +msgstr "string" + +#: ../../builtins/functions.rst:847 +msgid "format() (built-in function)" +msgstr "format() (組み込み関数)" + +#: ../../builtins/functions.rst:1376 +msgid "file object" +msgstr "file object" + +#: ../../builtins/functions.rst:1376 ../../builtins/functions.rst:1469 +msgid "open() built-in function" +msgstr "open() built-in function" + +#: ../../builtins/functions.rst:1404 +msgid "file" +msgstr "ファイル" + +#: ../../builtins/functions.rst:1404 +msgid "modes" +msgstr "modes" + +#: ../../builtins/functions.rst:1469 +msgid "universal newlines" +msgstr "universal newlines" + +#: ../../builtins/functions.rst:1530 +msgid "line-buffered I/O" +msgstr "line-buffered I/O" + +#: ../../builtins/functions.rst:1530 +msgid "unbuffered I/O" +msgstr "unbuffered I/O" + +#: ../../builtins/functions.rst:1530 +msgid "buffer size, I/O" +msgstr "buffer size, I/O" + +#: ../../builtins/functions.rst:1530 +msgid "I/O control" +msgstr "I/O control" + +#: ../../builtins/functions.rst:1530 +msgid "buffering" +msgstr "buffering" + +#: ../../builtins/functions.rst:1530 +msgid "text mode" +msgstr "text mode" + +#: ../../builtins/functions.rst:1530 ../../builtins/functions.rst:2318 +msgid "module" +msgstr "module" + +#: ../../builtins/functions.rst:1530 +msgid "sys" +msgstr "sys" + +#: ../../builtins/functions.rst:2016 +msgid "str() (built-in function)" +msgstr "str() (built-in function)" + +#: ../../builtins/functions.rst:2148 +msgid "object" +msgstr "object" + +#: ../../builtins/functions.rst:2318 +msgid "statement" +msgstr "statement" + +#: ../../builtins/functions.rst:2318 +msgid "import" +msgstr "import" + +#: ../../builtins/functions.rst:2318 +msgid "builtins" +msgstr "builtins" diff --git a/builtins/index.po b/builtins/index.po new file mode 100644 index 000000000..cb2e0b5be --- /dev/null +++ b/builtins/index.po @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" +"PO-Revision-Date: 2026-09-13 17:09+0000\n" +"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../../builtins/index.rst:5 +msgid "Python built-ins reference" +msgstr "" + +#: ../../builtins/index.rst:7 +msgid "Python comes with a number of built-in functions and classes." +msgstr "" + +#: ../../builtins/index.rst:9 +msgid "" +"The built-in classes include data types that would normally be considered " +"part of the \"core\" of a language, such as numbers and lists. For these " +"types, the Python language core defines the form of literals and places some" +" constraints on their semantics, but does not fully define the semantics." +msgstr "" + +#: ../../builtins/index.rst:14 +msgid "" +"The built-ins also include functions and exceptions --- objects that can be " +"used by all Python code without the need of an :keyword:`import` statement. " +"Some of these are defined by the core language, but many are not essential " +"for the core semantics and are only described here." +msgstr "" + +#: ../../builtins/index.rst:21 +msgid "" +"In addition to the built-ins, Python provides an extensive importable " +"standard library, see :ref:`library-index`." +msgstr "" diff --git a/builtins/stdtypes.po b/builtins/stdtypes.po new file mode 100644 index 000000000..0e57b5292 --- /dev/null +++ b/builtins/stdtypes.po @@ -0,0 +1,10546 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# Rafael Fontenelle , 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" +"PO-Revision-Date: 2026-09-13 17:09+0000\n" +"Last-Translator: Rafael Fontenelle , 2026\n" +"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../../builtins/stdtypes.rst:8 +msgid "Built-in Types" +msgstr "組み込み型" + +#: ../../builtins/stdtypes.rst:10 +msgid "" +"The following sections describe the standard types that are built into the " +"interpreter." +msgstr "以下のセクションでは、インタプリタに組み込まれている標準型について記述します。" + +#: ../../builtins/stdtypes.rst:15 +msgid "" +"The principal built-in types are numerics, sequences, mappings, classes, " +"instances and exceptions." +msgstr "主要な組み込み型は、数値、シーケンス、マッピング、クラス、インスタンス、および例外です。" + +#: ../../builtins/stdtypes.rst:18 +msgid "" +"Some collection classes are mutable. The methods that add, subtract, or " +"rearrange their members in place, and don't return a specific item, never " +"return the collection instance itself but ``None``." +msgstr "" +"コレクションクラスには、ミュータブルなものがあります。コレクションのメンバをインプレースに足し、引き、または並べ替えて、特定の要素を返さないメソッドは、コレクション自身ではなく" +" ``None`` を返します。" + +#: ../../builtins/stdtypes.rst:22 +msgid "" +"Some operations are supported by several object types; in particular, " +"practically all objects can be compared for equality, tested for truth " +"value, and converted to a string (with the :func:`repr` function or the " +"slightly different :func:`str` function). The latter function is implicitly" +" used when an object is written by the :func:`print` function." +msgstr "" +"演算には、複数の型でサポートされているものがあります; 特に、ほぼ全てのオブジェクトは、等価比較でき、真理値を判定でき、 (:func:`repr` " +"関数や、わずかに異なる :func:`str` 関数によって) 文字列に変換できます。オブジェクトが :func:`print` " +"関数で印字されるとき、文字列に変換する関数が暗黙に使われます。" + +#: ../../builtins/stdtypes.rst:32 +msgid "Truth Value Testing" +msgstr "真理値判定" + +#: ../../builtins/stdtypes.rst:41 +msgid "" +"Any object can be tested for truth value, for use in an :keyword:`if` or " +":keyword:`while` condition or as operand of the Boolean operations below." +msgstr "" +"どのようなオブジェクトでも真理値として判定でき、 :keyword:`if` や :keyword:`while` " +"の条件あるいは以下のブール演算の被演算子として使えます。" + +#: ../../builtins/stdtypes.rst:46 +msgid "" +"By default, an object is considered true unless its class defines either a " +":meth:`~object.__bool__` method that returns ``False`` or a " +":meth:`~object.__len__` method that returns zero, when called with the " +"object. [1]_ If one of the methods raises an exception when called, the " +"exception is propagated and the object does not have a truth value (for " +"example, :data:`NotImplemented`). Here are most of the built-in objects " +"considered false:" +msgstr "" + +#: ../../builtins/stdtypes.rst:58 +msgid "constants defined to be false: ``None`` and ``False``" +msgstr "偽であると定義されている定数: ``None`` と ``False``" + +#: ../../builtins/stdtypes.rst:60 +msgid "" +"zero of any numeric type: ``0``, ``0.0``, ``0j``, ``Decimal(0)``, " +"``Fraction(0, 1)``" +msgstr "数値型におけるゼロ: ``0``, ``0.0``, ``0j``, ``Decimal(0)``, ``Fraction(0, 1)``" + +#: ../../builtins/stdtypes.rst:63 +msgid "" +"empty sequences and collections: ``''``, ``()``, ``[]``, ``{}``, ``set()``, " +"``range(0)``" +msgstr "" +"空のシーケンスまたはコレクション: ``''``, ``()``, ``[]``, ``{}``, ``set()``, ``range(0)``" + +#: ../../builtins/stdtypes.rst:72 +msgid "" +"Operations and built-in functions that have a Boolean result always return " +"``0`` or ``False`` for false and ``1`` or ``True`` for true, unless " +"otherwise stated. (Important exception: the Boolean operations ``or`` and " +"``and`` always return one of their operands.)" +msgstr "" +"ブール値の結果を返す演算および組み込み関数は、特に注釈のない限り常に偽値として ``0`` または ``False`` を返し、真値として ``1`` " +"または ``True`` を返します。 (重要な例外: ブール演算 ``or`` および ``and`` は常に被演算子のうちの一つを返します。)" + +#: ../../builtins/stdtypes.rst:81 +msgid "" +"Boolean Operations --- :keyword:`!and`, :keyword:`!or`, :keyword:`!not`" +msgstr "ブール演算 --- :keyword:`!and`, :keyword:`!or`, :keyword:`!not`" + +#: ../../builtins/stdtypes.rst:85 +msgid "These are the Boolean operations, ordered by ascending priority:" +msgstr "以下にブール演算を、優先順位が低い順に示します:" + +#: ../../builtins/stdtypes.rst:88 ../../builtins/stdtypes.rst:146 +#: ../../builtins/stdtypes.rst:292 ../../builtins/stdtypes.rst:382 +#: ../../builtins/stdtypes.rst:432 ../../builtins/stdtypes.rst:1018 +#: ../../builtins/stdtypes.rst:1242 +msgid "Operation" +msgstr "演算" + +#: ../../builtins/stdtypes.rst:88 ../../builtins/stdtypes.rst:292 +#: ../../builtins/stdtypes.rst:382 ../../builtins/stdtypes.rst:432 +#: ../../builtins/stdtypes.rst:1018 ../../builtins/stdtypes.rst:1242 +msgid "Result" +msgstr "結果" + +#: ../../builtins/stdtypes.rst:88 ../../builtins/stdtypes.rst:292 +#: ../../builtins/stdtypes.rst:432 ../../builtins/stdtypes.rst:1018 +#: ../../builtins/stdtypes.rst:1242 ../../builtins/stdtypes.rst:3213 +#: ../../builtins/stdtypes.rst:4515 +msgid "Notes" +msgstr "注釈" + +#: ../../builtins/stdtypes.rst:90 +msgid "``x or y``" +msgstr "``x or y``" + +#: ../../builtins/stdtypes.rst:90 +msgid "if *x* is true, then *x*, else *y*" +msgstr "*x* が真なら *x*, そうでなければ *y*" + +#: ../../builtins/stdtypes.rst:90 ../../builtins/stdtypes.rst:1020 +#: ../../builtins/stdtypes.rst:1023 ../../builtins/stdtypes.rst:1257 +#: ../../builtins/stdtypes.rst:3219 ../../builtins/stdtypes.rst:4521 +msgid "\\(1)" +msgstr "\\(1)" + +#: ../../builtins/stdtypes.rst:93 +msgid "``x and y``" +msgstr "``x and y``" + +#: ../../builtins/stdtypes.rst:93 +msgid "if *x* is false, then *x*, else *y*" +msgstr "*x* が偽なら *x*, そうでなければ *y*" + +#: ../../builtins/stdtypes.rst:93 ../../builtins/stdtypes.rst:305 +#: ../../builtins/stdtypes.rst:325 ../../builtins/stdtypes.rst:1268 +#: ../../builtins/stdtypes.rst:3223 ../../builtins/stdtypes.rst:3225 +#: ../../builtins/stdtypes.rst:4525 ../../builtins/stdtypes.rst:4527 +msgid "\\(2)" +msgstr "\\(2)" + +#: ../../builtins/stdtypes.rst:96 +msgid "``not x``" +msgstr "``not x``" + +#: ../../builtins/stdtypes.rst:96 +msgid "if *x* is false, then ``True``, else ``False``" +msgstr "*x* が偽なら ``True``, そうでなければ ``False``" + +#: ../../builtins/stdtypes.rst:96 ../../builtins/stdtypes.rst:3227 +#: ../../builtins/stdtypes.rst:3229 ../../builtins/stdtypes.rst:3231 +#: ../../builtins/stdtypes.rst:3233 ../../builtins/stdtypes.rst:4529 +#: ../../builtins/stdtypes.rst:4531 ../../builtins/stdtypes.rst:4533 +#: ../../builtins/stdtypes.rst:4535 +msgid "\\(3)" +msgstr "\\(3)" + +#: ../../builtins/stdtypes.rst:105 ../../builtins/stdtypes.rst:336 +#: ../../builtins/stdtypes.rst:450 ../../builtins/stdtypes.rst:1062 +#: ../../builtins/stdtypes.rst:1272 ../../builtins/stdtypes.rst:3263 +#: ../../builtins/stdtypes.rst:4565 +msgid "Notes:" +msgstr "注釈:" + +#: ../../builtins/stdtypes.rst:108 +msgid "" +"This is a short-circuit operator, so it only evaluates the second argument " +"if the first one is false." +msgstr "この演算子は短絡評価されます。つまり第一引数が偽のときにのみ、第二引数が評価されます。" + +#: ../../builtins/stdtypes.rst:112 +msgid "" +"This is a short-circuit operator, so it only evaluates the second argument " +"if the first one is true." +msgstr "この演算子は短絡評価されます。つまり第一引数が真のときにのみ、第二引数が評価されます。" + +#: ../../builtins/stdtypes.rst:116 +msgid "" +"``not`` has a lower priority than non-Boolean operators, so ``not a == b`` " +"is interpreted as ``not (a == b)``, and ``a == not b`` is a syntax error." +msgstr "" +"``not`` は非ブール演算子よりも優先度が低いので、 ``not a == b`` は ``not (a == b)`` と解釈され、 ``a ==" +" not b`` は構文エラーです。" + +#: ../../builtins/stdtypes.rst:123 +msgid "Comparisons" +msgstr "比較" + +#: ../../builtins/stdtypes.rst:137 +msgid "" +"There are eight comparison operations in Python. They all have the same " +"priority (which is higher than that of the Boolean operations). Comparisons" +" can be chained arbitrarily; for example, ``x < y <= z`` is equivalent to " +"``x < y and y <= z``, except that *y* is evaluated only once (but in both " +"cases *z* is not evaluated at all when ``x < y`` is found to be false)." +msgstr "" +"Python には 8 種の比較演算があります。比較演算の優先順位は全て同じです (ブール演算より高い優先順位です)。比較は任意に連鎖できます; " +"例えば、 ``x < y <= z`` は ``x < y and y <= z`` とほぼ等価ですが、この *y* は一度だけしか評価されません " +"(どちらにしても、 ``x < y`` が偽となれば *z* は評価されません)。" + +#: ../../builtins/stdtypes.rst:143 +msgid "This table summarizes the comparison operations:" +msgstr "以下の表に比較演算をまとめます:" + +#: ../../builtins/stdtypes.rst:146 ../../builtins/stdtypes.rst:3190 +#: ../../builtins/stdtypes.rst:3213 ../../builtins/stdtypes.rst:4492 +#: ../../builtins/stdtypes.rst:4515 +msgid "Meaning" +msgstr "意味" + +#: ../../builtins/stdtypes.rst:148 +msgid "``<``" +msgstr "``<``" + +#: ../../builtins/stdtypes.rst:148 +msgid "strictly less than" +msgstr "より小さい" + +#: ../../builtins/stdtypes.rst:150 +msgid "``<=``" +msgstr "``<=``" + +#: ../../builtins/stdtypes.rst:150 +msgid "less than or equal" +msgstr "以下" + +#: ../../builtins/stdtypes.rst:152 +msgid "``>``" +msgstr "``>``" + +#: ../../builtins/stdtypes.rst:152 +msgid "strictly greater than" +msgstr "より大きい" + +#: ../../builtins/stdtypes.rst:154 +msgid "``>=``" +msgstr "``>=``" + +#: ../../builtins/stdtypes.rst:154 +msgid "greater than or equal" +msgstr "以上" + +#: ../../builtins/stdtypes.rst:156 +msgid "``==``" +msgstr "``==``" + +#: ../../builtins/stdtypes.rst:156 +msgid "equal" +msgstr "等しい" + +#: ../../builtins/stdtypes.rst:158 +msgid "``!=``" +msgstr "``!=``" + +#: ../../builtins/stdtypes.rst:158 +msgid "not equal" +msgstr "等しくない" + +#: ../../builtins/stdtypes.rst:160 +msgid "``is``" +msgstr "``is``" + +#: ../../builtins/stdtypes.rst:160 +msgid "object identity" +msgstr "同一のオブジェクトである" + +#: ../../builtins/stdtypes.rst:162 +msgid "``is not``" +msgstr "``is not``" + +#: ../../builtins/stdtypes.rst:162 +msgid "negated object identity" +msgstr "同一のオブジェクトでない" + +#: ../../builtins/stdtypes.rst:169 +msgid "" +"Unless stated otherwise, objects of different types never compare equal. The" +" ``==`` operator is always defined but for some object types (for example, " +"class objects) is equivalent to :keyword:`is`. The ``<``, ``<=``, ``>`` and " +"``>=`` operators are only defined where they make sense; for example, they " +"raise a :exc:`TypeError` exception when one of the arguments is a complex " +"number." +msgstr "" +"明記されている場合を除き、異なる型のオブジェクト同士は等価になることはありません。 ``==`` " +"演算子は常に定義されていますが、いくつかのオブジェクト型 (たとえばクラスオブジェクト) では :keyword:`is` と同等になります。 " +"``<``, ``<=``, ``>`` および ``>=`` 演算子は、それらの意味が明快である場合に限って定義されます; " +"たとえば、オペランドのいずれかが複素数である場合、これらの演算子は :exc:`TypeError` 例外を送出します。" + +#: ../../builtins/stdtypes.rst:183 +msgid "" +"Non-identical instances of a class normally compare as non-equal unless the " +"class defines the :meth:`~object.__eq__` method." +msgstr "" +"あるクラスの同一でないインスタンスは、通常等価でないとされますが、そのクラスが :meth:`~object.__eq__` " +"メソッドを定義している場合は除きます。" + +#: ../../builtins/stdtypes.rst:186 +msgid "" +"Instances of a class cannot be ordered with respect to other instances of " +"the same class, or other types of object, unless the class defines enough of" +" the methods :meth:`~object.__lt__`, :meth:`~object.__le__`, " +":meth:`~object.__gt__`, and :meth:`~object.__ge__` (in general, " +":meth:`~object.__lt__` and :meth:`~object.__eq__` are sufficient, if you " +"want the conventional meanings of the comparison operators)." +msgstr "" +"クラスのインスタンスは、そのクラスがメソッド :meth:`~object.__lt__` 、 :meth:`~object.__le__` 、 " +":meth:`~object.__gt__` 、 :meth:`~object.__ge__` " +"のうち十分なものを定義していない限り、同じクラスの別のインスタンスや他の型のオブジェクトとは順序付けできません " +"(一般に、比較演算子の通常の意味を求めるなら、 :meth:`~object.__lt__` と :meth:`~object.__eq__` " +"だけで十分です)。" + +#: ../../builtins/stdtypes.rst:193 +msgid "" +"The behavior of the :keyword:`is` and :keyword:`is not` operators cannot be " +"customized; also they can be applied to any two objects and never raise an " +"exception." +msgstr "" +":keyword:`is` および :keyword:`is not` 演算子の振る舞いはカスタマイズできません。また、これらはいかなる 2 " +"つのオブジェクトにも適用でき、決して例外を送出しません。" + +#: ../../builtins/stdtypes.rst:201 +msgid "" +"Two more operations with the same syntactic priority, :keyword:`in` and " +":keyword:`not in`, are supported by types that are :term:`iterable` or " +"implement the :meth:`~object.__contains__` method." +msgstr "" +":keyword:`in` と :keyword:`not in` という構文上で同じ優先度を持つ演算子がさらに 2 つあり、 " +":term:`iterable` または :meth:`~object.__contains__` を実装した型でサポートされています。" + +#: ../../builtins/stdtypes.rst:208 +msgid "Numeric Types --- :class:`int`, :class:`float`, :class:`complex`" +msgstr "数値型 :class:`int`, :class:`float`, :class:`complex`" + +#: ../../builtins/stdtypes.rst:218 +msgid "" +"There are three distinct numeric types: :dfn:`integers`, :dfn:`floating-" +"point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a " +"subtype of integers. Integers have unlimited precision. Floating-point " +"numbers are usually implemented using :c:expr:`double` in C; information " +"about the precision and internal representation of floating-point numbers " +"for the machine on which your program is running is available in " +":data:`sys.float_info`. Complex numbers have a real and imaginary part, " +"which are each a floating-point number. To extract these parts from a " +"complex number *z*, use ``z.real`` and ``z.imag``. (The standard library " +"includes the additional numeric types :mod:`fractions.Fraction`, for " +"rationals, and :mod:`decimal.Decimal`, for floating-point numbers with user-" +"definable precision.)" +msgstr "" +"数値型には 3 種類あります: :dfn:`整数` 、 :dfn:`浮動小数点数` 、 :dfn:`複素数` " +"です。さらに、ブール型は整数のサブタイプです。整数には精度の制限がありません。浮動小数点型はたいていは C の :c:expr:`double` " +"を使って実装されています; あなたのプログラムが動作するマシンでの浮動小数点型の精度と内部表現は、 :data:`sys.float_info` " +"から入手可能です。複素数は実部と虚部を持ち、それぞれが浮動小数点数です。複素数 *z* から実部および虚部を取り出すには、 ``z.real`` および" +" ``z.imag`` を使ってください。 (標準ライブラリには、さらに分数のための数値型 :mod:`fractions.Fraction` " +"や、ユーザによる精度の定義が可能な浮動小数点数のための :mod:`decimal.Decimal` があります。)" + +#: ../../builtins/stdtypes.rst:240 +msgid "" +"Numbers are created by numeric literals or as the result of built-in " +"functions and operators. Unadorned integer literals (including hex, octal " +"and binary numbers) yield integers. Numeric literals containing a decimal " +"point or an exponent sign yield floating-point numbers. Appending ``'j'`` " +"or ``'J'`` to a numeric literal yields an imaginary number (a complex number" +" with a zero real part) which you can add to an integer or float to get a " +"complex number with real and imaginary parts." +msgstr "" +"数値は、数値リテラルによって、あるいは組み込み関数や演算子の戻り値として生成されます。 (十六進、八進、二進数を含む) " +"修飾のない整数リテラルは、整数を生成します。小数点または指数表記を含む数値リテラルは浮動小数点数を生成します。数値リテラルに ``'j'`` または " +"``'J'`` をつけると純虚数 (実部がゼロの複素数) " +"を生成し、それに整数や浮動小数点数を加えることにより実部と虚部を持つ複素数を得ることができます。" + +#: ../../builtins/stdtypes.rst:248 +msgid "" +"The constructors :func:`int`, :func:`float`, and :func:`complex` can be used" +" to produce numbers of a specific type." +msgstr "" +"コンストラクタ :func:`int` 、 :func:`float` 、 :func:`complex` で、特定の型の数を生成できます。" + +#: ../../builtins/stdtypes.rst:270 +msgid "" +"Python fully supports mixed arithmetic: when a binary arithmetic operator " +"has operands of different built-in numeric types, the operand with the " +"\"narrower\" type is widened to that of the other:" +msgstr "" + +#: ../../builtins/stdtypes.rst:274 +msgid "If both arguments are complex numbers, no conversion is performed;" +msgstr "" + +#: ../../builtins/stdtypes.rst:275 +msgid "" +"if either argument is a complex or a floating-point number, the other is " +"converted to a floating-point number;" +msgstr "" + +#: ../../builtins/stdtypes.rst:277 +msgid "otherwise, both must be integers and no conversion is necessary." +msgstr "それ以外場合は、両方の引数は整数でなければならず、変換の必要はありません。" + +#: ../../builtins/stdtypes.rst:279 +msgid "" +"Arithmetic with complex and real operands is defined by the usual " +"mathematical formula, for example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:282 +msgid "" +"x + complex(u, v) = complex(x + u, v)\n" +"x * complex(u, v) = complex(x * u, x * v)" +msgstr "" +"x + complex(u, v) = complex(x + u, v)x * complex(u, v) = complex(x * u, x * " +"v)" + +#: ../../builtins/stdtypes.rst:285 +msgid "" +"A comparison between numbers of different types behaves as though the exact " +"values of those numbers were being compared. [2]_" +msgstr "" + +#: ../../builtins/stdtypes.rst:288 +msgid "" +"All numeric types (except complex) support the following operations (for " +"priorities of the operations, see :ref:`operator-summary`):" +msgstr "" +"全ての (複素数を除く) 組み込み数値型は以下の演算に対応しています (演算の優先順位については、 :ref:`operator-summary` " +"を参照してください):" + +#: ../../builtins/stdtypes.rst:292 +msgid "Full documentation" +msgstr "完全なドキュメント" + +#: ../../builtins/stdtypes.rst:294 +msgid "``x + y``" +msgstr "``x + y``" + +#: ../../builtins/stdtypes.rst:294 +msgid "sum of *x* and *y*" +msgstr "*x* と *y* の和" + +#: ../../builtins/stdtypes.rst:296 +msgid "``x - y``" +msgstr "``x - y``" + +#: ../../builtins/stdtypes.rst:296 +msgid "difference of *x* and *y*" +msgstr "*x* と *y* の差" + +#: ../../builtins/stdtypes.rst:298 +msgid "``x * y``" +msgstr "``x * y``" + +#: ../../builtins/stdtypes.rst:298 +msgid "product of *x* and *y*" +msgstr "*x* と *y* の積" + +#: ../../builtins/stdtypes.rst:300 +msgid "``x / y``" +msgstr "``x / y``" + +#: ../../builtins/stdtypes.rst:300 +msgid "quotient of *x* and *y*" +msgstr "*x* と *y* の商" + +#: ../../builtins/stdtypes.rst:302 +msgid "``x // y``" +msgstr "``x // y``" + +#: ../../builtins/stdtypes.rst:302 +msgid "floored quotient of *x* and *y*" +msgstr "*x* と *y* の商を切り下げたもの" + +#: ../../builtins/stdtypes.rst:302 +msgid "\\(1)\\(2)" +msgstr "\\(1)\\(2)" + +#: ../../builtins/stdtypes.rst:305 +msgid "``x % y``" +msgstr "``x % y``" + +#: ../../builtins/stdtypes.rst:305 +msgid "remainder of ``x / y``" +msgstr "``x / y`` の剰余" + +#: ../../builtins/stdtypes.rst:307 +msgid "``-x``" +msgstr "``-x``" + +#: ../../builtins/stdtypes.rst:307 +msgid "*x* negated" +msgstr "*x* の符号反転" + +#: ../../builtins/stdtypes.rst:309 +msgid "``+x``" +msgstr "``+x``" + +#: ../../builtins/stdtypes.rst:309 +msgid "*x* unchanged" +msgstr "*x* そのまま" + +#: ../../builtins/stdtypes.rst:311 +msgid "``abs(x)``" +msgstr "``abs(x)``" + +#: ../../builtins/stdtypes.rst:311 +msgid "absolute value or magnitude of *x*" +msgstr "*x* の絶対値または大きさ" + +#: ../../builtins/stdtypes.rst:311 +msgid ":func:`abs`" +msgstr ":func:`abs`" + +#: ../../builtins/stdtypes.rst:314 +msgid "``int(x)``" +msgstr "``int(x)``" + +#: ../../builtins/stdtypes.rst:314 +msgid "*x* converted to integer" +msgstr "*x* の整数への変換" + +#: ../../builtins/stdtypes.rst:314 +msgid "\\(3)\\(6)" +msgstr "\\(3)\\(6)" + +#: ../../builtins/stdtypes.rst:314 +msgid ":func:`int`" +msgstr ":func:`int`" + +#: ../../builtins/stdtypes.rst:316 +msgid "``float(x)``" +msgstr "``float(x)``" + +#: ../../builtins/stdtypes.rst:316 +msgid "*x* converted to floating point" +msgstr "*x* の浮動小数点数への変換" + +#: ../../builtins/stdtypes.rst:316 +msgid "\\(4)\\(6)" +msgstr "\\(4)\\(6)" + +#: ../../builtins/stdtypes.rst:316 +msgid ":func:`float`" +msgstr ":func:`float`" + +#: ../../builtins/stdtypes.rst:318 +msgid "``complex(re, im)``" +msgstr "``complex(re, im)``" + +#: ../../builtins/stdtypes.rst:318 +msgid "" +"a complex number with real part *re*, imaginary part *im*. *im* defaults to " +"zero." +msgstr "実部 *re*, 虚部 *im* の複素数。 *im* の既定値はゼロ。" + +#: ../../builtins/stdtypes.rst:318 ../../builtins/stdtypes.rst:3221 +#: ../../builtins/stdtypes.rst:4552 +msgid "\\(6)" +msgstr "\\(6)" + +#: ../../builtins/stdtypes.rst:318 +msgid ":func:`complex`" +msgstr ":func:`complex`" + +#: ../../builtins/stdtypes.rst:322 +msgid "``c.conjugate()``" +msgstr "``c.conjugate()``" + +#: ../../builtins/stdtypes.rst:322 +msgid "conjugate of the complex number *c*" +msgstr "複素数 *c* の共役複素数" + +#: ../../builtins/stdtypes.rst:325 +msgid "``divmod(x, y)``" +msgstr "``divmod(x, y)``" + +#: ../../builtins/stdtypes.rst:325 +msgid "the pair ``(x // y, x % y)``" +msgstr "``(x // y, x % y)`` からなるペア" + +#: ../../builtins/stdtypes.rst:325 +msgid ":func:`divmod`" +msgstr ":func:`divmod`" + +#: ../../builtins/stdtypes.rst:327 +msgid "``pow(x, y)``" +msgstr "``pow(x, y)``" + +#: ../../builtins/stdtypes.rst:327 ../../builtins/stdtypes.rst:329 +msgid "*x* to the power *y*" +msgstr "*x* の *y* 乗" + +#: ../../builtins/stdtypes.rst:327 ../../builtins/stdtypes.rst:329 +#: ../../builtins/stdtypes.rst:3246 ../../builtins/stdtypes.rst:3249 +#: ../../builtins/stdtypes.rst:3252 ../../builtins/stdtypes.rst:4548 +#: ../../builtins/stdtypes.rst:4555 +msgid "\\(5)" +msgstr "\\(5)" + +#: ../../builtins/stdtypes.rst:327 +msgid ":func:`pow`" +msgstr ":func:`pow`" + +#: ../../builtins/stdtypes.rst:329 +msgid "``x ** y``" +msgstr "``x ** y``" + +#: ../../builtins/stdtypes.rst:339 +msgid "" +"Also referred to as integer division. For operands of type :class:`int`, " +"the result has type :class:`int`. For operands of type :class:`float`, the " +"result has type :class:`float`. In general, the result is a whole integer, " +"though the result's type is not necessarily :class:`int`. The result is " +"always rounded towards minus infinity: ``1//2`` is ``0``, ``(-1)//2`` is " +"``-1``, ``1//(-2)`` is ``-1``, and ``(-1)//(-2)`` is ``0``." +msgstr "" +"整数の除算とも呼ばれます。 :class:`int` 型のオペランドに対しては、結果は :class:`int` 型になります。 " +":class:`float` 型のオペランドに対しては、結果は :class:`float` 型になります。一般に結果の型は必ずしも " +":class:`int` 型ではありませんが、結果は常に整数です。結果は常に負の無限大の方向に丸められます: ``1//2`` は ``0`` 、 " +"``(-1)//2`` は ``-1`` 、 ``1//(-2)`` は ``-1`` 、そして ``(-1)//(-2)`` は ``0`` です。" + +#: ../../builtins/stdtypes.rst:347 +msgid "" +"Not for complex numbers. Instead convert to floats using :func:`abs` if " +"appropriate." +msgstr "複素数型には使えません。適用可能な場合には代わりに :func:`abs` で浮動小数点型に変換してください。" + +#: ../../builtins/stdtypes.rst:358 +msgid "" +"Conversion from :class:`float` to :class:`int` truncates, discarding the " +"fractional part. See functions :func:`math.floor` and :func:`math.ceil` for " +"alternative conversions." +msgstr "" +":class:`float` から :class:`int` への変換は小数点以下を切り捨てます。別の変換方法については関数 " +":func:`math.floor` や :func:`math.ceil` を参照してください。" + +#: ../../builtins/stdtypes.rst:363 +msgid "" +"float also accepts the strings \"nan\" and \"inf\" with an optional prefix " +"\"+\" or \"-\" for Not a Number (NaN) and positive or negative infinity." +msgstr "" +"浮動小数点数は、文字列 \"nan\" と \"inf\" を、オプションの接頭辞 \"+\" または \"-\" と共に、非数 (Not a " +"Number (NaN)) や正、負の無限大として受け付けます。" + +#: ../../builtins/stdtypes.rst:367 +msgid "" +"Python defines ``pow(0, 0)`` and ``0 ** 0`` to be ``1``, as is common for " +"programming languages." +msgstr "" +"Python は、プログラム言語一般でそうであるように、 ``pow(0, 0)`` および ``0 ** 0`` を ``1`` と定義します。" + +#: ../../builtins/stdtypes.rst:371 +msgid "" +"The numeric literals accepted include the digits ``0`` to ``9`` or any " +"Unicode equivalent (code points with the ``Nd`` property)." +msgstr "" +"受け付けられる数値リテラルは数字 ``0`` から ``9`` または等価な Unicode (``Nd`` プロパティを持つコードポイント) " +"を含みます。" + +#: ../../builtins/stdtypes.rst:374 +msgid "" +"See `the Unicode Standard " +"`_ for " +"a complete list of code points with the ``Nd`` property." +msgstr "" +"``Nd`` プロパティを持つコードポイントの完全なリストは `Unicode 標準 " +"`_ " +"をご覧ください。" + +#: ../../builtins/stdtypes.rst:378 +msgid "" +"All :class:`numbers.Real` types (:class:`int` and :class:`float`) also " +"include the following operations:" +msgstr "" +"全ての :class:`numbers.Real` 型 (:class:`int` 、 :class:`float`) は以下の演算も含みます:" + +#: ../../builtins/stdtypes.rst:384 +msgid ":func:`math.trunc(\\ x) `" +msgstr ":func:`math.trunc(\\ x) `" + +#: ../../builtins/stdtypes.rst:384 +msgid "*x* truncated to :class:`~numbers.Integral`" +msgstr "*x* を :class:`~numbers.Integral` (整数) に切り捨てます" + +#: ../../builtins/stdtypes.rst:387 +msgid ":func:`round(x[, n]) `" +msgstr ":func:`round(x[, n]) `" + +#: ../../builtins/stdtypes.rst:387 +msgid "" +"*x* rounded to *n* digits, rounding half to even. If *n* is omitted, it " +"defaults to 0." +msgstr "*x* を *n* 桁に丸めます。丸め方は偶数丸めです。 *n* が省略されれば 0 がデフォルトとなります。" + +#: ../../builtins/stdtypes.rst:391 +msgid ":func:`math.floor(\\ x) `" +msgstr ":func:`math.floor(\\ x) `" + +#: ../../builtins/stdtypes.rst:391 +msgid "the greatest :class:`~numbers.Integral` <= *x*" +msgstr "*x* 以下の最大の :class:`~numbers.Integral` (整数) を返します" + +#: ../../builtins/stdtypes.rst:394 +msgid ":func:`math.ceil(x) `" +msgstr ":func:`math.ceil(x) `" + +#: ../../builtins/stdtypes.rst:394 +msgid "the least :class:`~numbers.Integral` >= *x*" +msgstr "*x* 以上の最小の :class:`~numbers.Integral` (整数) を返します" + +#: ../../builtins/stdtypes.rst:398 +msgid "" +"For additional numeric operations see the :mod:`math` and :mod:`cmath` " +"modules." +msgstr "その他の数値演算は、 :mod:`math` や :mod:`cmath` モジュールをご覧ください。" + +#: ../../builtins/stdtypes.rst:407 +msgid "Bitwise Operations on Integer Types" +msgstr "整数型におけるビット単位演算" + +#: ../../builtins/stdtypes.rst:421 +msgid "" +"Bitwise operations only make sense for integers. The result of bitwise " +"operations is calculated as though carried out in two's complement with an " +"infinite number of sign bits." +msgstr "" +"ビット単位演算は整数についてのみ意味を持ちます。\n" +"ビット単位演算の結果は、あたかも両方の値の先頭を無限個の符号ビットで埋めたものに対して計算したかのような値になります。" + +#: ../../builtins/stdtypes.rst:425 +msgid "" +"The priorities of the binary bitwise operations are all lower than the " +"numeric operations and higher than the comparisons; the unary operation " +"``~`` has the same priority as the other unary numeric operations (``+`` and" +" ``-``)." +msgstr "" +"二項ビット単位演算の優先順位は全て、数値演算よりも低く、比較よりも高くなっています; 単項演算 ``~`` の優先順位は他の単項数値演算 (``+`` " +"および ``-``) と同じです。" + +#: ../../builtins/stdtypes.rst:429 +msgid "This table lists the bitwise operations sorted in ascending priority:" +msgstr "以下の表では、ビット単位演算を優先順位が低い順に並べています:" + +#: ../../builtins/stdtypes.rst:434 +msgid "``x | y``" +msgstr "``x | y``" + +#: ../../builtins/stdtypes.rst:434 +msgid "bitwise :dfn:`or` of *x* and *y*" +msgstr "*x* と *y* のビット単位 :dfn:`論理和`" + +#: ../../builtins/stdtypes.rst:434 ../../builtins/stdtypes.rst:437 +#: ../../builtins/stdtypes.rst:440 ../../builtins/stdtypes.rst:3235 +#: ../../builtins/stdtypes.rst:3239 ../../builtins/stdtypes.rst:4537 +#: ../../builtins/stdtypes.rst:4541 +msgid "\\(4)" +msgstr "\\(4)" + +#: ../../builtins/stdtypes.rst:437 +msgid "``x ^ y``" +msgstr "``x ^ y``" + +#: ../../builtins/stdtypes.rst:437 +msgid "bitwise :dfn:`exclusive or` of *x* and *y*" +msgstr "*x* と *y* のビット単位 :dfn:`排他的論理和`" + +#: ../../builtins/stdtypes.rst:440 +msgid "``x & y``" +msgstr "``x & y``" + +#: ../../builtins/stdtypes.rst:440 +msgid "bitwise :dfn:`and` of *x* and *y*" +msgstr "*x* と *y* のビット単位 :dfn:`論理積`" + +#: ../../builtins/stdtypes.rst:443 +msgid "``x << n``" +msgstr "``x << n``" + +#: ../../builtins/stdtypes.rst:443 +msgid "*x* shifted left by *n* bits" +msgstr "*x* の *n* ビット左シフト" + +#: ../../builtins/stdtypes.rst:443 +msgid "(1)(2)" +msgstr "(1)(2)" + +#: ../../builtins/stdtypes.rst:445 +msgid "``x >> n``" +msgstr "``x >> n``" + +#: ../../builtins/stdtypes.rst:445 +msgid "*x* shifted right by *n* bits" +msgstr "*x* の *n* ビット右シフト" + +#: ../../builtins/stdtypes.rst:445 +msgid "(1)(3)" +msgstr "(1)(3)" + +#: ../../builtins/stdtypes.rst:447 +msgid "``~x``" +msgstr "``~x``" + +#: ../../builtins/stdtypes.rst:447 +msgid "the bits of *x* inverted" +msgstr "*x* のビット反転" + +#: ../../builtins/stdtypes.rst:453 +msgid "" +"Negative shift counts are illegal and cause a :exc:`ValueError` to be " +"raised." +msgstr "負値のシフト数は不正であり、 :exc:`ValueError` が送出されます。" + +#: ../../builtins/stdtypes.rst:456 +msgid "" +"A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``." +msgstr "*n* ビットの左シフトは、 ``pow(2, n)`` による乗算と等価です。" + +#: ../../builtins/stdtypes.rst:459 +msgid "" +"A right shift by *n* bits is equivalent to floor division by ``pow(2, n)``." +msgstr "*n* ビットの右シフトは、 ``pow(2, n)`` による切り捨て除算と等価です。" + +#: ../../builtins/stdtypes.rst:462 +msgid "" +"Performing these calculations with at least one extra sign extension bit in " +"a finite two's complement representation (a working bit-width of ``1 + " +"max(x.bit_length(), y.bit_length())`` or more) is sufficient to get the same" +" result as if there were an infinite number of sign bits." +msgstr "" +"桁の長い方の値に少なくとも 1 つ余計に符号ビットを付け加えた幅 (計算するビット幅は ``1 + max(x.bit_length(), " +"y.bit_length())`` かそれ以上) でこれらの計算を行えば、無限個の符号ビットがあるかのように計算したのと同じ結果を得るのに十分です。" + +#: ../../builtins/stdtypes.rst:469 +msgid "Additional Methods on Integer Types" +msgstr "整数型における追加のメソッド" + +#: ../../builtins/stdtypes.rst:471 +msgid "" +"The int type implements the :class:`numbers.Integral` :term:`abstract base " +"class`. In addition, it provides a few more methods:" +msgstr "" +"整数型は :class:`numbers.Integral` :term:`抽象基底クラス ` " +"を実装します。さらに、追加のメソッドをいくつか提供します:" + +#: ../../builtins/stdtypes.rst:476 +msgid "" +"Return the number of bits necessary to represent an integer in binary, " +"excluding the sign and leading zeros::" +msgstr "整数を、符号と先頭の 0 は除いて二進法で表すために必要なビットの数を返します::" + +#: ../../builtins/stdtypes.rst:479 +msgid "" +">>> n = -37\n" +">>> bin(n)\n" +"'-0b100101'\n" +">>> n.bit_length()\n" +"6" +msgstr ">>> n = -37>>> bin(n)'-0b100101'>>> n.bit_length()6" + +#: ../../builtins/stdtypes.rst:485 +msgid "" +"More precisely, if ``x`` is nonzero, then ``x.bit_length()`` is the unique " +"positive integer ``k`` such that ``2**(k-1) <= abs(x) < 2**k``. " +"Equivalently, when ``abs(x)`` is small enough to have a correctly rounded " +"logarithm, then ``k = 1 + int(log(abs(x), 2))``. If ``x`` is zero, then " +"``x.bit_length()`` returns ``0``." +msgstr "" +"正確には、 ``x`` が非 0 なら、 ``x.bit_length()`` は ``2**(k-1) <= abs(x) < 2**k`` " +"を満たす唯一の正の整数 ``k`` です。同様に、 ``abs(x)`` が十分小さくて対数を適切に丸められるとき、 ``k = 1 + " +"int(log(abs(x), 2))`` です。 ``x`` が 0 なら、 ``x.bit_length()`` は ``0`` を返します。" + +#: ../../builtins/stdtypes.rst:491 ../../builtins/stdtypes.rst:514 +#: ../../builtins/stdtypes.rst:559 ../../builtins/stdtypes.rst:603 +msgid "Equivalent to::" +msgstr "次と等価です::" + +#: ../../builtins/stdtypes.rst:493 +msgid "" +"def bit_length(self):\n" +" s = bin(self) # binary representation: bin(-37) --> '-0b100101'\n" +" s = s.lstrip('-0b') # remove leading zeros and minus sign\n" +" return len(s) # len('100101') --> 6" +msgstr "" + +#: ../../builtins/stdtypes.rst:502 +msgid "" +"Return the number of ones in the binary representation of the absolute value" +" of the integer. This is also known as the population count. Example::" +msgstr "整数の絶対値の二進数表現における 1 の数を返します。これは population count としても知られています。 例::" + +#: ../../builtins/stdtypes.rst:506 +msgid "" +">>> n = 19\n" +">>> bin(n)\n" +"'0b10011'\n" +">>> n.bit_count()\n" +"3\n" +">>> (-n).bit_count()\n" +"3" +msgstr ">>> n = 19>>> bin(n)'0b10011'>>> n.bit_count()3>>> (-n).bit_count()3" + +#: ../../builtins/stdtypes.rst:516 +msgid "" +"def bit_count(self):\n" +" return bin(self).count(\"1\")" +msgstr "" + +#: ../../builtins/stdtypes.rst:523 +msgid "Return an array of bytes representing an integer." +msgstr "整数を表すバイト列を返します。" + +#: ../../builtins/stdtypes.rst:535 +msgid "" +"The integer is represented using *length* bytes, and defaults to 1. An " +":exc:`OverflowError` is raised if the integer is not representable with the " +"given number of bytes." +msgstr "" +"整数は *length* バイトで表されます、デフォルト値は 1 です。整数が与えられた数のバイトで表せなければ、 " +":exc:`OverflowError` が送出されます。" + +#: ../../builtins/stdtypes.rst:539 +msgid "" +"The *byteorder* argument determines the byte order used to represent the " +"integer, and defaults to ``\"big\"``. If *byteorder* is ``\"big\"``, the " +"most significant byte is at the beginning of the byte array. If *byteorder*" +" is ``\"little\"``, the most significant byte is at the end of the byte " +"array." +msgstr "" +"*byteorder* 引数は、整数を表すのに使われるバイトオーダーを決定します。デフォルト値は ``\"big\"`` です。 *byteorder*" +" が ``\"big\"`` なら、最上位のバイトがバイト配列の最初に来ます。 *byteorder* が ``\"little\"`` " +"なら、最上位のバイトがバイト配列の最後に来ます。" + +#: ../../builtins/stdtypes.rst:545 +msgid "" +"The *signed* argument determines whether two's complement is used to " +"represent the integer. If *signed* is ``False`` and a negative integer is " +"given, an :exc:`OverflowError` is raised. The default value for *signed* is " +"``False``." +msgstr "" +"*signed* 引数は、整数を表すのに 2 の補数を使うかどうかを決定します。 *signed* が ``False`` " +"で、負の整数が与えられたなら、 :exc:`OverflowError` が送出されます。 *signed* のデフォルト値は ``False`` " +"です。" + +#: ../../builtins/stdtypes.rst:550 +msgid "" +"The default values can be used to conveniently turn an integer into a single" +" byte object::" +msgstr "上記のデフォルト値は整数を 1 バイトのオブジェクトに適切に変換するのに使うことができます::" + +#: ../../builtins/stdtypes.rst:553 +msgid "" +">>> (65).to_bytes()\n" +"b'A'" +msgstr "" + +#: ../../builtins/stdtypes.rst:556 +msgid "" +"However, when using the default arguments, don't try to convert a value " +"greater than 255 or you'll get an :exc:`OverflowError`." +msgstr "" +"ただし、デフォルト引数で 255 より大きな整数を変換しないでください。 そうでなければ :exc:`OverflowError` " +"例外を引き起こします。" + +#: ../../builtins/stdtypes.rst:561 +msgid "" +"def to_bytes(n, length=1, byteorder='big', signed=False):\n" +" if byteorder == 'little':\n" +" order = range(length)\n" +" elif byteorder == 'big':\n" +" order = reversed(range(length))\n" +" else:\n" +" raise ValueError(\"byteorder must be either 'little' or 'big'\")\n" +"\n" +" return bytes((n >> i*8) & 0xff for i in order)" +msgstr "" + +#: ../../builtins/stdtypes.rst:572 +msgid "Added default argument values for ``length`` and ``byteorder``." +msgstr "``length`` と ``byteorder`` 引数にデフォルト値を追加しました。" + +#: ../../builtins/stdtypes.rst:577 +msgid "Return the integer represented by the given array of bytes." +msgstr "与えられたバイト列の整数表現を返します。" + +#: ../../builtins/stdtypes.rst:590 +msgid "" +"The argument *bytes* must either be a :term:`bytes-like object` or an " +"iterable producing bytes." +msgstr "" +"引数 *bytes* は :term:`bytes-like object` か、または bytes を生成する iterable " +"でなければなりません。" + +#: ../../builtins/stdtypes.rst:593 +msgid "" +"The *byteorder* argument determines the byte order used to represent the " +"integer, and defaults to ``\"big\"``. If *byteorder* is ``\"big\"``, the " +"most significant byte is at the beginning of the byte array. If *byteorder*" +" is ``\"little\"``, the most significant byte is at the end of the byte " +"array. To request the native byte order of the host system, use " +":data:`sys.byteorder` as the byte order value." +msgstr "" +"*byteorder* 引数は、整数を表すのに使われるバイトオーダーを決定します。デフォルト値は ``\"big\"`` です。 *byteorder*" +" が ``\"big\"`` なら、最上位のバイトがバイト配列の最初に来ます。 *byteorder* が ``\"little\"`` " +"なら、最上位のバイトがバイト配列の最後に来ます。ホストシステムにネイティブのバイトオーダーを要求するには、 :data:`sys.byteorder` " +"をバイトオーダーの値として使ってください。" + +#: ../../builtins/stdtypes.rst:600 +msgid "" +"The *signed* argument indicates whether two's complement is used to " +"represent the integer." +msgstr "*signed* 引数は、整数を表すのに 2 の補数を使うかどうかを決定します。" + +#: ../../builtins/stdtypes.rst:605 +msgid "" +"def from_bytes(bytes, byteorder='big', signed=False):\n" +" if byteorder == 'little':\n" +" little_ordered = list(bytes)\n" +" elif byteorder == 'big':\n" +" little_ordered = list(reversed(bytes))\n" +" else:\n" +" raise ValueError(\"byteorder must be either 'little' or 'big'\")\n" +"\n" +" n = sum(b << i*8 for i, b in enumerate(little_ordered))\n" +" if signed and little_ordered and (little_ordered[-1] & 0x80):\n" +" n -= 1 << 8*len(little_ordered)\n" +"\n" +" return n" +msgstr "" + +#: ../../builtins/stdtypes.rst:620 +msgid "Added default argument value for ``byteorder``." +msgstr "``byteorder`` 引数にデフォルト値を追加しました。" + +#: ../../builtins/stdtypes.rst:625 +msgid "" +"Return a pair of integers whose ratio is equal to the original integer and " +"has a positive denominator. The integer ratio of integers (whole numbers) " +"is always the integer as the numerator and ``1`` as the denominator." +msgstr "" +"比が元の数と等しくなるような整数のペアを返します。戻り値の分母に相当する数は正の整数です。元の数が整数の場合の比は、常にその整数が分子であり、分母は " +"``1`` です。" + +#: ../../builtins/stdtypes.rst:634 +msgid "" +"Returns ``True``. Exists for duck type compatibility with " +":meth:`float.is_integer`." +msgstr "" +"常に ``True`` を返します。 :meth:`float.is_integer` に対するダックタイピングの互換性のために存在しています。" + +#: ../../builtins/stdtypes.rst:639 +msgid "Additional Methods on Float" +msgstr "浮動小数点数に対する追加のメソッド" + +#: ../../builtins/stdtypes.rst:641 +msgid "" +"The float type implements the :class:`numbers.Real` :term:`abstract base " +"class`. float also has the following additional methods." +msgstr "" +"浮動小数点数型は、 :class:`numbers.Real` :term:`抽象基底クラス ` " +"を実装しています。浮動小数点型はまた、以下の追加のメソッドを持ちます。" + +#: ../../builtins/stdtypes.rst:646 +msgid "" +"Class method to return a floating-point number constructed from a number " +"*x*." +msgstr "数 *x* から生成された浮動小数点数を返すクラスメソッドです。" + +#: ../../builtins/stdtypes.rst:648 +msgid "" +"If the argument is an integer or a floating-point number, a floating-point " +"number with the same value (within Python's floating-point precision) is " +"returned. If the argument is outside the range of a Python float, an " +":exc:`OverflowError` will be raised." +msgstr "" +"引数が整数または浮動小数点数の場合、(Python の浮動小数点数の精度で) 同じ値の浮動小数点数が返されます。 引数が Python " +"の浮動小数点数の範囲外なら、 :exc:`OverflowError` が送出されます。" + +#: ../../builtins/stdtypes.rst:653 +msgid "" +"For a general Python object ``x``, ``float.from_number(x)`` delegates to " +"``x.__float__()``. If :meth:`~object.__float__` is not defined then it falls" +" back to :meth:`~object.__index__`." +msgstr "" +"一般の Python オブジェクト ``x`` に対して、``float.from_number(x)`` は ``x.__float__()`` " +"に委譲します。 :meth:`~object.__float__()` が定義されていない場合、:meth:`~object.__index__` " +"へフォールバックします。" + +#: ../../builtins/stdtypes.rst:663 +msgid "" +"Return a pair of integers whose ratio is exactly equal to the original " +"float. The ratio is in lowest terms and has a positive denominator. Raises " +":exc:`OverflowError` on infinities and a :exc:`ValueError` on NaNs." +msgstr "" +"比が厳密に元の浮動小数点数であるような一対の整数を返します。比は既約分数として与えられ、分母は正の値です。無限大に対しては " +":exc:`OverflowError` を、非数 (NaN) に対しては :exc:`ValueError` を送出します。" + +#: ../../builtins/stdtypes.rst:670 +msgid "" +"Return ``True`` if the float instance is finite with integral value, and " +"``False`` otherwise::" +msgstr "浮動小数点数インスタンスが有限の整数値なら ``True`` を、そうでなければ ``False`` を返します::" + +#: ../../builtins/stdtypes.rst:673 +msgid "" +">>> (-2.0).is_integer()\n" +"True\n" +">>> (3.2).is_integer()\n" +"False" +msgstr ">>> (-2.0).is_integer()True>>> (3.2).is_integer()False" + +#: ../../builtins/stdtypes.rst:678 +msgid "" +"Two methods support conversion to and from hexadecimal strings. Since " +"Python's floats are stored internally as binary numbers, converting a float " +"to or from a *decimal* string usually involves a small rounding error. In " +"contrast, hexadecimal strings allow exact representation and specification " +"of floating-point numbers. This can be useful when debugging, and in " +"numerical work." +msgstr "" +"16 進表記の文字列へ、または、 16 進表記からの変換をサポートする二つのメソッドがあります。 Python " +"の浮動小数点数は内部的には2進数で保持されるので、浮動小数点数の *10進数* へまたは *10進数* " +"からの変換には若干の丸め誤差があります。それに対し、16 進表記では、浮動小数点数を正確に表現できます。これはデバッグのときや、数学的な用途 " +"(numerical work) に便利でしょう。" + +#: ../../builtins/stdtypes.rst:689 +msgid "" +"Return a representation of a floating-point number as a hexadecimal string." +" For finite floating-point numbers, this representation will always include" +" a leading ``0x`` and a trailing ``p`` and exponent." +msgstr "" +"浮動小数点数の 16 進文字列表現を返します。有限の浮動小数点数に対し、この表現は常に ``0x`` で始まり ``p`` と指数が続きます。" + +#: ../../builtins/stdtypes.rst:697 +msgid "" +"Class method to return the float represented by a hexadecimal string *s*. " +"The string *s* may have leading and trailing whitespace." +msgstr "" +"16 進文字列表現 *s* で表される、浮動小数点数を返すクラスメソッドです。文字列 *s* は、前や後にホワイトスペースを含んでいても構いません。" + +#: ../../builtins/stdtypes.rst:702 +msgid "" +"Note that :meth:`float.hex` is an instance method, while " +":meth:`float.fromhex` is a class method." +msgstr "" +":meth:`float.fromhex` はクラスメソッドですが、 :meth:`float.hex` " +"はインスタンスメソッドであることに注意して下さい。" + +#: ../../builtins/stdtypes.rst:705 +msgid "A hexadecimal string takes the form::" +msgstr "16 進文字列表現は以下の書式となります::" + +#: ../../builtins/stdtypes.rst:707 +msgid "[sign] ['0x'] integer ['.' fraction] ['p' exponent]" +msgstr "[sign] ['0x'] integer ['.' fraction] ['p' exponent]" + +#: ../../builtins/stdtypes.rst:709 +msgid "" +"where the optional ``sign`` may be either ``+`` or ``-``, ``integer`` and " +"``fraction`` are strings of hexadecimal digits, and ``exponent`` is a " +"decimal integer with an optional leading sign. Case is not significant, and" +" there must be at least one hexadecimal digit in either the integer or the " +"fraction. This syntax is similar to the syntax specified in section 6.4.4.2" +" of the C99 standard, and also to the syntax used in Java 1.5 onwards. In " +"particular, the output of :meth:`float.hex` is usable as a hexadecimal " +"floating-point literal in C or Java code, and hexadecimal strings produced " +"by C's ``%a`` format character or Java's ``Double.toHexString`` are accepted" +" by :meth:`float.fromhex`." +msgstr "" + +#: ../../builtins/stdtypes.rst:722 +msgid "" +"Note that the exponent is written in decimal rather than hexadecimal, and " +"that it gives the power of 2 by which to multiply the coefficient. For " +"example, the hexadecimal string ``0x3.a7p10`` represents the floating-point " +"number ``(3 + 10./16 + 7./16**2) * 2.0**10``, or ``3740.0``::" +msgstr "" +"なお、指数部は 16 進数ではなく 10 進数で書かれ、係数に掛けられる 2 の累乗を与えます。例えば、16 進文字列 ``0x3.a7p10`` " +"は浮動小数点数 ``(3 + 10./16 + 7./16**2) * 2.0**10`` すなわち ``3740.0`` を表します::" + +#: ../../builtins/stdtypes.rst:728 +msgid "" +">>> float.fromhex('0x3.a7p10')\n" +"3740.0" +msgstr ">>> float.fromhex('0x3.a7p10')3740.0" + +#: ../../builtins/stdtypes.rst:732 +msgid "" +"Applying the reverse conversion to ``3740.0`` gives a different hexadecimal " +"string representing the same number::" +msgstr "逆変換を ``3740.0`` に適用すると、同じ数を表す異なる 16 進文字列表現を返します::" + +#: ../../builtins/stdtypes.rst:735 +msgid "" +">>> float.hex(3740.0)\n" +"'0x1.d380000000000p+11'" +msgstr ">>> float.hex(3740.0)'0x1.d380000000000p+11'" + +#: ../../builtins/stdtypes.rst:740 +msgid "Additional Methods on Complex" +msgstr "複素数に対する追加のメソッド" + +#: ../../builtins/stdtypes.rst:742 +msgid "" +"The :class:`!complex` type implements the :class:`numbers.Complex` " +":term:`abstract base class`. :class:`!complex` also has the following " +"additional methods." +msgstr "" +":class:`!complex` 型は、 :class:`numbers.Complex` :term:`抽象基底クラス ` を実装しています。:class:`!complex` 型はまた、以下の追加のメソッドを持ちます。" + +#: ../../builtins/stdtypes.rst:748 +msgid "Class method to convert a number to a complex number." +msgstr "数値を複素数に変換するクラスメソッドです。" + +#: ../../builtins/stdtypes.rst:750 +msgid "" +"For a general Python object ``x``, ``complex.from_number(x)`` delegates to " +"``x.__complex__()``. If :meth:`~object.__complex__` is not defined then it " +"falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not " +"defined then it falls back to :meth:`~object.__index__`." +msgstr "" +"一般的な Python オブジェクト ``x`` に対して、 ``complex.from_number(x)`` は " +"``x.__complex__()`` に処理を委譲します。 :meth:`~object.__complex__` が定義されていない場合は " +":meth:`~object.__float__` にフォールバックします。 :meth:`!__float__` も定義されていない場合は " +":meth:`~object.__index__` にフォールバックします。" + +#: ../../builtins/stdtypes.rst:761 +msgid "Hashing of numeric types" +msgstr "数値型のハッシュ化" + +#: ../../builtins/stdtypes.rst:763 +msgid "" +"For numbers ``x`` and ``y``, possibly of different types, it's a requirement" +" that ``hash(x) == hash(y)`` whenever ``x == y`` (see the " +":meth:`~object.__hash__` method documentation for more details). For ease " +"of implementation and efficiency across a variety of numeric types " +"(including :class:`int`, :class:`float`, :class:`decimal.Decimal` and " +":class:`fractions.Fraction`) Python's hash for numeric types is based on a " +"single mathematical function that's defined for any rational number, and " +"hence applies to all instances of :class:`int` and " +":class:`fractions.Fraction`, and all finite instances of :class:`float` and " +":class:`decimal.Decimal`. Essentially, this function is given by reduction " +"modulo ``P`` for a fixed prime ``P``. The value of ``P`` is made available " +"to Python as the :attr:`~sys.hash_info.modulus` attribute of " +":data:`sys.hash_info`." +msgstr "" +"数 ``x`` と ``y`` に対して、型が異なっていたとしても、 ``x == y`` であれば必ず ``hash(x) == hash(y)`` " +"であることが要請されます (詳細は :meth:`~object.__hash__` メソッドドキュメントを参照してください)。実装の簡単さと " +"複数の数値型 (:class:`int` 、 :class:`float` 、 :class:`decimal.Decimal` 、 " +":class:`fractions.Fraction` を含みます) 間の効率のため、Python の " +"数値型に対するハッシュ値はある単一の数学的関数に基づいていて、 その関数はすべての有理数に対し定義されているため、 :class:`int` と " +":class:`fractions.Fraction` のすべてのインスタンスと、 :class:`float` と " +":class:`decimal.Decimal` のすべての有限なインスタンスに 対して適用されます。本質的には、この関数は定数の素数 ``P`` " +"に対して ``P`` を法とする還元で与えられます。 値 ``P`` は、 :data:`sys.hash_info` の " +":attr:`~sys.hash_info.modulus` 属性として Python で利用できます。" + +#: ../../builtins/stdtypes.rst:778 +msgid "" +"Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C " +"longs and ``P = 2**61 - 1`` on machines with 64-bit C longs." +msgstr "" +"現在使われている素数は、32 bit C long のマシンでは ``P = 2**31 - 1`` 、 64-bit C long のマシンでは " +"``P = 2**61 - 1`` です。" + +#: ../../builtins/stdtypes.rst:781 +msgid "Here are the rules in detail:" +msgstr "詳細な規則はこうです:" + +#: ../../builtins/stdtypes.rst:783 +msgid "" +"If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible" +" by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n," +" P)`` gives the inverse of ``n`` modulo ``P``." +msgstr "" +"``x = m / n`` が非負の有理数で、 ``n`` が ``P`` で割り切れないなら、 ``invmod(n, P)`` を ``n`` を " +"``P`` で割った剰余の (剰余演算の意味での) 逆数を与えるものとして、 ``hash(x)`` を ``m * invmod(n, P) % " +"P`` と定義します。" + +#: ../../builtins/stdtypes.rst:787 +msgid "" +"If ``x = m / n`` is a nonnegative rational number and ``n`` is divisible by " +"``P`` (but ``m`` is not) then ``n`` has no inverse modulo ``P`` and the rule" +" above doesn't apply; in this case define ``hash(x)`` to be the constant " +"value ``sys.hash_info.inf``." +msgstr "" +"``x = m / n`` が非負の有理数で、 ``n`` が ``P`` で割り切れる (が ``m`` は割り切れない) なら、 ``n`` は " +"``P`` で割った余りの逆数を持たず、上の規則は適用できません。この場合、 ``hash(x)`` を定数 ``sys.hash_info.inf``" +" と定義します。" + +#: ../../builtins/stdtypes.rst:792 +msgid "" +"If ``x = m / n`` is a negative rational number define ``hash(x)`` as " +"``-hash(-x)``. If the resulting hash is ``-1``, replace it with ``-2``." +msgstr "" +"``x = m / n`` が負の有理数なら、 ``hash(x)`` を ``-hash(-x)`` と定義します。その結果のハッシュが ``-1``" +" なら、 ``-2`` に置き換えます。" + +#: ../../builtins/stdtypes.rst:796 +msgid "" +"The particular values ``sys.hash_info.inf`` and ``-sys.hash_info.inf`` are " +"used as hash values for positive infinity or negative infinity " +"(respectively)." +msgstr "" +"特定の値 ``sys.hash_info.inf`` 、 ``-sys.hash_info.inf`` は、正の無限大、負の無限大のハッシュ値を " +"(それぞれ) 表すのに使われます。" + +#: ../../builtins/stdtypes.rst:800 +msgid "" +"For a :class:`complex` number ``z``, the hash values of the real and " +"imaginary parts are combined by computing ``hash(z.real) + " +"sys.hash_info.imag * hash(z.imag)``, reduced modulo " +"``2**sys.hash_info.width`` so that it lies in " +"``range(-2**(sys.hash_info.width - 1), 2**(sys.hash_info.width - 1))``. " +"Again, if the result is ``-1``, it's replaced with ``-2``." +msgstr "" +"複素 (:class:`complex`) 数 ``z`` に対して、実部と虚部のハッシュ値は、 ``hash(z.real) + " +"sys.hash_info.imag * hash(z.imag)`` の ``2**sys.hash_info.width`` " +"を法とする還元を計算することにより組み合わせられ、よってこれは ``range(-2**(sys.hash_info.width - 1), " +"2**(sys.hash_info.width - 1))`` に収まります。再び、結果が ``-1`` なら、 ``-2`` で置き換えられます。" + +#: ../../builtins/stdtypes.rst:808 +msgid "" +"To clarify the above rules, here's some example Python code, equivalent to " +"the built-in hash, for computing the hash of a rational number, " +":class:`float`, or :class:`complex`::" +msgstr "" +"上述の規則をわかりやすくするため、有理数 :class:`float` や、 :class:`complex` " +"のハッシュを計算する組み込みのハッシュと等価な Python コードの例を挙げます::" + +#: ../../builtins/stdtypes.rst:813 +msgid "" +"import sys, math\n" +"\n" +"def hash_fraction(m, n):\n" +" \"\"\"Compute the hash of a rational number m / n.\n" +"\n" +" Assumes m and n are integers, with n positive.\n" +" Equivalent to hash(fractions.Fraction(m, n)).\n" +"\n" +" \"\"\"\n" +" P = sys.hash_info.modulus\n" +" # Remove common factors of P. (Unnecessary if m and n already coprime.)\n" +" while m % P == n % P == 0:\n" +" m, n = m // P, n // P\n" +"\n" +" if n % P == 0:\n" +" hash_value = sys.hash_info.inf\n" +" else:\n" +" # Fermat's Little Theorem: pow(n, P-1, P) is 1, so\n" +" # pow(n, P-2, P) gives the inverse of n modulo P.\n" +" hash_value = (abs(m) % P) * pow(n, P - 2, P) % P\n" +" if m < 0:\n" +" hash_value = -hash_value\n" +" if hash_value == -1:\n" +" hash_value = -2\n" +" return hash_value\n" +"\n" +"def hash_float(x):\n" +" \"\"\"Compute the hash of a float x.\"\"\"\n" +"\n" +" if math.isnan(x):\n" +" return object.__hash__(x)\n" +" elif math.isinf(x):\n" +" return sys.hash_info.inf if x > 0 else -sys.hash_info.inf\n" +" else:\n" +" return hash_fraction(*x.as_integer_ratio())\n" +"\n" +"def hash_complex(z):\n" +" \"\"\"Compute the hash of a complex number z.\"\"\"\n" +"\n" +" hash_value = hash_float(z.real) + sys.hash_info.imag * hash_float(z.imag)\n" +" # do a signed reduction modulo 2**sys.hash_info.width\n" +" M = 2**(sys.hash_info.width - 1)\n" +" hash_value = (hash_value & (M - 1)) - (hash_value & M)\n" +" if hash_value == -1:\n" +" hash_value = -2\n" +" return hash_value" +msgstr "" + +#: ../../builtins/stdtypes.rst:864 +msgid "Boolean Type - :class:`bool`" +msgstr "ブーリアン型 - :class:`bool`" + +#: ../../builtins/stdtypes.rst:866 +msgid "" +"Booleans represent truth values. The :class:`bool` type has exactly two " +"constant instances: ``True`` and ``False``." +msgstr "" +"ブーリアン型は真理値を表現します。 :class:`bool` 型はただ2つの定数インスタンス ``True`` と ``False`` を持ちます。" + +#: ../../builtins/stdtypes.rst:874 +msgid "" +"The built-in function :func:`bool` converts any value to a boolean, if the " +"value can be interpreted as a truth value (see section :ref:`truth` above)." +msgstr "" +"組み込み関数 :func:`bool` は、もしその値が真理値として解釈可能ならば、任意の値を真偽値に変換します (上記 :ref:`truth` " +"節を参照してください)。" + +#: ../../builtins/stdtypes.rst:877 +msgid "" +"For logical operations, use the :ref:`boolean operators ` ``and``, " +"``or`` and ``not``. When applying the bitwise operators ``&``, ``|``, ``^`` " +"to two booleans, they return a bool equivalent to the logical operations " +"\"and\", \"or\", \"xor\". However, the logical operators ``and``, ``or`` and" +" ``!=`` should be preferred over ``&``, ``|`` and ``^``." +msgstr "" +"論理演算には :ref:`ブーリアン演算子 ` ``and``, ``or`` および ``not`` " +"を使ってください。2つの真偽値に対してビット演算子 ``&``, ``|``, ``^`` を適用した場合は、それぞれ論理演算 \"and\", " +"\"or\", \"xor\" に相当するブール値を返します。しかしながら、論理演算子 ``and``, ``or`` および ``!=`` " +"を使うほうが ``&``, ``|`` や ``^`` を使うよりも好ましいです。" + +#: ../../builtins/stdtypes.rst:886 +msgid "" +"The use of the bitwise inversion operator ``~`` is deprecated and will raise" +" an error in Python 3.16." +msgstr "" + +#: ../../builtins/stdtypes.rst:889 +msgid "" +":class:`bool` is a subclass of :class:`int` (see :ref:`typesnumeric`). In " +"many numeric contexts, ``False`` and ``True`` behave like the integers 0 and" +" 1, respectively. However, relying on this is discouraged; explicitly " +"convert using :func:`int` instead." +msgstr "" +":class:`bool` は :class:`int` のサブクラスです (:ref:`typesnumeric` " +"を参照してください)。多くの数値的なコンテキストにおいて、 ``False`` と ``True`` はそれぞれ整数 0 と 1 " +"であるかのように振る舞います。しかし、そのような振る舞いを信頼することは推奨されません; :func:`int` " +"を使って明示的に整数値に変換してください。" + +#: ../../builtins/stdtypes.rst:897 +msgid "Iterator Types" +msgstr "イテレータ型" + +#: ../../builtins/stdtypes.rst:905 +msgid "" +"Python supports a concept of iteration over containers. This is implemented" +" using two distinct methods; these are used to allow user-defined classes to" +" support iteration. Sequences, described below in more detail, always " +"support the iteration methods." +msgstr "" +"Python はコンテナでの反復処理の概念をサポートしています。この概念は 2 つの別々のメソッドを使って実装されています; " +"これらのメソッドを使ってユーザ定義のクラスで反復を行えるようにできます。後に詳しく述べるシーケンスは、必ず反復処理メソッドをサポートしています。" + +#: ../../builtins/stdtypes.rst:910 +msgid "" +"One method needs to be defined for container objects to provide " +":term:`iterable` support:" +msgstr "" +"コンテナオブジェクトが :term:`イテラブル ` のサポートを提供するためには、一つのメソッドが定義されていなければなりません:" + +#: ../../builtins/stdtypes.rst:917 +msgid "" +"Return an :term:`iterator` object. The object is required to support the " +"iterator protocol described below. If a container supports different types " +"of iteration, additional methods can be provided to specifically request " +"iterators for those iteration types. (An example of an object supporting " +"multiple forms of iteration would be a tree structure which supports both " +"breadth-first and depth-first traversal.) This method corresponds to the " +":c:member:`~PyTypeObject.tp_iter` slot of the type structure for Python " +"objects in the Python/C API." +msgstr "" +":term:`iterator` " +"オブジェクトを返します。オブジェクトは後述するイテレータプロトコルをサポートする必要があります。もしコンテナが異なる種類の反復処理をサポートするなら、それぞれの反復処理のためのイテレータを要求するメソッドをそれぞれ提供しても構いません" +" 。(複数の形式の反復処理を提供するオブジェクトの例として、幅優先探索と深さ優先探索をサポートする木構造が挙げられます。)このメソッドは " +"Python/C API での Python オブジェクトの型構造体の :c:member:`~PyTypeObject.tp_iter` " +"スロットに対応します。" + +#: ../../builtins/stdtypes.rst:926 +msgid "" +"The iterator objects themselves are required to support the following two " +"methods, which together form the :dfn:`iterator protocol`:" +msgstr "" +"イテレータオブジェクト自体は以下の 2 つのメソッドをサポートする必要があります。これらのメソッドは 2 つ合わせて :dfn:`iterator " +"protocol`: (イテレータプロトコル) を成します:" + +#: ../../builtins/stdtypes.rst:932 +msgid "" +"Return the :term:`iterator` object itself. This is required to allow both " +"containers and iterators to be used with the :keyword:`for` and " +":keyword:`in` statements. This method corresponds to the " +":c:member:`~PyTypeObject.tp_iter` slot of the type structure for Python " +"objects in the Python/C API." +msgstr "" +":term:`iterator` オブジェクト自体を返します。このメソッドはコンテナとイテレータの両方を :keyword:`for` および " +":keyword:`in` 文で使えるようにするために必要です。このメソッドは Python/C API において Python " +"オブジェクトを表す型構造体の :c:member:`~PyTypeObject.tp_iter` スロットに対応します。" + +#: ../../builtins/stdtypes.rst:941 +msgid "" +"Return the next item from the :term:`iterator`. If there are no further " +"items, raise the :exc:`StopIteration` exception. This method corresponds to" +" the :c:member:`~PyTypeObject.tp_iternext` slot of the type structure for " +"Python objects in the Python/C API." +msgstr "" +":term:`iterator` の次のアイテムを返します。もしそれ以上アイテムが無ければ :exc:`StopIteration` 例外を送出します。" +" このメソッドは Python/C APIでのPythonオブジェクトの型構造体の " +":c:member:`~PyTypeObject.tp_iternext` スロットに対応します。" + +#: ../../builtins/stdtypes.rst:946 +msgid "" +"Python defines several iterator objects to support iteration over general " +"and specific sequence types, dictionaries, and other more specialized forms." +" The specific types are not important beyond their implementation of the " +"iterator protocol." +msgstr "" +"Python " +"では、いくつかのイテレータオブジェクトを定義して、一般のシーケンス型、特殊なシーケンス型、辞書型、その他の特殊な形式に渡って反復をサポートしています。特殊型は、イテレータプロトコルの実装以外では重要ではありません。" + +#: ../../builtins/stdtypes.rst:951 +msgid "" +"Once an iterator's :meth:`~iterator.__next__` method raises " +":exc:`StopIteration`, it must continue to do so on subsequent calls. " +"Implementations that do not obey this property are deemed broken." +msgstr "" +"イテレータの :meth:`~iterator.__next__` メソッドが一旦 :exc:`StopIteration` " +"を送出したなら、以降の呼び出しでも例外を送出し続けなければなりません。この特性に従わない実装は壊れているとみなされます。" + +#: ../../builtins/stdtypes.rst:959 +msgid "Generator Types" +msgstr "ジェネレータ型" + +#: ../../builtins/stdtypes.rst:961 +msgid "" +"Python's :term:`generator`\\s provide a convenient way to implement the " +"iterator protocol. If a container object's :meth:`~object.__iter__` method " +"is implemented as a generator, it will automatically return an iterator " +"object (technically, a generator object) supplying the " +":meth:`~iterator.__iter__` and :meth:`~generator.__next__` methods. More " +"information about generators can be found in :ref:`the documentation for the" +" yield expression `." +msgstr "" +"Python における :term:`generator` (ジェネレータ) " +"は、イテレータプロトコルを実装する便利な方法を提供します。コンテナオブジェクトの :meth:`~object.__iter__` " +"メソッドがジェネレータとして実装されていれば、そのメソッドは :meth:`~iterator.__iter__` および " +":meth:`~generator.__next__` メソッドを提供するイテレータオブジェクト (厳密にはジェネレータオブジェクト) " +"を自動的に返します。ジェネレータに関する詳細な情報は、 :ref:`yield 式のドキュメント ` にあります。" + +#: ../../builtins/stdtypes.rst:973 +msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`" +msgstr "シーケンス型 --- :class:`list`, :class:`tuple`, :class:`range`" + +#: ../../builtins/stdtypes.rst:975 +msgid "" +"There are three basic sequence types: lists, tuples, and range objects. " +"Additional sequence types tailored for processing of :ref:`binary data " +"` and :ref:`text strings ` are described in dedicated " +"sections." +msgstr "" +"基本的なシーケンス型は 3 つあります: リスト、タプル、range オブジェクトです。:ref:`バイナリデータ ` や " +":ref:`テキスト文字列 ` を処理するように仕立てられたシーケンス型は、セクションを割いて解説します。" + +#: ../../builtins/stdtypes.rst:984 +msgid "Common Sequence Operations" +msgstr "共通のシーケンス演算" + +#: ../../builtins/stdtypes.rst:988 +msgid "" +"The operations in the following table are supported by most sequence types, " +"both mutable and immutable. The :class:`collections.abc.Sequence` ABC is " +"provided to make it easier to correctly implement these operations on custom" +" sequence types." +msgstr "" +"以下の表にある演算は、ほとんどのミュータブル、イミュータブル両方のシーケンスでサポートされています。カスタムのシーケンス型にこれらの演算を完全に実装するのが簡単になるように、" +" :class:`collections.abc.Sequence` ABC が提供されています。" + +#: ../../builtins/stdtypes.rst:993 +msgid "" +"This table lists the sequence operations sorted in ascending priority. In " +"the table, *s* and *t* are sequences of the same type, *n*, *i*, *j* and *k*" +" are integers and *x* is an arbitrary object that meets any type and value " +"restrictions imposed by *s*." +msgstr "" +"以下のテーブルで、シーケンス演算を優先順位が低い順に挙げます。表内で、 *s* と *t* は同じ型のシーケンス、 *n*、 *i*、 *j* 、 " +"*k* は整数、*x* は *s* に課された型と値の条件を満たす任意のオブジェクトです。" + +#: ../../builtins/stdtypes.rst:998 +msgid "" +"The ``in`` and ``not in`` operations have the same priorities as the " +"comparison operations. The ``+`` (concatenation) and ``*`` (repetition) " +"operations have the same priority as the corresponding numeric operations. " +"[3]_" +msgstr "" +"``in`` および ``not in`` 演算の優先順位は比較演算と同じです。``+`` (結合) および ``*`` " +"(繰り返し)の優先順位は対応する数値演算と同じです。 [3]_" + +#: ../../builtins/stdtypes.rst:1002 +msgid "" +"See :ref:`time-complexity` for the costs of the various sequence operations." +msgstr "" + +#: ../../builtins/stdtypes.rst:1020 +msgid "``x in s``" +msgstr "``x in s``" + +#: ../../builtins/stdtypes.rst:1020 +msgid "``True`` if an item of *s* is equal to *x*, else ``False``" +msgstr "*s* のある要素が *x* と等しければ ``True`` , そうでなければ ``False``" + +#: ../../builtins/stdtypes.rst:1023 +msgid "``x not in s``" +msgstr "``x not in s``" + +#: ../../builtins/stdtypes.rst:1023 +msgid "``False`` if an item of *s* is equal to *x*, else ``True``" +msgstr "*s* のある要素が *x* と等しければ ``False``, そうでなければ ``True``" + +#: ../../builtins/stdtypes.rst:1026 +msgid "``s + t``" +msgstr "``s + t``" + +#: ../../builtins/stdtypes.rst:1026 +msgid "the concatenation of *s* and *t*" +msgstr "*s* と *t* の結合" + +#: ../../builtins/stdtypes.rst:1026 +msgid "(6)(7)" +msgstr "(6)(7)" + +#: ../../builtins/stdtypes.rst:1029 +msgid "``s * n`` or ``n * s``" +msgstr "``s * n`` または ``n * s``" + +#: ../../builtins/stdtypes.rst:1029 +msgid "equivalent to adding *s* to itself *n* times" +msgstr "*s* 自身を *n* 回足すのと同じ" + +#: ../../builtins/stdtypes.rst:1029 +msgid "(2)(7)" +msgstr "(2)(7)" + +#: ../../builtins/stdtypes.rst:1032 +msgid "``s[i]``" +msgstr "``s[i]``" + +#: ../../builtins/stdtypes.rst:1032 +msgid "*i*\\ th item of *s*, origin 0" +msgstr "*s* の 0 から数えて *i* 番目の要素" + +#: ../../builtins/stdtypes.rst:1032 +msgid "(3)(8)" +msgstr "(3)(8)" + +#: ../../builtins/stdtypes.rst:1034 +msgid "``s[i:j]``" +msgstr "``s[i:j]``" + +#: ../../builtins/stdtypes.rst:1034 +msgid "slice of *s* from *i* to *j*" +msgstr "*s* の *i* から *j* までのスライス" + +#: ../../builtins/stdtypes.rst:1034 +msgid "(3)(4)" +msgstr "(3)(4)" + +#: ../../builtins/stdtypes.rst:1036 +msgid "``s[i:j:k]``" +msgstr "``s[i:j:k]``" + +#: ../../builtins/stdtypes.rst:1036 +msgid "slice of *s* from *i* to *j* with step *k*" +msgstr "*s* の *i* から *j* まで、 *k* 毎のスライス" + +#: ../../builtins/stdtypes.rst:1036 +msgid "(3)(5)" +msgstr "(3)(5)" + +#: ../../builtins/stdtypes.rst:1039 +msgid "``len(s)``" +msgstr "``len(s)``" + +#: ../../builtins/stdtypes.rst:1039 +msgid "length of *s*" +msgstr "*s* の長さ" + +#: ../../builtins/stdtypes.rst:1041 +msgid "``min(s)``" +msgstr "``min(s)``" + +#: ../../builtins/stdtypes.rst:1041 +msgid "smallest item of *s*" +msgstr "*s* の最小の要素" + +#: ../../builtins/stdtypes.rst:1043 +msgid "``max(s)``" +msgstr "``max(s)``" + +#: ../../builtins/stdtypes.rst:1043 +msgid "largest item of *s*" +msgstr "*s* の最大の要素" + +#: ../../builtins/stdtypes.rst:1046 +msgid "" +"Sequences of the same type also support comparisons. In particular, tuples " +"and lists are compared lexicographically by comparing corresponding " +"elements. This means that to compare equal, every element must compare equal" +" and the two sequences must be of the same type and have the same length. " +"(For full details see :ref:`comparisons` in the language reference.)" +msgstr "" +"同じ型のシーケンスは比較もサポートしています。特に、タプルとリストは対応する要素を比較することで辞書式順序で比較されます。つまり、等しいとされるためには、すべての要素が等しく、両シーケンスの型も長さも等しくなければなりません。(完全な詳細は言語リファレンスの" +" :ref:`comparisons` を参照してください。)" + +#: ../../builtins/stdtypes.rst:1056 +msgid "" +"Forward and reversed iterators over mutable sequences access values using an" +" index. That index will continue to march forward (or backward) even if the" +" underlying sequence is mutated. The iterator terminates only when an " +":exc:`IndexError` or a :exc:`StopIteration` is encountered (or when the " +"index drops below zero)." +msgstr "" +"ミュータブルなシーケンスに対する前方および逆方向イテレータはインデックスを使って要素にアクセスします。インデックスは、仮に参照するシーケンスが変化したとしても前方" +" (または後方) に進み続けます。イテレータは :exc:`IndexError` または :exc:`StopIteration` に出会った場合 " +"(またはインデックスがゼロより小さくなった場合) にのみ終了します。" + +#: ../../builtins/stdtypes.rst:1065 +msgid "" +"While the ``in`` and ``not in`` operations are used only for simple " +"containment testing in the general case, some specialised sequences (such as" +" :class:`str`, :class:`bytes` and :class:`bytearray`) also use them for " +"subsequence testing::" +msgstr "" +"``in`` および ``not in`` 演算は、一般に単純な包含判定にのみ使われますが、(:class:`str`, :class:`bytes`," +" :class:`bytearray` のような) 特殊なシーケンスでは部分シーケンス判定にも使われます::" + +#: ../../builtins/stdtypes.rst:1070 +msgid "" +">>> \"gg\" in \"eggs\"\n" +"True" +msgstr ">>> \"gg\" in \"eggs\"True" + +#: ../../builtins/stdtypes.rst:1074 +msgid "" +"Values of *n* less than ``0`` are treated as ``0`` (which yields an empty " +"sequence of the same type as *s*). Note that items in the sequence *s* are " +"not copied; they are referenced multiple times. This often haunts new " +"Python programmers; consider::" +msgstr "" +"``0`` 未満の値 *n* は ``0`` として扱われます (これは *s* と同じ型の空のシーケンスを表します)。シーケンス *s* " +"の要素はコピーされないので注意してください; コピーではなく要素に対する参照カウントが増えます。これは Python " +"に慣れていないプログラマをよく悩ませます。例えば以下のコードを考えます:" + +#: ../../builtins/stdtypes.rst:1079 +msgid "" +">>> lists = [[]] * 3\n" +">>> lists\n" +"[[], [], []]\n" +">>> lists[0].append(3)\n" +">>> lists\n" +"[[3], [3], [3]]" +msgstr "" + +#: ../../builtins/stdtypes.rst:1086 +msgid "" +"What has happened is that ``[[]]`` is a one-element list containing an empty" +" list, so all three elements of ``[[]] * 3`` are references to this single " +"empty list. Modifying any of the elements of ``lists`` modifies this single" +" list. You can create a list of different lists this way::" +msgstr "" +"ここで、``[[]]`` が空リストを含む 1 要素のリストなので、``[[]] * 3`` の 3 要素はこの一つの空リスト (への参照) " +"です。``lists`` のいずれかの要素を変更すると、その一つのリストが変更されます。別々のリストのリストを作るにはこうします::" + +#: ../../builtins/stdtypes.rst:1091 +msgid "" +">>> lists = [[] for i in range(3)]\n" +">>> lists[0].append(3)\n" +">>> lists[1].append(5)\n" +">>> lists[2].append(7)\n" +">>> lists\n" +"[[3], [5], [7]]" +msgstr "" + +#: ../../builtins/stdtypes.rst:1098 +msgid "" +"Further explanation is available in the FAQ entry :ref:`faq-" +"multidimensional-list`." +msgstr "別の説明が FAQ エントリ :ref:`faq-multidimensional-list` にあります。" + +#: ../../builtins/stdtypes.rst:1102 +msgid "" +"If *i* or *j* is negative, the index is relative to the end of sequence *s*:" +" ``len(s) + i`` or ``len(s) + j`` is substituted. But note that ``-0`` is " +"still ``0``." +msgstr "" +"*i* または *j* が負の数の場合、インデックスはシーケンスの末端からの相対インデックスになります: ``len(s) + i`` または ``len(s) + j`` が代わりに使われます。\n" +"ただし ``-0`` はやはり ``0`` であることに注意してください。" + +#: ../../builtins/stdtypes.rst:1107 +msgid "" +"The slice of *s* from *i* to *j* is defined as the sequence of items with " +"index *k* such that ``i <= k < j``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1110 +msgid "If *i* is omitted or ``None``, use ``0``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1111 +msgid "If *j* is omitted or ``None``, use ``len(s)``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1112 +msgid "If *i* or *j* is less than ``-len(s)``, use ``0``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1113 +msgid "If *i* or *j* is greater than ``len(s)``, use ``len(s)``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1114 +msgid "If *i* is greater than or equal to *j*, the slice is empty." +msgstr "" + +#: ../../builtins/stdtypes.rst:1117 +msgid "" +"The slice of *s* from *i* to *j* with step *k* is defined as the sequence of" +" items with index ``x = i + n*k`` such that ``0 <= n < (j-i)/k``. In other" +" words, the indices are ``i``, ``i+k``, ``i+2*k``, ``i+3*k`` and so on, " +"stopping when *j* is reached (but never including *j*). When *k* is " +"positive, *i* and *j* are reduced to ``len(s)`` if they are greater. When " +"*k* is negative, *i* and *j* are reduced to ``len(s) - 1`` if they are " +"greater. If *i* or *j* are omitted or ``None``, they become \"end\" values " +"(which end depends on the sign of *k*). Note, *k* cannot be zero. If *k* is" +" ``None``, it is treated like ``1``." +msgstr "" +"*s* の「 *i* から *j* まででステップが *k* のスライス」は、インデックス ``x = i + n*k`` (ただし n は ``0 " +"<= n < (j-i)/k`` を満たす任意の整数)を持つ要素からなるシーケンスとして定義されます。言い換えるとインデックスは ``i``, " +"``i+k``, ``i+2*k``, ``i+3*k`` と続き、 *j* に達したところでストップします (ただし *j* は含みません)。 *k*" +" が正の数である場合、 *i* または *j* が ``len(s)`` より大きければ ``len(s)`` を代わりに使用します。 *k* " +"が負の数である場合、 *i* または *j* が ``len(s) - 1`` より大きければ ``len(s) - 1`` を代わりに使用します。 " +"*i* または *j* を省略または ``None`` を指定すると、 \"端\" (どちらの端かは *k* の符号に依存) " +"の値を代わりに使用します。なお *k* はゼロにできないので注意してください。また *k* に ``None`` を指定すると、 ``1`` " +"が指定されたものとして扱われます。" + +#: ../../builtins/stdtypes.rst:1130 +msgid "" +"Concatenating immutable sequences always results in a new object. This " +"means that building up a sequence by repeated concatenation will have a " +"quadratic runtime cost in the total sequence length. To get a linear " +"runtime cost, you must switch to one of the alternatives below:" +msgstr "" +"イミュータブルなシーケンスの結合は、常に新しいオブジェクトを返します。これは、結合の繰り返しでシーケンスを構築する実行時間コストがシーケンスの長さの合計の二次式になることを意味します。実行時間コストを線形にするには、代わりに以下のいずれかにしてください:" + +#: ../../builtins/stdtypes.rst:1135 +msgid "" +"if concatenating :class:`str` objects, you can build a list and use " +":meth:`str.join` at the end or else write to an :class:`io.StringIO` " +"instance and retrieve its value when complete" +msgstr "" +":class:`str` オブジェクトを結合するには、リストを構築して最後に :meth:`str.join` を使うか、 " +":class:`io.StringIO` インスタンスに書き込んで完成してから値を取得してください" + +#: ../../builtins/stdtypes.rst:1139 +msgid "" +"if concatenating :class:`bytes` objects, you can similarly use " +":meth:`bytes.join` or :class:`io.BytesIO`, or you can do in-place " +"concatenation with a :class:`bytearray` object. :class:`bytearray` objects " +"are mutable and have an efficient overallocation mechanism" +msgstr "" +":class:`bytes` オブジェクトを結合するなら、同様に :meth:`bytes.join` や :class:`io.BytesIO` " +"を使うか、 :class:`bytearray` オブジェクトでインプレースに結合できます。 :class:`bytearray` " +"オブジェクトはミュータブルで、効率のいい割り当て超過機構を備えています" + +#: ../../builtins/stdtypes.rst:1144 +msgid "" +"if concatenating :class:`tuple` objects, extend a :class:`list` instead" +msgstr ":class:`tuple` オブジェクトを結合するなら、代わりに :class:`list` を拡張してください" + +#: ../../builtins/stdtypes.rst:1146 +msgid "for other types, investigate the relevant class documentation" +msgstr "その他の型については、関連するクラスのドキュメントを調べてください" + +#: ../../builtins/stdtypes.rst:1150 +msgid "" +"Some sequence types (such as :class:`range`) only support item sequences " +"that follow specific patterns, and hence don't support sequence " +"concatenation or repetition." +msgstr "" +"シーケンス型には、 (:class:`range` のように) " +"特殊なパターンに従う項目のシーケンスのみをサポートするものがあり、それらはシーケンスの結合や繰り返しをサポートしません。" + +#: ../../builtins/stdtypes.rst:1155 +msgid "An :exc:`IndexError` is raised if *i* is outside the sequence range." +msgstr "" + +#: ../../builtins/stdtypes.rst:1158 +msgid "Sequence Methods" +msgstr "シーケンスのメソッド" + +#: ../../builtins/stdtypes.rst:1159 +msgid "Sequence types also support the following methods:" +msgstr "シーケンス型は以下のようなメソッドをサポートしています:" + +#: ../../builtins/stdtypes.rst:1169 +msgid "Return the total number of occurrences of *value* in *sequence*." +msgstr "*sequence* の中に *value* が出現する回数を返します。" + +#: ../../builtins/stdtypes.rst:1179 +msgid "Return the index of the first occurrence of *value* in *sequence*." +msgstr "*sequence* で最初に *value* が出現する場所のインデックスを返します。" + +#: ../../builtins/stdtypes.rst:1181 ../../builtins/stdtypes.rst:1365 +msgid "Raises :exc:`ValueError` if *value* is not found in *sequence*." +msgstr "*sequence* に *value* が見つからなければ :exc:`ValueError` を送出します。" + +#: ../../builtins/stdtypes.rst:1183 +msgid "" +"The *start* or *stop* arguments allow for efficient searching of subsections" +" of the sequence, beginning at *start* and ending at *stop*. This is roughly" +" equivalent to ``start + sequence[start:stop].index(value)``, only without " +"copying any data." +msgstr "" + +#: ../../builtins/stdtypes.rst:1189 +msgid "" +"Not all sequence types support passing the *start* and *stop* arguments." +msgstr "" + +#: ../../builtins/stdtypes.rst:1195 +msgid "Immutable Sequence Types" +msgstr "イミュータブルなシーケンス型" + +#: ../../builtins/stdtypes.rst:1202 +msgid "" +"The only operation that immutable sequence types generally implement that is" +" not also implemented by mutable sequence types is support for the " +":func:`hash` built-in." +msgstr "" +"イミュータブルなシーケンス型が一般に実装している演算のうち、ミュータブルなシーケンス型がサポートしていないのは、組み込みの :func:`hash` " +"だけです。" + +#: ../../builtins/stdtypes.rst:1206 +msgid "" +"This support allows immutable sequences, such as :class:`tuple` instances, " +"to be used as :class:`dict` keys and stored in :class:`set` and " +":class:`frozenset` instances." +msgstr "" +"このサポートにより、:class:`tuple` インスタンスのようなイミュータブルなシーケンスは、 :class:`dict` のキーとして使え、 " +":class:`set` や :class:`frozenset` インスタンスに保存できます。" + +#: ../../builtins/stdtypes.rst:1210 +msgid "" +"Attempting to hash an immutable sequence that contains unhashable values " +"will result in :exc:`TypeError`." +msgstr "ハッシュ不可能な値を含むイミュータブルなシーケンスをハッシュ化しようとすると、 :exc:`TypeError` となります。" + +#: ../../builtins/stdtypes.rst:1217 +msgid "Mutable Sequence Types" +msgstr "ミュータブルなシーケンス型" + +#: ../../builtins/stdtypes.rst:1224 +msgid "" +"The operations in the following table are defined on mutable sequence types." +" The :class:`collections.abc.MutableSequence` ABC is provided to make it " +"easier to correctly implement these operations on custom sequence types." +msgstr "" +"以下のテーブルにある演算は、ほとんどのミュータブルなシーケンスでサポートされています。カスタムのシーケンス型にこれらの演算を完全に実装するのが簡単になるように、" +" :class:`collections.abc.MutableSequence` ABC が提供されています。" + +#: ../../builtins/stdtypes.rst:1228 +msgid "" +"In the table *s* is an instance of a mutable sequence type, *t* is any " +"iterable object and *x* is an arbitrary object that meets any type and value" +" restrictions imposed by *s* (for example, :class:`bytearray` only accepts " +"integers that meet the value restriction ``0 <= x <= 255``)." +msgstr "" +"このテーブルで、 *s* はミュータブルなシーケンス型のインスタンス、 *t* は任意のイテラブルオブジェクト、 *x* は *s* " +"に課された型と値の条件を満たす任意のオブジェクト (例えば、 :class:`bytearray` は値の制限 ``0 <= x <= 255`` " +"に合う整数のみを受け付けます) です。" + +#: ../../builtins/stdtypes.rst:1244 +msgid "``s[i] = x``" +msgstr "``s[i] = x``" + +#: ../../builtins/stdtypes.rst:1244 +msgid "item *i* of *s* is replaced by *x*" +msgstr "*s* の要素 *i* を *x* と入れ替えます" + +#: ../../builtins/stdtypes.rst:1247 +msgid "``del s[i]``" +msgstr "``del s[i]``" + +#: ../../builtins/stdtypes.rst:1247 +msgid "removes item *i* of *s*" +msgstr "*s* の要素 *i* を削除します" + +#: ../../builtins/stdtypes.rst:1249 +msgid "``s[i:j] = t``" +msgstr "``s[i:j] = t``" + +#: ../../builtins/stdtypes.rst:1249 +msgid "" +"slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*" +msgstr "*s* の *i* から *j* 番目までのスライスをイテラブル *t* の内容に入れ替えます" + +#: ../../builtins/stdtypes.rst:1253 +msgid "``del s[i:j]``" +msgstr "``del s[i:j]``" + +#: ../../builtins/stdtypes.rst:1253 +msgid "" +"removes the elements of ``s[i:j]`` from the list (same as ``s[i:j] = []``)" +msgstr "リストから ``s[i:j]`` の要素を削除します(``s[i:j] = []`` と同様です)" + +#: ../../builtins/stdtypes.rst:1257 +msgid "``s[i:j:k] = t``" +msgstr "``s[i:j:k] = t``" + +#: ../../builtins/stdtypes.rst:1257 +msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*" +msgstr "``s[i:j:k]`` の要素を *t* の要素と入れ替えます" + +#: ../../builtins/stdtypes.rst:1260 +msgid "``del s[i:j:k]``" +msgstr "``del s[i:j:k]``" + +#: ../../builtins/stdtypes.rst:1260 +msgid "removes the elements of ``s[i:j:k]`` from the list" +msgstr "リストから ``s[i:j:k]`` の要素を削除します" + +#: ../../builtins/stdtypes.rst:1263 +msgid "``s += t``" +msgstr "``s += t``" + +#: ../../builtins/stdtypes.rst:1263 +msgid "" +"extends *s* with the contents of *t* (for the most part the same as " +"``s[len(s):len(s)] = t``)" +msgstr "*s* を *t* の内容で拡張します (ほとんど ``s[len(s):len(s)] = t`` と同じ)" + +#: ../../builtins/stdtypes.rst:1268 +msgid "``s *= n``" +msgstr "``s *= n``" + +#: ../../builtins/stdtypes.rst:1268 +msgid "updates *s* with its contents repeated *n* times" +msgstr "*s* をその内容を *n* 回繰り返したもので更新" + +#: ../../builtins/stdtypes.rst:1275 +msgid "" +"If *k* is not equal to ``1``, *t* must have the same length as the slice it " +"is replacing." +msgstr "*k* が ``1`` と等しくない場合、 *t* はそれが入れ替えるスライスと同じ長さでなければなりません。" + +#: ../../builtins/stdtypes.rst:1278 +msgid "" +"The value *n* is an integer, or an object implementing " +":meth:`~object.__index__`. Zero and negative values of *n* clear the " +"sequence. Items in the sequence are not copied; they are referenced " +"multiple times, as explained for ``s * n`` under :ref:`typesseq-common`." +msgstr "" +"値 *n* は整数であるか、:meth:`~object.__index__` を実装したオブジェクトです。 *n* " +"の値がゼロまたは負数の場合、シーケンスをクリアします。:ref:`typesseq-common` で ``s * n`` " +"について説明したとおり、シーケンスの要素はコピーされないので注意してください; コピーではなく要素に対する参照カウントが増えます。" + +#: ../../builtins/stdtypes.rst:1284 +msgid "Mutable Sequence Methods" +msgstr "ミュータブルなシーケンスのメソッド" + +#: ../../builtins/stdtypes.rst:1285 +msgid "Mutable sequence types also support the following methods:" +msgstr "ミュータブルなシーケンス型は以下のようなメソッドをサポートしています:" + +#: ../../builtins/stdtypes.rst:1294 +msgid "" +"Append *value* to the end of the sequence. This is equivalent to writing " +"``seq[len(seq):len(seq)] = [value]``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1306 +msgid "" +"Remove all items from *sequence*. This is equivalent to writing ``del " +"sequence[:]``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1318 +msgid "" +"Create a shallow copy of *sequence*. This is equivalent to writing " +"``sequence[:]``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1321 +msgid "" +"The :meth:`!copy` method is not part of the " +":class:`~collections.abc.MutableSequence` :class:`~abc.ABC`, but most " +"concrete mutable sequence types provide it." +msgstr "" + +#: ../../builtins/stdtypes.rst:1332 +msgid "" +"Extend *sequence* with the contents of *iterable*. For the most part, this " +"is the same as writing ``seq[len(seq):len(seq)] = iterable``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1343 +msgid "" +"Insert *value* into *sequence* at the given *index*. This is equivalent to " +"writing ``sequence[index:index] = [value]``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1353 +msgid "" +"Retrieve the item at *index* and also remove it from *sequence*. By default," +" the last item in *sequence* is removed and returned." +msgstr "" + +#: ../../builtins/stdtypes.rst:1363 +msgid "Remove the first item from *sequence* where ``sequence[i] == value``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1374 +msgid "" +"Reverse the items of *sequence* in place. This method maintains economy of " +"space when reversing a large sequence. To remind users that it operates by " +"side-effect, it returns ``None``." +msgstr "" + +#: ../../builtins/stdtypes.rst:1382 +msgid "Lists" +msgstr "リスト型 (list)" + +#: ../../builtins/stdtypes.rst:1386 +msgid "" +"Lists are mutable sequences, typically used to store collections of " +"homogeneous items (where the precise degree of similarity will vary by " +"application)." +msgstr "" +"リストはミュータブルなシーケンスで、一般的に同種の項目の集まりを格納するために使われます " +"(厳密な類似の度合いはアプリケーションによって異なる場合があります)。" + +#: ../../builtins/stdtypes.rst:1392 +msgid "Lists may be constructed in several ways:" +msgstr "リストの構成にはいくつかの方法があります:" + +#: ../../builtins/stdtypes.rst:1394 +msgid "Using a pair of square brackets to denote the empty list: ``[]``" +msgstr "角括弧の対を使い、空のリストを表す: ``[]``" + +#: ../../builtins/stdtypes.rst:1395 +msgid "" +"Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``" +msgstr "角括弧を使い、項目をカンマで区切る: ``[a]``、``[a, b, c]``" + +#: ../../builtins/stdtypes.rst:1396 +msgid "Using a list comprehension: ``[x for x in iterable]``" +msgstr "リスト内包表記を使う: ``[x for x in iterable]``" + +#: ../../builtins/stdtypes.rst:1397 +msgid "Using the type constructor: ``list()`` or ``list(iterable)``" +msgstr "型コンストラクタを使う: ``list()`` または ``list(iterable)``" + +#: ../../builtins/stdtypes.rst:1399 +msgid "" +"The constructor builds a list whose items are the same and in the same order" +" as *iterable*'s items. *iterable* may be either a sequence, a container " +"that supports iteration, or an iterator object. If *iterable* is already a " +"list, a copy is made and returned, similar to ``iterable[:]``. For example, " +"``list('abc')`` returns ``['a', 'b', 'c']`` and ``list( (1, 2, 3) )`` " +"returns ``[1, 2, 3]``. If no argument is given, the constructor creates a " +"new empty list, ``[]``." +msgstr "" +"コンストラクタは、 *iterable* の項目と同じ項目で同じ順のリストを構築します。 *iterable* " +"は、シーケンス、イテレートをサポートするコンテナ、またはイテレータオブジェクトです。 *iterable* が既にリストなら、 " +"``iterable[:]`` と同様にコピーが作られて返されます。例えば、 ``list('abc')`` は ``['a', 'b', 'c']``" +" を、 ``list( (1, 2, 3) )`` は ``[1, 2, 3]`` " +"を返します。引数が与えられなければ、このコンストラクタは新しい空のリスト ``[]`` を作成します。" + +#: ../../builtins/stdtypes.rst:1408 +msgid "" +"Many other operations also produce lists, including the :func:`sorted` " +"built-in." +msgstr "リストを作る方法は、他にも組み込み関数 :func:`sorted` などいろいろあります。" + +#: ../../builtins/stdtypes.rst:1411 +msgid "Lists are :ref:`generic ` over the types of their items." +msgstr "" + +#: ../../builtins/stdtypes.rst:1413 +msgid "" +"Lists implement all of the :ref:`common ` and :ref:`mutable" +" ` sequence operations. Lists also provide the following " +"additional method:" +msgstr "" +"リストは :ref:`共通の ` および :ref:`ミュータブルの ` " +"シーケンス演算をすべて実装します。リストは、更に以下のメソッドも提供します:" + +#: ../../builtins/stdtypes.rst:1419 +msgid "" +"This method sorts the list in place, using only ``<`` comparisons between " +"items. Exceptions are not suppressed - if any comparison operations fail, " +"the entire sort operation will fail (and the list will likely be left in a " +"partially modified state)." +msgstr "" +"このメソッドは、項目間の ``<`` " +"比較のみを用いてリストをインプレースにソートします。例外は抑制されません。比較演算がどこかで失敗したら、ソート演算自体が失敗します " +"(そしてリストは部分的に変更された状態で残されるでしょう)。" + +#: ../../builtins/stdtypes.rst:1424 +msgid "" +":meth:`sort` accepts two arguments that can only be passed by keyword " +"(:ref:`keyword-only arguments `):" +msgstr "" +":meth:`sort` は、キーワードでしか渡せない 2 つの引数 (:ref:`キーワード専用引数 `) を受け付けます:" + +#: ../../builtins/stdtypes.rst:1427 +msgid "" +"*key* specifies a function of one argument that is used to extract a " +"comparison key from each list element (for example, ``key=str.lower``). The " +"key corresponding to each item in the list is calculated once and then used " +"for the entire sorting process. The default value of ``None`` means that " +"list items are sorted directly without calculating a separate key value." +msgstr "" +"*key* は一引数をとる関数を指定し、リストのそれぞれの要素から比較キーを取り出すのに使います (例えば、 " +"``key=str.lower``)。それぞれの項目に対応するキーは一度計算され、ソート処理全体に使われます。デフォルトの値 ``None`` " +"は、別のキー値を計算せず、リストの値が直接ソートされることを意味します。" + +#: ../../builtins/stdtypes.rst:1434 +msgid "" +"The :func:`functools.cmp_to_key` utility is available to convert a 2.x style" +" *cmp* function to a *key* function." +msgstr "" +"2.x 形式の *cmp* 関数を *key* 関数に変換するために、:func:`functools.cmp_to_key` " +"ユーティリティが利用できます。" + +#: ../../builtins/stdtypes.rst:1437 +msgid "" +"*reverse* is a boolean value. If set to ``True``, then the list elements " +"are sorted as if each comparison were reversed." +msgstr "*reverse* は真偽値です。 ``True`` がセットされた場合、リストの要素は個々の比較が反転したものとして並び替えられます。" + +#: ../../builtins/stdtypes.rst:1440 +msgid "" +"This method modifies the sequence in place for economy of space when sorting" +" a large sequence. To remind users that it operates by side effect, it does" +" not return the sorted sequence (use :func:`sorted` to explicitly request a " +"new sorted list instance)." +msgstr "" +"このメソッドは、大きなシーケンスをソートするときの容量の節約のため、シーケンスをインプレースに変化させます。副作用としてこの演算が行われることをユーザに気づかせるために、これはソートしたシーケンスを返しません" +" (新しいリストインスタンスを明示的に要求するには :func:`sorted` を使ってください)。" + +#: ../../builtins/stdtypes.rst:1445 +msgid "" +"The :meth:`sort` method is guaranteed to be stable. A sort is stable if it " +"guarantees not to change the relative order of elements that compare equal " +"--- this is helpful for sorting in multiple passes (for example, sort by " +"department, then by salary grade)." +msgstr "" +":meth:`sort` " +"メソッドは安定していることが保証されています。ソートは、等しい要素の相対順序が変更されないことが保証されていれば、安定しています。これは複数パスのソートを行なう" +" (例えば部署でソートして、それから給与の等級でソートする) のに役立ちます。" + +#: ../../builtins/stdtypes.rst:1450 +msgid "" +"For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." +msgstr "ソートの例と簡単なチュートリアルは :ref:`sortinghowto` を参照して下さい。" + +#: ../../builtins/stdtypes.rst:1454 +msgid "" +"While a list is being sorted, the effect of attempting to mutate, or even " +"inspect, the list is undefined. The C implementation of Python makes the " +"list appear empty for the duration, and raises :exc:`ValueError` if it can " +"detect that the list has been mutated during a sort." +msgstr "" +"リストがソートされている間、または変更しようとする試みの影響中、あるいは検査中でさえ、リストは未定義です。Python の C " +"実装では、それらが続いている間、リストは空として出力され、リストがソート中に変更されていることを検知できたら :exc:`ValueError` " +"を送出します。" + +#: ../../builtins/stdtypes.rst:1461 +msgid "" +"For detailed information on thread-safety guarantees for :class:`list` " +"objects, see :ref:`thread-safety-list`." +msgstr "" + +#: ../../builtins/stdtypes.rst:1468 +msgid "Tuples" +msgstr "タプル型 (tuple)" + +#: ../../builtins/stdtypes.rst:1472 +msgid "" +"Tuples are immutable sequences, typically used to store collections of " +"heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` " +"built-in). Tuples are also used for cases where an immutable sequence of " +"homogeneous data is needed (such as allowing storage in a :class:`set` or " +":class:`dict` instance)." +msgstr "" +"タプルはイミュータブルなシーケンスで、一般的に異種のデータの集まり (組み込みの :func:`enumerate` で作られた 2-タプルなど) " +"を格納するために使われます。タプルはまた、同種のデータのイミュータブルなシーケンスが必要な場合 (:class:`set` インスタンスや " +":class:`dict` インスタンスに保存できるようにするためなど) にも使われます。" + +#: ../../builtins/stdtypes.rst:1480 +msgid "Tuples may be constructed in a number of ways:" +msgstr "タプルの構成にはいくつかの方法があります:" + +#: ../../builtins/stdtypes.rst:1482 +msgid "Using a pair of parentheses to denote the empty tuple: ``()``" +msgstr "丸括弧の対を使い、空のタプルを表す: ``()``" + +#: ../../builtins/stdtypes.rst:1483 +msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``" +msgstr "カンマを使い、単要素のタプルを表す: ``a,`` または ``(a,)``" + +#: ../../builtins/stdtypes.rst:1484 +msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``" +msgstr "項目をカンマで区切る: ``a, b, c`` または ``(a, b, c)``" + +#: ../../builtins/stdtypes.rst:1485 +msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``" +msgstr "組み込みの :func:`tuple` を使う: ``tuple()`` または ``tuple(iterable)``" + +#: ../../builtins/stdtypes.rst:1487 +msgid "" +"The constructor builds a tuple whose items are the same and in the same " +"order as *iterable*'s items. *iterable* may be either a sequence, a " +"container that supports iteration, or an iterator object. If *iterable* is " +"already a tuple, it is returned unchanged. For example, ``tuple('abc')`` " +"returns ``('a', 'b', 'c')`` and ``tuple( [1, 2, 3] )`` returns ``(1, 2, " +"3)``. If no argument is given, the constructor creates a new empty tuple, " +"``()``." +msgstr "" +"コンストラクタは、 *iterable* の項目と同じ項目で同じ順のタプルを構築します。 *iterable* " +"は、シーケンス、イテレートをサポートするコンテナ、またはイテレータオブジェクトです。 *iterable* " +"が既にタプルなら、そのまま返されます。例えば、 ``tuple('abc')`` は ``('a', 'b', 'c')`` を、 ``tuple( " +"[1, 2, 3] )`` は ``(1, 2, 3)`` を返します。引数が与えられなければ、このコンストラクタは新しい空のタプル ``()`` " +"を作成します。" + +#: ../../builtins/stdtypes.rst:1495 +msgid "" +"Note that it is actually the comma which makes a tuple, not the parentheses." +" The parentheses are optional, except in the empty tuple case, or when they " +"are needed to avoid syntactic ambiguity. For example, ``f(a, b, c)`` is a " +"function call with three arguments, while ``f((a, b, c))`` is a function " +"call with a 3-tuple as the sole argument." +msgstr "" +"なお、タプルを作るのはカンマであり、丸括弧ではありません。丸括弧は省略可能ですが、空のタプルの場合や構文上の曖昧さを避けるのに必要な時は例外です。例えば、" +" ``f(a, b, c)`` は三引数の関数呼び出しですが、``f((a, b, c))`` は 3-タプルを唯一の引数とする関数の呼び出しです。" + +#: ../../builtins/stdtypes.rst:1501 +msgid "" +"Tuples implement all of the :ref:`common ` sequence " +"operations." +msgstr "タプルは :ref:`共通の ` シーケンス演算をすべて実装します。" + +#: ../../builtins/stdtypes.rst:1504 +msgid "" +"Tuples are :ref:`generic ` over the types of their contents. For " +"more information, refer to :ref:`the typing documentation on annotating " +"tuples `." +msgstr "" + +#: ../../builtins/stdtypes.rst:1508 +msgid "" +"For heterogeneous collections of data where access by name is clearer than " +"access by index, :func:`collections.namedtuple` may be a more appropriate " +"choice than a simple tuple object." +msgstr "" +"異種のデータの集まりで、インデックスによってアクセスするよりも名前によってアクセスしたほうが明確になるものには、単純なタプルオブジェクトよりも " +":func:`collections.namedtuple` が向いているかもしれません。" + +#: ../../builtins/stdtypes.rst:1516 +msgid "Ranges" +msgstr "range" + +#: ../../builtins/stdtypes.rst:1520 +msgid "" +"The :class:`range` type represents an immutable sequence of numbers and is " +"commonly used for looping a specific number of times in :keyword:`for` " +"loops." +msgstr "" +":class:`range` 型は、数のイミュータブルなシーケンスを表し、一般に :keyword:`for` " +"ループにおいて特定の回数のループに使われます。" + +#: ../../builtins/stdtypes.rst:1527 +msgid "" +"The arguments to the range constructor must be integers (either built-in " +":class:`int` or any object that implements the :meth:`~object.__index__` " +"special method). If the *step* argument is omitted, it defaults to ``1``. " +"If the *start* argument is omitted, it defaults to ``0``. If *step* is zero," +" :exc:`ValueError` is raised." +msgstr "" +"range コンストラクタの引数は整数 (組み込みの :class:`int` または :meth:`~object.__index__` " +"特殊メソッドを実装するオブジェクト) でなければなりません。*step* 引数が省略された場合のデフォルト値は ``1`` です。*start* " +"引数が省略された場合のデフォルト値は ``0`` です。 *step* が 0 の場合、:exc:`ValueError` が送出されます。" + +#: ../../builtins/stdtypes.rst:1533 +msgid "" +"For a positive *step*, the contents of a range ``r`` are determined by the " +"formula ``r[i] = start + step*i`` where ``i >= 0`` and ``r[i] < stop``." +msgstr "" +"*step* が正の場合、range ``r`` の内容は式 ``r[i] = start + step*i`` で決定されます。ここで、 ``i >=" +" 0`` かつ ``r[i] < stop`` です。" + +#: ../../builtins/stdtypes.rst:1537 +msgid "" +"For a negative *step*, the contents of the range are still determined by the" +" formula ``r[i] = start + step*i``, but the constraints are ``i >= 0`` and " +"``r[i] > stop``." +msgstr "" +"*step* が負の場合も、range ``r`` の内容は式 ``r[i] = start + step*i`` で決定されます。ただし、制約条件は " +"``i >= 0`` かつ ``r[i] > stop`` です。" + +#: ../../builtins/stdtypes.rst:1541 +msgid "" +"A range object will be empty if ``r[0]`` does not meet the value constraint." +" Ranges do support negative indices, but these are interpreted as indexing " +"from the end of the sequence determined by the positive indices." +msgstr "" +"``r[0]`` が値の制約を満たさない場合、range オブジェクトは空になります。range " +"は負のインデックスをサポートしますが、これらは正のインデックスにより決定されるシーケンスの末尾からのインデックス指定として解釈されます。" + +#: ../../builtins/stdtypes.rst:1546 +msgid "" +"Ranges containing absolute values larger than :data:`sys.maxsize` are " +"permitted but some features (such as :func:`len`) may raise " +":exc:`OverflowError`." +msgstr "" +"range は :data:`sys.maxsize` より大きい絶対値を含むことができますが、いくつかの機能 (:func:`len` など) は " +":exc:`OverflowError` を送出することがあります。" + +#: ../../builtins/stdtypes.rst:1550 +msgid "Range examples::" +msgstr "range の例::" + +#: ../../builtins/stdtypes.rst:1552 +msgid "" +">>> list(range(10))\n" +"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n" +">>> list(range(1, 11))\n" +"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" +">>> list(range(0, 30, 5))\n" +"[0, 5, 10, 15, 20, 25]\n" +">>> list(range(0, 10, 3))\n" +"[0, 3, 6, 9]\n" +">>> list(range(0, -10, -1))\n" +"[0, -1, -2, -3, -4, -5, -6, -7, -8, -9]\n" +">>> list(range(0))\n" +"[]\n" +">>> list(range(1, 0))\n" +"[]" +msgstr "" + +#: ../../builtins/stdtypes.rst:1567 +msgid "" +"Ranges implement all of the :ref:`common ` sequence " +"operations except concatenation and repetition (due to the fact that range " +"objects can only represent sequences that follow a strict pattern and " +"repetition and concatenation will usually violate that pattern)." +msgstr "" +"range は :ref:`共通の ` シーケンス演算を、結合と繰り返し以外すべて実装します (range " +"オブジェクトは厳格なパターンに従うシーケンスのみを表せ、繰り返しと結合はたいていそのパターンを破るという事実によります)。" + +#: ../../builtins/stdtypes.rst:1574 +msgid "" +"The value of the *start* parameter (or ``0`` if the parameter was not " +"supplied)" +msgstr "引数 *start* の値 (この引数が与えられていない場合は ``0``)" + +#: ../../builtins/stdtypes.rst:1579 +msgid "The value of the *stop* parameter" +msgstr "引数 *stop* の値" + +#: ../../builtins/stdtypes.rst:1583 +msgid "" +"The value of the *step* parameter (or ``1`` if the parameter was not " +"supplied)" +msgstr "引数 *step* の値 (この引数が与えられていない場合は ``1``)" + +#: ../../builtins/stdtypes.rst:1586 +msgid "" +"The advantage of the :class:`range` type over a regular :class:`list` or " +":class:`tuple` is that a :class:`range` object will always take the same " +"(small) amount of memory, no matter the size of the range it represents (as " +"it only stores the ``start``, ``stop`` and ``step`` values, calculating " +"individual items and subranges as needed)." +msgstr "" +":class:`range` 型が通常の :class:`list` や :class:`tuple` にまさる点は、:class:`range` " +"オブジェクトがサイズや表す範囲にかかわらず常に一定の (小さな) 量のメモリを使うことです (``start``、``stop``、``step`` " +"の値のみを保存し、後は必要に応じて個々の項目や部分 range を計算するためです)。" + +#: ../../builtins/stdtypes.rst:1592 +msgid "" +"Range objects implement the :class:`collections.abc.Sequence` ABC, and " +"provide features such as containment tests, element index lookup, slicing " +"and support for negative indices (see :ref:`typesseq`):" +msgstr "" +"range オブジェクトは :class:`collections.abc.Sequence` ABC " +"を実装し、包含判定、要素インデックス検索、スライシングのような機能を提供し、負のインデックスをサポートします (:ref:`typesseq` " +"を参照):" + +#: ../../builtins/stdtypes.rst:1612 +msgid "" +"Testing range objects for equality with ``==`` and ``!=`` compares them as " +"sequences. That is, two range objects are considered equal if they " +"represent the same sequence of values. (Note that two range objects that " +"compare equal might have different :attr:`~range.start`, :attr:`~range.stop`" +" and :attr:`~range.step` attributes, for example ``range(0) == range(2, 1, " +"3)`` or ``range(0, 3, 2) == range(0, 4, 2)``.)" +msgstr "" +"``==`` および ``!=`` による range オブジェクトの等価性の判定は、これらをシーケンスとして比較します。つまり、二つの range " +"オブジェクトは同じ値のシーケンスを表すなら等しいとみなされます。(なお、二つの等しいとされる range オブジェクトが異なる " +":attr:`~range.start`, :attr:`~range.stop` および :attr:`~range.step` " +"属性を持つことがあります。例えば ``range(0) == range(2, 1, 3)`` や ``range(0, 3, 2) == " +"range(0, 4, 2)``。)" + +#: ../../builtins/stdtypes.rst:1619 +msgid "" +"Implement the Sequence ABC. Support slicing and negative indices. Test " +":class:`int` objects for membership in constant time instead of iterating " +"through all items." +msgstr "" +"シーケンス ABC を実装。スライスと負のインデックスのサポート。:class:`int` " +"オブジェクトの帰属判定を、すべてのアイテムをイテレートする代わりに、定数時間で行います。" + +#: ../../builtins/stdtypes.rst:1625 +msgid "" +"Define '==' and '!=' to compare range objects based on the sequence of " +"values they define (instead of comparing based on object identity)." +msgstr "" +"(オブジェクトの同一性に基づいて比較する代わりに) range オブジェクトをそれらが定義する値のシーケンスに基づいて比較するように '==' と " +"'!=' を定義しました。" + +#: ../../builtins/stdtypes.rst:1630 +msgid "" +"Added the :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " +"attributes." +msgstr "" +"属性 :attr:`~range.start`, :attr:`~range.stop` および :attr:`~range.step` が追加。" + +#: ../../builtins/stdtypes.rst:1635 +msgid "" +"The `linspace recipe `_ shows how to implement a lazy version of range " +"suitable for floating-point applications." +msgstr "" +"`linspace レシピ `_ は浮動小数点数向けの遅延評価版 range を実装する方法を紹介しています。" + +#: ../../builtins/stdtypes.rst:1647 +msgid "Text and Binary Sequence Type Methods Summary" +msgstr "" + +#: ../../builtins/stdtypes.rst:1648 +msgid "" +"The following table summarizes the text and binary sequence types methods by" +" category." +msgstr "" + +#: ../../builtins/stdtypes.rst:1653 +msgid "Category" +msgstr "カテゴリ" + +#: ../../builtins/stdtypes.rst:1653 +msgid ":class:`str` methods" +msgstr ":class:`str` メソッド" + +#: ../../builtins/stdtypes.rst:1653 +msgid ":class:`bytes` and :class:`bytearray` methods" +msgstr ":class:`bytes` または :class:`bytearray` メソッド" + +#: ../../builtins/stdtypes.rst:1655 +msgid "Formatting" +msgstr "" + +#: ../../builtins/stdtypes.rst:1655 +msgid ":meth:`str.format`" +msgstr ":meth:`str.format`" + +#: ../../builtins/stdtypes.rst:1657 +msgid ":meth:`str.format_map`" +msgstr ":meth:`str.format_map`" + +#: ../../builtins/stdtypes.rst:1659 +msgid ":ref:`f-strings`" +msgstr ":ref:`f-strings`" + +#: ../../builtins/stdtypes.rst:1661 +msgid ":ref:`old-string-formatting`" +msgstr ":ref:`old-string-formatting`" + +#: ../../builtins/stdtypes.rst:1661 +msgid ":ref:`bytes-formatting`" +msgstr ":ref:`bytes-formatting`" + +#: ../../builtins/stdtypes.rst:1663 +msgid "Searching and Replacing" +msgstr "" + +#: ../../builtins/stdtypes.rst:1663 +msgid ":meth:`str.find`" +msgstr ":meth:`str.find`" + +#: ../../builtins/stdtypes.rst:1663 +msgid ":meth:`str.rfind`" +msgstr ":meth:`str.rfind`" + +#: ../../builtins/stdtypes.rst:1663 +msgid ":meth:`bytes.find`" +msgstr ":meth:`bytes.find`" + +#: ../../builtins/stdtypes.rst:1663 +msgid ":meth:`bytes.rfind`" +msgstr ":meth:`bytes.rfind`" + +#: ../../builtins/stdtypes.rst:1665 +msgid ":meth:`str.index`" +msgstr ":meth:`str.index`" + +#: ../../builtins/stdtypes.rst:1665 +msgid ":meth:`str.rindex`" +msgstr ":meth:`str.rindex`" + +#: ../../builtins/stdtypes.rst:1665 +msgid ":meth:`bytes.index`" +msgstr ":meth:`bytes.index`" + +#: ../../builtins/stdtypes.rst:1665 +msgid ":meth:`bytes.rindex`" +msgstr ":meth:`bytes.rindex`" + +#: ../../builtins/stdtypes.rst:1667 +msgid ":meth:`str.startswith`" +msgstr ":meth:`str.startswith`" + +#: ../../builtins/stdtypes.rst:1667 +msgid ":meth:`bytes.startswith`" +msgstr ":meth:`bytes.startswith`" + +#: ../../builtins/stdtypes.rst:1669 +msgid ":meth:`str.endswith`" +msgstr ":meth:`str.endswith`" + +#: ../../builtins/stdtypes.rst:1669 +msgid ":meth:`bytes.endswith`" +msgstr ":meth:`bytes.endswith`" + +#: ../../builtins/stdtypes.rst:1671 +msgid ":meth:`str.count`" +msgstr ":meth:`str.count`" + +#: ../../builtins/stdtypes.rst:1671 +msgid ":meth:`bytes.count`" +msgstr ":meth:`bytes.count`" + +#: ../../builtins/stdtypes.rst:1673 +msgid ":meth:`str.replace`" +msgstr ":meth:`str.replace`" + +#: ../../builtins/stdtypes.rst:1673 +msgid ":meth:`bytes.replace`" +msgstr ":meth:`bytes.replace`" + +#: ../../builtins/stdtypes.rst:1675 +msgid "Splitting and Joining" +msgstr "" + +#: ../../builtins/stdtypes.rst:1675 +msgid ":meth:`str.split`" +msgstr ":meth:`str.split`" + +#: ../../builtins/stdtypes.rst:1675 +msgid ":meth:`str.rsplit`" +msgstr ":meth:`str.rsplit`" + +#: ../../builtins/stdtypes.rst:1675 +msgid ":meth:`bytes.split`" +msgstr ":meth:`bytes.split`" + +#: ../../builtins/stdtypes.rst:1675 +msgid ":meth:`bytes.rsplit`" +msgstr ":meth:`bytes.rsplit`" + +#: ../../builtins/stdtypes.rst:1677 +msgid ":meth:`str.splitlines`" +msgstr ":meth:`str.splitlines`" + +#: ../../builtins/stdtypes.rst:1677 +msgid ":meth:`bytes.splitlines`" +msgstr ":meth:`bytes.splitlines`" + +#: ../../builtins/stdtypes.rst:1679 +msgid ":meth:`str.partition`" +msgstr ":meth:`str.partition`" + +#: ../../builtins/stdtypes.rst:1679 +msgid ":meth:`bytes.partition`" +msgstr ":meth:`bytes.partition`" + +#: ../../builtins/stdtypes.rst:1681 +msgid ":meth:`str.rpartition`" +msgstr ":meth:`str.rpartition`" + +#: ../../builtins/stdtypes.rst:1681 +msgid ":meth:`bytes.rpartition`" +msgstr ":meth:`bytes.rpartition`" + +#: ../../builtins/stdtypes.rst:1683 +msgid ":meth:`str.join`" +msgstr ":meth:`str.join`" + +#: ../../builtins/stdtypes.rst:1683 +msgid ":meth:`bytes.join`" +msgstr ":meth:`bytes.join`" + +#: ../../builtins/stdtypes.rst:1685 +msgid "String Classification" +msgstr "" + +#: ../../builtins/stdtypes.rst:1685 +msgid ":meth:`str.isalpha`" +msgstr ":meth:`str.isalpha`" + +#: ../../builtins/stdtypes.rst:1685 +msgid ":meth:`bytes.isalpha`" +msgstr ":meth:`bytes.isalpha`" + +#: ../../builtins/stdtypes.rst:1687 +msgid ":meth:`str.isdecimal`" +msgstr ":meth:`str.isdecimal`" + +#: ../../builtins/stdtypes.rst:1689 +msgid ":meth:`str.isdigit`" +msgstr ":meth:`str.isdigit`" + +#: ../../builtins/stdtypes.rst:1689 +msgid ":meth:`bytes.isdigit`" +msgstr ":meth:`bytes.isdigit`" + +#: ../../builtins/stdtypes.rst:1691 +msgid ":meth:`str.isnumeric`" +msgstr ":meth:`str.isnumeric`" + +#: ../../builtins/stdtypes.rst:1693 +msgid ":meth:`str.isalnum`" +msgstr ":meth:`str.isalnum`" + +#: ../../builtins/stdtypes.rst:1693 +msgid ":meth:`bytes.isalnum`" +msgstr ":meth:`bytes.isalnum`" + +#: ../../builtins/stdtypes.rst:1695 +msgid ":meth:`str.isidentifier`" +msgstr ":meth:`str.isidentifier`" + +#: ../../builtins/stdtypes.rst:1697 +msgid ":meth:`str.islower`" +msgstr ":meth:`str.islower`" + +#: ../../builtins/stdtypes.rst:1697 +msgid ":meth:`bytes.islower`" +msgstr ":meth:`bytes.islower`" + +#: ../../builtins/stdtypes.rst:1699 +msgid ":meth:`str.isupper`" +msgstr ":meth:`str.isupper`" + +#: ../../builtins/stdtypes.rst:1699 +msgid ":meth:`bytes.isupper`" +msgstr ":meth:`bytes.isupper`" + +#: ../../builtins/stdtypes.rst:1701 +msgid ":meth:`str.istitle`" +msgstr ":meth:`str.istitle`" + +#: ../../builtins/stdtypes.rst:1701 +msgid ":meth:`bytes.istitle`" +msgstr ":meth:`bytes.istitle`" + +#: ../../builtins/stdtypes.rst:1703 +msgid ":meth:`str.isspace`" +msgstr ":meth:`str.isspace`" + +#: ../../builtins/stdtypes.rst:1703 +msgid ":meth:`bytes.isspace`" +msgstr ":meth:`bytes.isspace`" + +#: ../../builtins/stdtypes.rst:1705 +msgid ":meth:`str.isprintable`" +msgstr ":meth:`str.isprintable`" + +#: ../../builtins/stdtypes.rst:1707 +msgid "Case Manipulation" +msgstr "" + +#: ../../builtins/stdtypes.rst:1707 +msgid ":meth:`str.lower`" +msgstr ":meth:`str.lower`" + +#: ../../builtins/stdtypes.rst:1707 +msgid ":meth:`bytes.lower`" +msgstr ":meth:`bytes.lower`" + +#: ../../builtins/stdtypes.rst:1709 +msgid ":meth:`str.upper`" +msgstr ":meth:`str.upper`" + +#: ../../builtins/stdtypes.rst:1709 +msgid ":meth:`bytes.upper`" +msgstr ":meth:`bytes.upper`" + +#: ../../builtins/stdtypes.rst:1711 +msgid ":meth:`str.casefold`" +msgstr ":meth:`str.casefold`" + +#: ../../builtins/stdtypes.rst:1713 +msgid ":meth:`str.capitalize`" +msgstr ":meth:`str.capitalize`" + +#: ../../builtins/stdtypes.rst:1713 +msgid ":meth:`bytes.capitalize`" +msgstr ":meth:`bytes.capitalize`" + +#: ../../builtins/stdtypes.rst:1715 +msgid ":meth:`str.title`" +msgstr ":meth:`str.title`" + +#: ../../builtins/stdtypes.rst:1715 +msgid ":meth:`bytes.title`" +msgstr ":meth:`bytes.title`" + +#: ../../builtins/stdtypes.rst:1717 +msgid ":meth:`str.swapcase`" +msgstr ":meth:`str.swapcase`" + +#: ../../builtins/stdtypes.rst:1717 +msgid ":meth:`bytes.swapcase`" +msgstr ":meth:`bytes.swapcase`" + +#: ../../builtins/stdtypes.rst:1719 +msgid "Padding and Stripping" +msgstr "" + +#: ../../builtins/stdtypes.rst:1719 +msgid ":meth:`str.ljust`" +msgstr ":meth:`str.ljust`" + +#: ../../builtins/stdtypes.rst:1719 +msgid ":meth:`str.rjust`" +msgstr ":meth:`str.rjust`" + +#: ../../builtins/stdtypes.rst:1719 +msgid ":meth:`bytes.ljust`" +msgstr ":meth:`bytes.ljust`" + +#: ../../builtins/stdtypes.rst:1719 +msgid ":meth:`bytes.rjust`" +msgstr ":meth:`bytes.rjust`" + +#: ../../builtins/stdtypes.rst:1721 +msgid ":meth:`str.center`" +msgstr ":meth:`str.center`" + +#: ../../builtins/stdtypes.rst:1721 +msgid ":meth:`bytes.center`" +msgstr ":meth:`bytes.center`" + +#: ../../builtins/stdtypes.rst:1723 +msgid ":meth:`str.expandtabs`" +msgstr ":meth:`str.expandtabs`" + +#: ../../builtins/stdtypes.rst:1723 +msgid ":meth:`bytes.expandtabs`" +msgstr ":meth:`bytes.expandtabs`" + +#: ../../builtins/stdtypes.rst:1725 +msgid ":meth:`str.strip`" +msgstr ":meth:`str.strip`" + +#: ../../builtins/stdtypes.rst:1725 +msgid ":meth:`bytes.strip`" +msgstr ":meth:`bytes.strip`" + +#: ../../builtins/stdtypes.rst:1727 +msgid ":meth:`str.lstrip`" +msgstr ":meth:`str.lstrip`" + +#: ../../builtins/stdtypes.rst:1727 +msgid ":meth:`str.rstrip`" +msgstr ":meth:`str.rstrip`" + +#: ../../builtins/stdtypes.rst:1727 +msgid ":meth:`bytes.lstrip`" +msgstr ":meth:`bytes.lstrip`" + +#: ../../builtins/stdtypes.rst:1727 +msgid ":meth:`bytes.rstrip`" +msgstr ":meth:`bytes.rstrip`" + +#: ../../builtins/stdtypes.rst:1729 +msgid ":meth:`str.removeprefix`" +msgstr "" + +#: ../../builtins/stdtypes.rst:1729 +msgid ":meth:`bytes.removeprefix`" +msgstr "" + +#: ../../builtins/stdtypes.rst:1731 +msgid ":meth:`str.removesuffix`" +msgstr "" + +#: ../../builtins/stdtypes.rst:1731 +msgid ":meth:`bytes.removesuffix`" +msgstr "" + +#: ../../builtins/stdtypes.rst:1733 +msgid "Translation and Encoding" +msgstr "" + +#: ../../builtins/stdtypes.rst:1733 +msgid ":meth:`str.translate`" +msgstr ":meth:`str.translate`" + +#: ../../builtins/stdtypes.rst:1733 +msgid ":meth:`bytes.translate`" +msgstr ":meth:`bytes.translate`" + +#: ../../builtins/stdtypes.rst:1735 +msgid ":meth:`str.maketrans`" +msgstr ":meth:`str.maketrans`" + +#: ../../builtins/stdtypes.rst:1735 +msgid ":meth:`bytes.maketrans`" +msgstr ":meth:`bytes.maketrans`" + +#: ../../builtins/stdtypes.rst:1737 +msgid ":meth:`str.encode`" +msgstr ":meth:`str.encode`" + +#: ../../builtins/stdtypes.rst:1739 +msgid ":meth:`bytes.decode`" +msgstr ":meth:`bytes.decode`" + +#: ../../builtins/stdtypes.rst:1745 +msgid "Text Sequence Type --- :class:`str`" +msgstr "テキストシーケンス型 --- :class:`str`" + +#: ../../builtins/stdtypes.rst:1747 +msgid "" +"Textual data in Python is handled with :class:`str` objects, or " +":dfn:`strings`. Strings are immutable :ref:`sequences ` of Unicode" +" code points. String literals are written in a variety of ways:" +msgstr "" +"Python のテキストデータは :class:`str` オブジェクト、すなわち :dfn:`文字列` として扱われます。文字列は Unicode " +"コードポイントのイミュータブルな :ref:`シーケンス ` です。文字列リテラルには様々な記述方法があります:" + +#: ../../builtins/stdtypes.rst:1752 +msgid "Single quotes: ``'allows embedded \"double\" quotes'``" +msgstr "シングルクォート: ``'\"ダブル\" クォートを埋め込むことができます'``" + +#: ../../builtins/stdtypes.rst:1753 +msgid "Double quotes: ``\"allows embedded 'single' quotes\"``" +msgstr "ダブルクォート: ``\"'シングル' クォートを埋め込むことができます\"``。" + +#: ../../builtins/stdtypes.rst:1754 +msgid "Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double quotes\"\"\"``" +msgstr "三重引用符: ``'''三つのシングルクォート'''``, ``\"\"\"三つのダブルクォート\"\"\"``" + +#: ../../builtins/stdtypes.rst:1756 +msgid "" +"Triple quoted strings may span multiple lines - all associated whitespace " +"will be included in the string literal." +msgstr "三重引用符文字列は、複数行に分けることができます。関連付けられる空白はすべて文字列リテラルに含まれます。" + +#: ../../builtins/stdtypes.rst:1759 +msgid "" +"String literals that are part of a single expression and have only " +"whitespace between them will be implicitly converted to a single string " +"literal. That is, ``(\"spam \" \"eggs\") == \"spam eggs\"``." +msgstr "" +"単式の一部であり間に空白のみを含む文字列リテラルは、一つの文字列リテラルに暗黙に変換されます。つまり、``(\"spam \" \"eggs\") ==" +" \"spam eggs\"`` です。" + +#: ../../builtins/stdtypes.rst:1763 +msgid "" +"See :ref:`strings` for more about the various forms of string literal, " +"including supported :ref:`escape sequences `, and the " +"``r`` (\"raw\") prefix that disables most escape sequence processing." +msgstr "" +"サポートされている :ref:`エスケープシーケンス ` や、ほとんどのエスケープシーケンスの処理を無効化する " +"``r`` (\"raw\") 接頭辞など、文字列リテラルのさまざまな形式についての詳細は :ref:`strings` を参照してください。" + +#: ../../builtins/stdtypes.rst:1767 +msgid "" +"Strings may also be created from other objects using the :class:`str` " +"constructor." +msgstr "文字列は他のオブジェクトに :class:`str` コンストラクタを使うことでも生成できます。" + +#: ../../builtins/stdtypes.rst:1770 +msgid "" +"Since there is no separate \"character\" type, indexing a string produces " +"strings of length 1. That is, for a non-empty string *s*, ``s[0] == " +"s[0:1]``." +msgstr "" +"\"character\" 型が特別に用意されているわけではないので、文字列のインデックス指定を行うと長さ 1 " +"の文字列を作成します。つまり、空でない文字列 *s* に対し、``s[0] == s[0:1]`` です。" + +#: ../../builtins/stdtypes.rst:1776 +msgid "" +"There is also no mutable string type, but :meth:`str.join` or " +":class:`io.StringIO` can be used to efficiently construct strings from " +"multiple fragments." +msgstr "" +"ミュータブルな文字列型もありませんが、ミュータブルな断片から効率よく文字列を構成するのに :meth:`str.join` や " +":class:`io.StringIO` が使えます。" + +#: ../../builtins/stdtypes.rst:1780 +msgid "" +"For backwards compatibility with the Python 2 series, the ``u`` prefix is " +"once again permitted on string literals. It has no effect on the meaning of " +"string literals and cannot be combined with the ``r`` prefix." +msgstr "" +"Python 2 シリーズとの後方互換性のため、文字列リテラルの ``u`` " +"接頭辞が改めて許可されました。それは文字列リテラルとしての意味には影響がなく、 ``r`` 接頭辞と結合することはできません。" + +#: ../../builtins/stdtypes.rst:1794 +msgid "" +"Return a :ref:`string ` version of *object*. If *object* is not " +"provided, returns the empty string. Otherwise, the behavior of ``str()`` " +"depends on whether *encoding* or *errors* is given, as follows." +msgstr "" +"*object* の :ref:`文字列 ` 版を返します。 *object* " +"が与えられなかった場合、空文字列が返されます。それ以外の場合 ``str()`` の動作は、 *encoding* や *errors* " +"が与えられたかどうかによって次のように変わります。" + +#: ../../builtins/stdtypes.rst:1798 +msgid "" +"If neither *encoding* nor *errors* is given, ``str(object)`` returns " +":meth:`type(object).__str__(object) `, which is the " +"\"informal\" or nicely printable string representation of *object*. For " +"string objects, this is the string itself. If *object* does not have a " +":meth:`~object.__str__` method, then :func:`str` falls back to returning " +":func:`repr(object) `." +msgstr "" +"*encoding* も *errors* も与えられない場合、 ``str(object)`` は \"形式ばらず\"、 表示用にきれいに整えられた " +"*object* の文字列表現である :meth:`type(object).__str__(object) ` " +"を返します。文字列オブジェクトに対しては、文字列そのものです。 *object* が :meth:`~object.__str__` " +"メソッドを持たない場合、 :func:`str` は代わりに :func:`repr(object) ` の結果を返します。" + +#: ../../builtins/stdtypes.rst:1810 +msgid "" +"If at least one of *encoding* or *errors* is given, *object* should be a " +":term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In " +"this case, if *object* is a :class:`bytes` (or :class:`bytearray`) object, " +"then ``str(bytes, encoding, errors)`` is equivalent to " +":meth:`bytes.decode(encoding, errors) `. Otherwise, the bytes" +" object underlying the buffer object is obtained before calling " +":meth:`bytes.decode`. See :ref:`binaryseq` and :ref:`bufferobjects` for " +"information on buffer objects." +msgstr "" +"*encoding* か *errors* の少なくとも一方が与えられた場合、 *object* は :term:`bytes-like object`" +" (たとえば :class:`bytes` や :class:`bytearray`) でなくてはなりません。*object* が " +":class:`bytes` (もしくは :class:`bytearray`) オブジェクトである場合は、 ``str(bytes, " +"encoding, errors)`` は :meth:`bytes.decode(encoding, errors) ` " +"と等価です。そうでない場合は、 :meth:`bytes.decode` が呼ばれる前に buffer オブジェクトの下層にある bytes " +"オブジェクトが取得されます。 buffer オブジェクトについて詳しい情報は、 :ref:`binaryseq` や " +":ref:`bufferobjects` を参照してください。" + +#: ../../builtins/stdtypes.rst:1819 +msgid "" +"Passing a :class:`bytes` object to :func:`str` without the *encoding* or " +"*errors* arguments falls under the first case of returning the informal " +"string representation (see also the :option:`-b` command-line option to " +"Python). For example::" +msgstr "" +"*encoding* 引数や *errors* 引数無しに :class:`bytes` オブジェクトを :func:`str` " +"に渡すと、略式の文字列表現を返す 1 つ目の場合に該当します。(Python のコマンドラインオプション :option:`-b` も参照してください)" +" 例えば::" + +#: ../../builtins/stdtypes.rst:1824 +msgid "" +">>> str(b'Zoot!')\n" +"\"b'Zoot!'\"" +msgstr "" + +#: ../../builtins/stdtypes.rst:1827 +msgid "" +"For more information on the ``str`` class and its methods, see " +":ref:`textseq` and the :ref:`string-methods` section below. To output " +"formatted strings, see the :ref:`f-strings` and :ref:`formatstrings` " +"sections. In addition, see the :ref:`stringservices` section." +msgstr "" +"``str`` クラスとそのメソッドについて詳しくは、 :ref:`テキストシーケンス型 — str ` や " +":ref:`string-methods` の節を参照してください。フォーマットされた文字列を出力するには、 :ref:`f-strings` と " +":ref:`string-formatting` の節を参照してください。加えて、 :ref:`stringservices` の節も参照してください。" + +#: ../../builtins/stdtypes.rst:1839 +msgid "String Methods" +msgstr "文字列メソッド" + +#: ../../builtins/stdtypes.rst:1844 +msgid "" +"Strings implement all of the :ref:`common ` sequence " +"operations, along with the additional methods described below." +msgstr "文字列は :ref:`共通の ` シーケンス演算全てに加え、以下に述べるメソッドを実装します。" + +#: ../../builtins/stdtypes.rst:1847 +msgid "" +"Strings also support two styles of string formatting, one providing a large " +"degree of flexibility and customization (see :meth:`str.format`, " +":ref:`formatstrings` and :ref:`string-formatting`) and the other based on C " +"``printf`` style formatting that handles a narrower range of types and is " +"slightly harder to use correctly, but is often faster for the cases it can " +"handle (:ref:`old-string-formatting`)." +msgstr "" +"文字列は、二形式の文字列書式化をサポートします。一方は柔軟さが高くカスタマイズできます (:meth:`str.format`、 " +":ref:`formatstrings` 、および :ref:`string-formatting` を参照してください)。他方は C 言語の " +"``printf`` 形式の書式化に基づいてより狭い範囲と型を扱うもので、正しく扱うのは少し難しいですが、扱える場合ではたいていこちらのほうが高速です " +"(:ref:`old-string-formatting`)。" + +#: ../../builtins/stdtypes.rst:1854 +msgid "" +"The :ref:`textservices` section of the standard library covers a number of " +"other modules that provide various text related utilities (including regular" +" expression support in the :mod:`re` module)." +msgstr "" +"標準ライブラリの :ref:`textservices` 節は、その他テキストに関する様々なユーティリティ (:mod:`re` " +"モジュールによる正規表現サポートなど) を提供するいくつかのモジュールをカバーしています。" + +#: ../../builtins/stdtypes.rst:1860 +msgid "" +"Return a copy of the string with its first character capitalized and the " +"rest lowercased." +msgstr "最初の文字を大文字にし、残りを小文字にした文字列のコピーを返します。" + +#: ../../builtins/stdtypes.rst:1863 +msgid "" +"The first character is now put into titlecase rather than uppercase. This " +"means that characters like digraphs will only have their first letter " +"capitalized, instead of the full character." +msgstr "" +"最初の文字が大文字ではなくタイトルケースに置き換えられるようになりました。つまり二重音字のような文字はすべての文字が大文字にされるのではなく、最初の文字だけ大文字にされるようになります。" + +#: ../../builtins/stdtypes.rst:1870 +msgid "" +"Return a casefolded copy of the string. Casefolded strings may be used for " +"caseless matching." +msgstr "文字列の casefold されたコピーを返します。casefold された文字列は、大文字小文字に関係ないマッチに使えます。" + +#: ../../builtins/stdtypes.rst:1873 +msgid "" +"Casefolding is similar to lowercasing but more aggressive because it is " +"intended to remove all case distinctions in a string. For example, the " +"German lowercase letter ``'ß'`` is equivalent to ``\"ss\"``. Since it is " +"already lowercase, :meth:`lower` would do nothing to ``'ß'``; " +":meth:`casefold` converts it to ``\"ss\"``. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:1880 +msgid "" +">>> 'straße'.lower()\n" +"'straße'\n" +">>> 'straße'.casefold()\n" +"'strasse'" +msgstr "" + +#: ../../builtins/stdtypes.rst:1887 +msgid "" +"The casefolding algorithm is `described in section 3.13.3 'Default Case " +"Folding' of the Unicode Standard " +"`__." +msgstr "" + +#: ../../builtins/stdtypes.rst:1896 +msgid "" +"Return centered in a string of length *width*. Padding is done using the " +"specified *fillchar* (default is an ASCII space). The original string is " +"returned if *width* is less than or equal to ``len(s)``. For example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:1900 +msgid "" +">>> 'Python'.center(10)\n" +"' Python '\n" +">>> 'Python'.center(10, '-')\n" +"'--Python--'\n" +">>> 'Python'.center(4)\n" +"'Python'" +msgstr "" + +#: ../../builtins/stdtypes.rst:1910 +msgid "" +"Return the number of non-overlapping occurrences of substring *sub* in the " +"range [*start*, *end*]. Optional arguments *start* and *end* are " +"interpreted as in slice notation." +msgstr "" +"[*start*, *end*] の範囲に、部分文字列 *sub* が重複せず出現する回数を返します。オプション引数 *start* および *end*" +" はスライス表記と同じように解釈されます。" + +#: ../../builtins/stdtypes.rst:1914 +msgid "" +"If *sub* is empty, returns the number of empty strings between characters " +"which is the length of the string plus one. For example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:1917 +msgid "" +">>> 'spam, spam, spam'.count('spam')\n" +"3\n" +">>> 'spam, spam, spam'.count('spam', 5)\n" +"2\n" +">>> 'spam, spam, spam'.count('spam', 5, 10)\n" +"1\n" +">>> 'spam, spam, spam'.count('eggs')\n" +"0\n" +">>> 'spam, spam, spam'.count('')\n" +"17" +msgstr "" + +#: ../../builtins/stdtypes.rst:1930 +msgid "Return the string encoded to :class:`bytes`." +msgstr ":class:`bytes` にエンコードされた文字列を返します。" + +#: ../../builtins/stdtypes.rst:1932 ../../builtins/stdtypes.rst:3682 +msgid "" +"*encoding* defaults to ``'utf-8'``; see :ref:`standard-encodings` for " +"possible values." +msgstr "" +"*encoding* のデフォルト値は ``'utf-8'`` です; 指定可能な値については :ref:`standard-encodings` " +"を参照してください。" + +#: ../../builtins/stdtypes.rst:1935 +msgid "" +"*errors* controls how encoding errors are handled. If ``'strict'`` (the " +"default), a :exc:`UnicodeError` exception is raised. Other possible values " +"are ``'ignore'``, ``'replace'``, ``'xmlcharrefreplace'``, " +"``'backslashreplace'`` and any other name registered via " +":func:`codecs.register_error`. See :ref:`error-handlers` for details." +msgstr "" +"*errors* はエンコーディングエラーをどのように取り扱うかを制御します。 ``'strict'`` (デフォルト) では " +":exc:`UnicodeError` 例外が送出されます。そのほかに指定可能な値は ``'ignore'``, ``'replace'``, " +"``'xmlcharrefreplace'``, ``'backslashreplace'`` と、そして " +":func:`codecs.register_error` で登録された名前です。詳しくは :ref:`error-handlers` " +"を参照してください。" + +#: ../../builtins/stdtypes.rst:1942 +msgid "" +"For performance reasons, the value of *errors* is not checked for validity " +"unless an encoding error actually occurs, :ref:`devmode` is enabled or a " +":ref:`debug build ` is used. For example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:1948 +msgid "" +">>> encoded_str_to_bytes = 'Python'.encode()\n" +">>> type(encoded_str_to_bytes)\n" +"\n" +">>> encoded_str_to_bytes\n" +"b'Python'" +msgstr "" + +#: ../../builtins/stdtypes.rst:1955 ../../builtins/stdtypes.rst:3701 +msgid "Added support for keyword arguments." +msgstr "キーワード引数のサポートが追加されました。" + +#: ../../builtins/stdtypes.rst:1958 ../../builtins/stdtypes.rst:3704 +msgid "" +"The value of the *errors* argument is now checked in :ref:`devmode` and in " +":ref:`debug mode `." +msgstr "" +"*errors* 引数の値は :ref:`devmode` と :ref:`デバッグモード ` " +"でチェックされるようになりました。" + +#: ../../builtins/stdtypes.rst:1965 +msgid "" +"Return ``True`` if the string ends with the specified *suffix*, otherwise " +"return ``False``. *suffix* can also be a tuple of suffixes to look for. " +"With optional *start*, test beginning at that position. With optional " +"*end*, stop comparing at that position. Using *start* and *end* is " +"equivalent to ``str[start:end].endswith(suffix)``. For example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:1971 +msgid "" +">>> 'Python'.endswith('on')\n" +"True\n" +">>> 'a tuple of suffixes'.endswith(('at', 'in'))\n" +"False\n" +">>> 'a tuple of suffixes'.endswith(('at', 'es'))\n" +"True\n" +">>> 'Python is amazing'.endswith('is', 0, 9)\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:1980 +msgid "See also :meth:`startswith` and :meth:`removesuffix`." +msgstr "" + +#: ../../builtins/stdtypes.rst:1985 +msgid "" +"Return a copy of the string where all tab characters are replaced by one or " +"more spaces, depending on the current column and the given tab size. Tab " +"positions occur every *tabsize* characters (default is 8, giving tab " +"positions at columns 0, 8, 16 and so on). To expand the string, the current" +" column is set to zero and the string is examined character by character. " +"If the character is a tab (``\\t``), one or more space characters are " +"inserted in the result until the current column is equal to the next tab " +"position. (The tab character itself is not copied.) If the character is a " +"newline (``\\n``) or return (``\\r``), it is copied and the current column " +"is reset to zero. Any other character is copied unchanged and the current " +"column is incremented by one regardless of how the character is represented " +"when printed. For example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:1998 +msgid "" +">>> '01\\t012\\t0123\\t01234'.expandtabs()\n" +"'01 012 0123 01234'\n" +">>> '01\\t012\\t0123\\t01234'.expandtabs(4)\n" +"'01 012 0123 01234'\n" +">>> print('01\\t012\\n0123\\t01234'.expandtabs(4))\n" +"01 012\n" +"0123 01234" +msgstr "" + +#: ../../builtins/stdtypes.rst:2009 +msgid "" +"Return the lowest index in the string where substring *sub* is found within " +"the slice ``s[start:end]``. Optional arguments *start* and *end* are " +"interpreted as in slice notation. Return ``-1`` if *sub* is not found. For " +"example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:2014 +msgid "" +">>> 'spam, spam, spam'.find('sp')\n" +"0\n" +">>> 'spam, spam, spam'.find('sp', 5)\n" +"6" +msgstr "" + +#: ../../builtins/stdtypes.rst:2019 +msgid "See also :meth:`rfind` and :meth:`index`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2023 +msgid "" +"The :meth:`~str.find` method should be used only if you need to know the " +"position of *sub*. To check if *sub* is a substring or not, use the " +":keyword:`in` operator::" +msgstr "" +":meth:`~str.find` メソッドは、 *sub* の位置を知りたいときにのみ使うべきです。 *sub* " +"が部分文字列であるかどうかのみを調べるには、 :keyword:`in` 演算子を使ってください::" + +#: ../../builtins/stdtypes.rst:2027 +msgid "" +">>> 'Py' in 'Python'\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:2033 +msgid "" +"Perform a string formatting operation. The string on which this method is " +"called can contain literal text or replacement fields delimited by braces " +"``{}``. Each replacement field contains either the numeric index of a " +"positional argument, or the name of a keyword argument. Returns a copy of " +"the string where each replacement field is replaced with the string value of" +" the corresponding argument. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2040 +msgid "" +">>> \"The sum of 1 + 2 is {0}\".format(1+2)\n" +"'The sum of 1 + 2 is 3'\n" +">>> \"The sum of {a} + {b} is {answer}\".format(answer=1+2, a=1, b=2)\n" +"'The sum of 1 + 2 is 3'\n" +">>> \"{1} expects the {0} Inquisition!\".format(\"Spanish\", \"Nobody\")\n" +"'Nobody expects the Spanish Inquisition!'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2049 +msgid "" +"See :ref:`formatstrings` for a description of the various formatting options" +" that can be specified in format strings." +msgstr "書式指定のオプションについては、書式指定文字列を規定する :ref:`formatstrings` を参照してください。" + +#: ../../builtins/stdtypes.rst:2053 +msgid "" +"When formatting a number (:class:`int`, :class:`float`, :class:`complex`, " +":class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: " +"``'{:n}'.format(1234)``), the function temporarily sets the ``LC_CTYPE`` " +"locale to the ``LC_NUMERIC`` locale to decode ``decimal_point`` and " +"``thousands_sep`` fields of :c:func:`localeconv` if they are non-ASCII or " +"longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the " +"``LC_CTYPE`` locale. This temporary change affects other threads." +msgstr "" +"数値 (:class:`int`, :class:`float`, :class:`complex`, :class:`decimal.Decimal`" +" とサブクラス) を ``n`` の整数表現型 (例: ``'{:n}'.format(1234)``) " +"でフォーマットするとき、``LC_CTYPE`` ロケールと ``LC_NUMERIC`` ロケールの一方または両方が 1 バイトより長い非 ASCII" +" 文字であると同時に異なる値である場合、この関数は :c:func:`localeconv` の ``decimal_point`` と " +"``thousands_sep`` フィールドを読み取るため一時的に ``LC_CTYPE`` ロケールに ``LC_NUMERIC`` " +"のロケール値を設定します。この一時的な変更は他のスレッドの動作に影響します。" + +#: ../../builtins/stdtypes.rst:2062 +msgid "" +"When formatting a number with the ``n`` type, the function sets temporarily " +"the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in some cases." +msgstr "" +"数値を ``n`` の整数表現型でフォーマットするとき、この関数は一時的に ``LC_CTYPE`` ロケールに ``LC_NUMERIC`` " +"のロケール値を設定する場合があります。" + +#: ../../builtins/stdtypes.rst:2070 +msgid "" +"Similar to ``str.format(**mapping)``, except that ``mapping`` is used " +"directly and not copied to a :class:`dict`. This is useful if for example " +"``mapping`` is a dict subclass:" +msgstr "" +"``str.format(**mapping)`` と似ていますが、 ``mapping`` は :class:`dict` " +"にコピーされず、直接使われます。これは例えば ``mapping`` が dict のサブクラスであるときに便利です:" + +#: ../../builtins/stdtypes.rst:2086 +msgid "" +"Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is " +"not found. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2089 +msgid "" +">>> 'spam, spam, spam'.index('spam')\n" +"0\n" +">>> 'spam, spam, spam'.index('eggs')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" 'spam, spam, spam'.index('eggs')\n" +" ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n" +"ValueError: substring not found" +msgstr "" + +#: ../../builtins/stdtypes.rst:2100 +msgid "See also :meth:`rindex`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2105 +msgid "" +"Return ``True`` if all characters in the string are alphanumeric and there " +"is at least one character, ``False`` otherwise. A character ``c`` is " +"alphanumeric if one of the following returns ``True``: ``c.isalpha()``, " +"``c.isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2110 +msgid "" +">>> 'abc123'.isalnum()\n" +"True\n" +">>> 'abc123!@#'.isalnum()\n" +"False\n" +">>> ''.isalnum()\n" +"False\n" +">>> ' '.isalnum()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:2124 +msgid "" +"Return ``True`` if all characters in the string are alphabetic and there is " +"at least one character, ``False`` otherwise. Alphabetic characters are " +"those characters defined in the Unicode character database as \"Letter\", " +"i.e., those with general category property being one of \"Lm\", \"Lt\", " +"\"Lu\", \"Ll\", or \"Lo\". Note that this is different from the `Alphabetic" +" property defined in section 4.10 'Letters, Alphabetic, and Ideographic' of " +"the Unicode Standard `__. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2133 +msgid "" +">>> 'Letters and spaces'.isalpha()\n" +"False\n" +">>> 'LettersOnly'.isalpha()\n" +"True\n" +">>> 'µ'.isalpha() # non-ASCII characters can be considered alphabetical too\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:2142 +msgid "See :ref:`unicode-properties`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2147 +msgid "" +"Return ``True`` if the string is empty or all characters in the string are " +"ASCII, ``False`` otherwise. ASCII characters have code points in the range " +"U+0000-U+007F. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2151 +msgid "" +">>> 'ASCII characters'.isascii()\n" +"True\n" +">>> 'µ'.isascii()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:2163 +msgid "" +"Return ``True`` if all characters in the string are decimal characters and " +"there is at least one character, ``False`` otherwise. Decimal characters are" +" those that can be used to form numbers in base 10, such as U+0660, ARABIC-" +"INDIC DIGIT ZERO. Formally a decimal character is a character in the " +"Unicode General Category \"Nd\". For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2170 +msgid "" +">>> '0123456789'.isdecimal()\n" +"True\n" +">>> '٠١٢٣٤٥٦٧٨٩'.isdecimal() # Arabic-Indic digits zero to nine\n" +"True\n" +">>> 'alphabetic'.isdecimal()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:2182 +msgid "" +"Return ``True`` if all characters in the string are digits and there is at " +"least one character, ``False`` otherwise. Digits include decimal characters" +" and digits that need special handling, such as the compatibility " +"superscript digits. This covers digits which cannot be used to form numbers " +"in base 10, like the `Kharosthi numbers " +"`__. Formally, a digit is " +"a character that has the property value Numeric_Type=Digit or " +"Numeric_Type=Decimal." +msgstr "" + +#: ../../builtins/stdtypes.rst:2190 ../../builtins/stdtypes.rst:2271 +#: ../../builtins/stdtypes.rst:2288 ../../builtins/stdtypes.rst:2315 +#: ../../builtins/stdtypes.rst:2370 ../../builtins/stdtypes.rst:2447 +#: ../../builtins/stdtypes.rst:2558 ../../builtins/stdtypes.rst:2579 +#: ../../builtins/stdtypes.rst:2644 ../../builtins/stdtypes.rst:2665 +#: ../../builtins/stdtypes.rst:2679 ../../builtins/stdtypes.rst:2766 +#: ../../builtins/stdtypes.rst:2790 ../../builtins/stdtypes.rst:2804 +#: ../../builtins/stdtypes.rst:2919 +msgid "For example:" +msgstr "例えば:" + +#: ../../builtins/stdtypes.rst:2192 +msgid "" +">>> '0123456789'.isdigit()\n" +"True\n" +">>> '٠١٢٣٤٥٦٧٨٩'.isdigit() # Arabic-Indic digits zero to nine\n" +"True\n" +">>> '⅕'.isdigit() # Vulgar fraction one fifth\n" +"False\n" +">>> '²'.isdecimal(), '²'.isdigit(), '²'.isnumeric()\n" +"(False, True, True)" +msgstr "" + +#: ../../builtins/stdtypes.rst:2203 +msgid "See also :meth:`isdecimal` and :meth:`isnumeric`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2208 +msgid "" +"Return ``True`` if the string is a valid identifier according to the " +"language definition, section :ref:`identifiers`." +msgstr "文字列が、 :ref:`identifiers` 節の言語定義における有効な識別子であれば ``True`` を返します。" + +#: ../../builtins/stdtypes.rst:2211 +msgid "" +":func:`keyword.iskeyword` can be used to test whether string ``s`` is a " +"reserved identifier, such as :keyword:`def` and :keyword:`class`." +msgstr "" +":func:`keyword.iskeyword` は、文字列 ``s`` が :keyword:`def` や :keyword:`class` " +"のような予約済みの識別子かどうかを調べるのに使うことができます。" + +#: ../../builtins/stdtypes.rst:2214 +msgid "Example: ::" +msgstr "例: ::" + +#: ../../builtins/stdtypes.rst:2217 +msgid "" +">>> from keyword import iskeyword\n" +"\n" +">>> 'hello'.isidentifier(), iskeyword('hello')\n" +"(True, False)\n" +">>> 'def'.isidentifier(), iskeyword('def')\n" +"(True, True)" +msgstr "" + +#: ../../builtins/stdtypes.rst:2227 +msgid "" +"Return ``True`` if all cased characters [4]_ in the string are lowercase and" +" there is at least one cased character, ``False`` otherwise." +msgstr "" +"文字列中の大小文字の区別のある文字 [4]_ 全てが小文字で、かつ大小文字の区別のある文字が 1 文字以上あるなら ``True`` を、そうでなければ" +" ``False`` を返します。" + +#: ../../builtins/stdtypes.rst:2233 +msgid "" +"Return ``True`` if all characters in the string are numeric characters, and " +"there is at least one character, ``False`` otherwise. Numeric characters " +"include digit characters, and all characters that have the Unicode numeric " +"value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric " +"characters are those with the property value Numeric_Type=Digit, " +"Numeric_Type=Decimal or Numeric_Type=Numeric. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2241 +msgid "" +">>> '0123456789'.isnumeric()\n" +"True\n" +">>> '٠١٢٣٤٥٦٧٨٩'.isnumeric() # Arabic-Indic digits zero to nine\n" +"True\n" +">>> '⅕'.isnumeric() # Vulgar fraction one fifth\n" +"True\n" +">>> '²'.isdecimal(), '²'.isdigit(), '²'.isnumeric()\n" +"(False, True, True)" +msgstr "" + +#: ../../builtins/stdtypes.rst:2252 +msgid "See also :meth:`isdecimal` and :meth:`isdigit`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2257 +msgid "" +"Return ``True`` if all characters in the string are printable, ``False`` if " +"it contains at least one non-printable character." +msgstr "" + +#: ../../builtins/stdtypes.rst:2260 +msgid "" +"Here \"printable\" means the character is suitable for :func:`repr` to use " +"in its output; \"non-printable\" means that :func:`repr` on built-in types " +"will hex-escape the character. It has no bearing on the handling of strings" +" written to :data:`sys.stdout` or :data:`sys.stderr`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2265 +msgid "" +"The printable characters are those which in the Unicode character database " +"(see :mod:`unicodedata`) have a general category in group Letter, Mark, " +"Number, Punctuation, or Symbol (L, M, N, P, or S); plus the ASCII space " +"0x20. Nonprintable characters are those in group Separator or Other (Z or " +"C), except the ASCII space." +msgstr "" + +#: ../../builtins/stdtypes.rst:2273 +msgid "" +">>> ''.isprintable(), ' '.isprintable()\n" +"(True, True)\n" +">>> '\\t'.isprintable(), '\\n'.isprintable()\n" +"(False, False)" +msgstr "" + +#: ../../builtins/stdtypes.rst:2280 +msgid "See also :meth:`isspace`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2285 +msgid "" +"Return ``True`` if there are only whitespace characters in the string and " +"there is at least one character, ``False`` otherwise." +msgstr "文字列が空白文字だけからなり、かつ 1 文字以上ある場合には ``True`` を返し、そうでない場合は ``False`` を返します。" + +#: ../../builtins/stdtypes.rst:2290 +msgid "" +">>> ''.isspace()\n" +"False\n" +">>> ' '.isspace()\n" +"True\n" +">>> '\\t\\n'.isspace() # TAB and BREAK LINE\n" +"True\n" +">>> '\\u3000'.isspace() # IDEOGRAPHIC SPACE\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:2301 +msgid "" +"A character is *whitespace* if in the Unicode character database (see " +":mod:`unicodedata`), either its general category is ``Zs`` (\"Separator, " +"space\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``." +msgstr "" +"Unicode 文字データベース (:mod:`unicodedata` を参照) で一般カテゴリが ``Zs`` (\"Seperator, " +"space\") であるか、 双方向クラスが ``WS``、``B``、 ``S`` のいずれかである場合、その文字は " +"*空白文字(whitespace)* です。 " + +#: ../../builtins/stdtypes.rst:2306 +msgid "See also :meth:`isprintable`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2311 +msgid "" +"Return ``True`` if the string is a titlecased string and there is at least " +"one character, for example uppercase characters may only follow uncased " +"characters and lowercase characters only cased ones. Return ``False`` " +"otherwise." +msgstr "" +"文字列がタイトルケース文字列であり、かつ 1 " +"文字以上ある場合、例えば大文字は大小文字の区別のない文字の後にのみ続き、小文字は大小文字の区別のある文字の後ろにのみ続く場合には ``True`` " +"を返します。そうでない場合は ``False`` を返します。" + +#: ../../builtins/stdtypes.rst:2317 +msgid "" +">>> 'Spam, Spam, Spam'.istitle()\n" +"True\n" +">>> 'spam, spam, spam'.istitle()\n" +"False\n" +">>> 'SPAM, SPAM, SPAM'.istitle()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:2326 +msgid "See also :meth:`title`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2331 +msgid "" +"Return ``True`` if all cased characters [4]_ in the string are uppercase and" +" there is at least one cased character, ``False`` otherwise." +msgstr "" +"文字列中の大小文字の区別のある文字 [4]_ 全てが大文字で、かつ大小文字の区別のある文字が 1 文字以上あるなら ``True`` を、そうでなければ" +" ``False`` を返します。" + +#: ../../builtins/stdtypes.rst:2349 +msgid "" +"Return a string which is the concatenation of the strings in *iterable*. A " +":exc:`TypeError` will be raised if there are any non-string values in " +"*iterable*, including :class:`bytes` objects. The separator between " +"elements is the string providing this method. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2354 +msgid "" +">>> ', '.join(['spam', 'spam', 'spam'])\n" +"'spam, spam, spam'\n" +">>> '-'.join('Python')\n" +"'P-y-t-h-o-n'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2361 +msgid "See also :meth:`split`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2366 +msgid "" +"Return the string left justified in a string of length *width*. Padding is " +"done using the specified *fillchar* (default is an ASCII space). The " +"original string is returned if *width* is less than or equal to ``len(s)``." +msgstr "" +"長さ *width* の左揃えした文字列を返します。パディングは指定された *fillchar* (デフォルトでは ASCII スペース) " +"を使って行われます。 *width* が ``len(s)`` 以下ならば、元の文字列が返されます。" + +#: ../../builtins/stdtypes.rst:2372 +msgid "" +">>> 'Python'.ljust(10)\n" +"'Python '\n" +">>> 'Python'.ljust(10, '.')\n" +"'Python....'\n" +">>> 'Monty Python'.ljust(10, '.')\n" +"'Monty Python'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2381 ../../builtins/stdtypes.rst:2928 +msgid "See also :meth:`rjust`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2386 +msgid "" +"Return a copy of the string with all the cased characters [4]_ converted to " +"lowercase. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2389 +msgid "" +">>> 'Lower Method Example'.lower()\n" +"'lower method example'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2394 +msgid "" +"The lowercasing algorithm used is `described in section 3.13.2 'Default Case" +" Conversion' of the Unicode Standard " +"`__." +msgstr "" + +#: ../../builtins/stdtypes.rst:2401 +msgid "" +"Return a copy of the string with leading characters removed. The *chars* " +"argument is a string specifying the set of characters to be removed. If " +"omitted or ``None``, the *chars* argument defaults to removing whitespace. " +"The *chars* argument is not a prefix; rather, all combinations of its values" +" are stripped::" +msgstr "" +"文字列の先頭の文字を除去したコピーを返します。引数 *chars* は除去される文字の集合を指定する文字列です。 *chars* が省略されるか " +"``None`` の場合、空白文字が除去されます。 *chars* 文字列は接頭辞ではなく、その値に含まれる文字の組み合わせ全てがはぎ取られます::" + +#: ../../builtins/stdtypes.rst:2406 +msgid "" +">>> ' spacious '.lstrip()\n" +"'spacious '\n" +">>> 'www.example.com'.lstrip('cmowz.')\n" +"'example.com'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2411 +msgid "" +"See :meth:`str.removeprefix` for a method that will remove a single prefix " +"string rather than all of a set of characters. For example::" +msgstr "" +"文字の集合全てではなく、指定した文字列そのものを接頭辞として削除するメソッドについては、 :meth:`str.removeprefix` " +"を参照してください。使用例::" + +#: ../../builtins/stdtypes.rst:2414 +msgid "" +">>> 'Arthur: three!'.lstrip('Arthur: ')\n" +"'ee!'\n" +">>> 'Arthur: three!'.removeprefix('Arthur: ')\n" +"'three!'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2423 +msgid "" +"This static method returns a translation table usable for " +":meth:`str.translate`." +msgstr "この静的メソッドは :meth:`str.translate` に使える変換テーブルを返します。" + +#: ../../builtins/stdtypes.rst:2425 +msgid "" +"If there is only one argument, it must be a dictionary mapping Unicode " +"ordinals (integers) or characters (strings of length 1) to Unicode ordinals," +" strings (of arbitrary lengths) or ``None``. Character keys will then be " +"converted to ordinals." +msgstr "" +"引数を 1 つだけ与える場合、それは Unicode 序数 (整数) または文字 (長さ 1 の文字列) を、Unicode 序数、(任意長の) " +"文字列、または ``None`` に対応づける辞書でなければなりません。このとき、文字で指定したキーは序数に変換されます。" + +#: ../../builtins/stdtypes.rst:2430 +msgid "" +"If there are two arguments, they must be strings of equal length, and in the" +" resulting dictionary, each character in *from* will be mapped to the " +"character at the same position in *to*. If there is a third argument, it " +"must be a string, whose characters will be mapped to ``None`` in the result." +msgstr "" + +#: ../../builtins/stdtypes.rst:2437 +msgid "*dict* can now be a :class:`frozendict`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2442 +msgid "" +"Split the string at the first occurrence of *sep*, and return a 3-tuple " +"containing the part before the separator, the separator itself, and the part" +" after the separator. If the separator is not found, return a 3-tuple " +"containing the string itself, followed by two empty strings." +msgstr "" +"文字列を *sep* の最初の出現位置で区切り、 3 " +"要素のタプルを返します。タプルの内容は、区切りの前の部分、区切り文字列そのもの、そして区切りの後ろの部分です。もし区切れなければ、タプルには元の文字列そのものとその後ろに二つの空文字列が入ります。" + +#: ../../builtins/stdtypes.rst:2449 +msgid "" +">>> 'Monty Python'.partition(' ')\n" +"('Monty', ' ', 'Python')\n" +">>> \"Monty Python's Flying Circus\".partition(' ')\n" +"('Monty', ' ', \"Python's Flying Circus\")\n" +">>> 'Monty Python'.partition('-')\n" +"('Monty Python', '', '')" +msgstr "" + +#: ../../builtins/stdtypes.rst:2458 +msgid "See also :meth:`rpartition`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2463 +msgid "" +"If the string starts with the *prefix* string, return " +"``string[len(prefix):]``. Otherwise, return a copy of the original string:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2467 +msgid "" +">>> 'TestHook'.removeprefix('Test')\n" +"'Hook'\n" +">>> 'BaseTestCase'.removeprefix('Test')\n" +"'BaseTestCase'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2476 +msgid "See also :meth:`removesuffix` and :meth:`startswith`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2481 +msgid "" +"If the string ends with the *suffix* string and that *suffix* is not empty, " +"return ``string[:-len(suffix)]``. Otherwise, return a copy of the original " +"string:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2485 +msgid "" +">>> 'MiscTests'.removesuffix('Tests')\n" +"'Misc'\n" +">>> 'TmpDirMixin'.removesuffix('Tests')\n" +"'TmpDirMixin'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2494 +msgid "See also :meth:`removeprefix` and :meth:`endswith`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2499 +msgid "" +"Return a copy of the string with all occurrences of substring *old* replaced" +" by *new*. If *count* is given, only the first *count* occurrences are " +"replaced. If *count* is not specified or ``-1``, then all occurrences are " +"replaced. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2504 +msgid "" +">>> 'spam, spam, spam'.replace('spam', 'eggs')\n" +"'eggs, eggs, eggs'\n" +">>> 'spam, spam, spam'.replace('spam', 'eggs', 1)\n" +"'eggs, spam, spam'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2511 ../../builtins/stdtypes.rst:3808 +msgid "*count* is now supported as a keyword argument." +msgstr "*count* はキーワード引数として指定可能になりました。" + +#: ../../builtins/stdtypes.rst:2517 +msgid "" +"Return the highest index in the string where substring *sub* is found, such " +"that *sub* is contained within ``s[start:end]``. Optional arguments *start*" +" and *end* are interpreted as in slice notation. Return ``-1`` on failure. " +"For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2522 +msgid "" +">>> 'spam, spam, spam'.rfind('sp')\n" +"12\n" +">>> 'spam, spam, spam'.rfind('sp', 0, 10)\n" +"6" +msgstr "" + +#: ../../builtins/stdtypes.rst:2529 +msgid "See also :meth:`find` and :meth:`rindex`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2534 +msgid "" +"Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " +"not found. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2538 +msgid "" +">>> 'spam, spam, spam'.rindex('spam')\n" +"12\n" +">>> 'spam, spam, spam'.rindex('eggs')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" 'spam, spam, spam'.rindex('eggs')\n" +" ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n" +"ValueError: substring not found" +msgstr "" + +#: ../../builtins/stdtypes.rst:2549 +msgid "See also :meth:`index` and :meth:`find`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2554 +msgid "" +"Return the string right justified in a string of length *width*. Padding is " +"done using the specified *fillchar* (default is an ASCII space). The " +"original string is returned if *width* is less than or equal to ``len(s)``." +msgstr "" +"*width* の長さをもつ右寄せした文字列を返します。パディングには *fillchar* で指定された文字(デフォルトでは ASCII " +"スペース)が使われます。 *width* が ``len(s)`` 以下の場合、元の文字列が返されます。" + +#: ../../builtins/stdtypes.rst:2560 +msgid "" +">>> 'Python'.rjust(10)\n" +"' Python'\n" +">>> 'Python'.rjust(10, '.')\n" +"'....Python'\n" +">>> 'Monty Python'.rjust(10, '.')\n" +"'Monty Python'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2569 +msgid "See also :meth:`ljust` and :meth:`zfill`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2574 +msgid "" +"Split the string at the last occurrence of *sep*, and return a 3-tuple " +"containing the part before the separator, the separator itself, and the part" +" after the separator. If the separator is not found, return a 3-tuple " +"containing two empty strings, followed by the string itself." +msgstr "" +"文字列を *sep* の最後の出現位置で区切り、 3 " +"要素のタプルを返します。タプルの内容は、区切りの前の部分、区切り文字列そのもの、そして区切りの後ろの部分です。もし区切れなければ、タプルには二つの空文字列とその後ろに元の文字列そのものが入ります。" + +#: ../../builtins/stdtypes.rst:2581 +msgid "" +">>> 'Monty Python'.rpartition(' ')\n" +"('Monty', ' ', 'Python')\n" +">>> \"Monty Python's Flying Circus\".rpartition(' ')\n" +"(\"Monty Python's Flying\", ' ', 'Circus')\n" +">>> 'Monty Python'.rpartition('-')\n" +"('', '', 'Monty Python')" +msgstr "" + +#: ../../builtins/stdtypes.rst:2590 +msgid "See also :meth:`partition`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2595 +msgid "" +"Return a list of the words in the string, using *sep* as the delimiter " +"string. If *maxsplit* is given, at most *maxsplit* splits are done, the " +"*rightmost* ones. If *sep* is not specified or ``None``, any " +":meth:`whitespace ` string is a separator. Except for " +"splitting from the right, :meth:`rsplit` behaves like :meth:`split` which is" +" described in detail below." +msgstr "" + +#: ../../builtins/stdtypes.rst:2605 +msgid "" +"Return a copy of the string with trailing characters removed. The *chars* " +"argument is a string specifying the set of characters to be removed. If " +"omitted or ``None``, the *chars* argument defaults to removing whitespace. " +"The *chars* argument is not a suffix; rather, all combinations of its values" +" are stripped. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2611 +msgid "" +">>> ' spacious '.rstrip()\n" +"' spacious'\n" +">>> 'mississippi'.rstrip('ipz')\n" +"'mississ'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2618 +msgid "" +"See :meth:`removesuffix` for a method that will remove a single suffix " +"string rather than all of a set of characters. For example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:2621 +msgid "" +">>> 'Monty Python'.rstrip(' Python')\n" +"'M'\n" +">>> 'Monty Python'.removesuffix(' Python')\n" +"'Monty'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2626 +msgid "See also :meth:`strip`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2631 +msgid "" +"Return a list of the words in the string, using *sep* as the delimiter " +"string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, " +"the list will have at most ``maxsplit+1`` elements). If *maxsplit* is not " +"specified or ``-1``, then there is no limit on the number of splits (all " +"possible splits are made)." +msgstr "" +"文字列を *sep* をデリミタ文字列として区切った単語のリストを返します。*maxsplit* が与えられていれば、最大で *maxsplit* " +"回分割されます (つまり、リストは最大 ``maxsplit+1`` 要素になります)。 *maxsplit* が与えられないか ``-1`` " +"なら、分割の回数に制限はありません (可能なだけ分割されます)。" + +#: ../../builtins/stdtypes.rst:2637 +msgid "" +"If *sep* is given, consecutive delimiters are not grouped together and are " +"deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " +"``['1', '', '2']``). The *sep* argument may consist of multiple characters " +"as a single delimiter (to split with multiple delimiters, use " +":func:`re.split`). Splitting an empty string with a specified separator " +"returns ``['']``." +msgstr "" +"*sep* が与えられた場合、連続した区切り文字はまとめられず、空の文字列を区切っていると判断されます(例えば " +"``'1,,2'.split(',')`` は ``['1', '', '2']`` を返します)。引数 *sep* " +"は複数の文字を1つの区切り文字にもできます (複数の区切り文字で分割するには :func:`re.split` " +"を使用します)。区切り文字を指定して空の文字列を分割すると、 ``['']`` を返します。" + +#: ../../builtins/stdtypes.rst:2646 +msgid "" +">>> '1,2,3'.split(',')\n" +"['1', '2', '3']\n" +">>> '1,2,3'.split(',', maxsplit=1)\n" +"['1', '2,3']\n" +">>> '1,2,,3,'.split(',')\n" +"['1', '2', '', '3', '']\n" +">>> '1<>2<>3<4'.split('<>')\n" +"['1', '2', '3<4']" +msgstr "" + +#: ../../builtins/stdtypes.rst:2657 +msgid "" +"If *sep* is not specified or is ``None``, a different splitting algorithm is" +" applied: runs of consecutive :meth:`whitespace ` are regarded " +"as a single separator, and the result will contain no empty strings at the " +"start or end if the string has leading or trailing whitespace. " +"Consequently, splitting an empty string or a string consisting of just " +"whitespace with a ``None`` separator returns ``[]``." +msgstr "" + +#: ../../builtins/stdtypes.rst:2667 +msgid "" +">>> '1 2 3'.split()\n" +"['1', '2', '3']\n" +">>> '1 2 3'.split(maxsplit=1)\n" +"['1', '2 3']\n" +">>> ' 1 2 3 '.split()\n" +"['1', '2', '3']" +msgstr "" + +#: ../../builtins/stdtypes.rst:2676 +msgid "" +"If *sep* is not specified or is ``None`` and *maxsplit* is ``0``, only " +"leading runs of consecutive whitespace are considered." +msgstr "" + +#: ../../builtins/stdtypes.rst:2681 +msgid "" +">>> \"\".split(None, 0)\n" +"[]\n" +">>> \" \".split(None, 0)\n" +"[]\n" +">>> \" foo \".split(maxsplit=0)\n" +"['foo ']" +msgstr "" + +#: ../../builtins/stdtypes.rst:2690 +msgid "See also :meth:`join` and :meth:`rsplit`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2698 +msgid "" +"Return a list of the lines in the string, breaking at line boundaries. Line" +" breaks are not included in the resulting list unless *keepends* is given " +"and true." +msgstr "文字列を改行部分で分解し、各行からなるリストを返します。 *keepends* に真が与えらない限り、返されるリストに改行は含まれません。" + +#: ../../builtins/stdtypes.rst:2702 +msgid "" +"This method splits on the following line boundaries. In particular, the " +"boundaries are a superset of :term:`universal newlines`." +msgstr "このメソッドは以下の行境界で分解します。特に、以下の境界は :term:`universal newlines` のスーパーセットです。" + +#: ../../builtins/stdtypes.rst:2706 +msgid "Representation" +msgstr "表現" + +#: ../../builtins/stdtypes.rst:2706 +msgid "Description" +msgstr "説明" + +#: ../../builtins/stdtypes.rst:2708 +msgid "``\\n``" +msgstr "``\\n``" + +#: ../../builtins/stdtypes.rst:2708 +msgid "Line Feed" +msgstr "改行" + +#: ../../builtins/stdtypes.rst:2710 +msgid "``\\r``" +msgstr "``\\r``" + +#: ../../builtins/stdtypes.rst:2710 +msgid "Carriage Return" +msgstr "復帰" + +#: ../../builtins/stdtypes.rst:2712 +msgid "``\\r\\n``" +msgstr "``\\r\\n``" + +#: ../../builtins/stdtypes.rst:2712 +msgid "Carriage Return + Line Feed" +msgstr "改行 + 復帰" + +#: ../../builtins/stdtypes.rst:2714 +msgid "``\\v`` or ``\\x0b``" +msgstr "``\\v`` or ``\\x0b``" + +#: ../../builtins/stdtypes.rst:2714 +msgid "Line Tabulation" +msgstr "垂直タブ" + +#: ../../builtins/stdtypes.rst:2716 +msgid "``\\f`` or ``\\x0c``" +msgstr "``\\f`` or ``\\x0c``" + +#: ../../builtins/stdtypes.rst:2716 +msgid "Form Feed" +msgstr "改ページ" + +#: ../../builtins/stdtypes.rst:2718 +msgid "``\\x1c``" +msgstr "``\\x1c``" + +#: ../../builtins/stdtypes.rst:2718 +msgid "File Separator" +msgstr "ファイル区切り" + +#: ../../builtins/stdtypes.rst:2720 +msgid "``\\x1d``" +msgstr "``\\x1d``" + +#: ../../builtins/stdtypes.rst:2720 +msgid "Group Separator" +msgstr "グループ区切り" + +#: ../../builtins/stdtypes.rst:2722 +msgid "``\\x1e``" +msgstr "``\\x1e``" + +#: ../../builtins/stdtypes.rst:2722 +msgid "Record Separator" +msgstr "レコード区切り" + +#: ../../builtins/stdtypes.rst:2724 +msgid "``\\x85``" +msgstr "``\\x85``" + +#: ../../builtins/stdtypes.rst:2724 +msgid "Next Line (C1 Control Code)" +msgstr "改行 (C1 制御コード)" + +#: ../../builtins/stdtypes.rst:2726 +msgid "``\\u2028``" +msgstr "``\\u2028``" + +#: ../../builtins/stdtypes.rst:2726 +msgid "Line Separator" +msgstr "行区切り" + +#: ../../builtins/stdtypes.rst:2728 +msgid "``\\u2029``" +msgstr "``\\u2029``" + +#: ../../builtins/stdtypes.rst:2728 +msgid "Paragraph Separator" +msgstr "段落区切り" + +#: ../../builtins/stdtypes.rst:2733 +msgid "``\\v`` and ``\\f`` added to list of line boundaries." +msgstr "``\\v`` と ``\\f`` が行境界のリストに追加されました。" + +#: ../../builtins/stdtypes.rst:2735 ../../builtins/stdtypes.rst:2841 +#: ../../builtins/stdtypes.rst:3018 ../../builtins/stdtypes.rst:4024 +#: ../../builtins/stdtypes.rst:4043 ../../builtins/stdtypes.rst:4134 +#: ../../builtins/stdtypes.rst:4150 ../../builtins/stdtypes.rst:4175 +#: ../../builtins/stdtypes.rst:4189 ../../builtins/stdtypes.rst:4217 +#: ../../builtins/stdtypes.rst:4231 ../../builtins/stdtypes.rst:4249 +#: ../../builtins/stdtypes.rst:4276 ../../builtins/stdtypes.rst:4299 +#: ../../builtins/stdtypes.rst:4326 ../../builtins/stdtypes.rst:4368 +#: ../../builtins/stdtypes.rst:4392 +msgid "For example::" +msgstr "例えば::" + +#: ../../builtins/stdtypes.rst:2737 +msgid "" +">>> 'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines()\n" +"['ab c', '', 'de fg', 'kl']\n" +">>> 'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines(keepends=True)\n" +"['ab c\\n', '\\n', 'de fg\\r', 'kl\\r\\n']" +msgstr "" + +#: ../../builtins/stdtypes.rst:2742 +msgid "" +"Unlike :meth:`~str.split` when a delimiter string *sep* is given, this " +"method returns an empty list for the empty string, and a terminal line break" +" does not result in an extra line::" +msgstr "" +":meth:`~str.split` とは違って、デリミタ文字列 *sep* " +"が与えられたとき、このメソッドは空文字列に空リストを返し、終末の改行は結果に行を追加しません::" + +#: ../../builtins/stdtypes.rst:2746 +msgid "" +">>> \"\".splitlines()\n" +"[]\n" +">>> \"One line\\n\".splitlines()\n" +"['One line']" +msgstr "" + +#: ../../builtins/stdtypes.rst:2751 +msgid "For comparison, ``split('\\n')`` gives::" +msgstr "比較のために ``split('\\n')`` は以下のようになります::" + +#: ../../builtins/stdtypes.rst:2753 +msgid "" +">>> ''.split('\\n')\n" +"['']\n" +">>> 'Two lines\\n'.split('\\n')\n" +"['Two lines', '']" +msgstr "" + +#: ../../builtins/stdtypes.rst:2761 +msgid "" +"Return ``True`` if string starts with the *prefix*, otherwise return " +"``False``. *prefix* can also be a tuple of prefixes to look for. With " +"optional *start*, test string beginning at that position. With optional " +"*end*, stop comparing string at that position." +msgstr "" +"文字列が指定された *prefix* で始まるなら ``True`` を、そうでなければ ``False`` を返します。 *prefix* " +"は見つけたい複数の接頭語のタプルでも構いません。オプションの *start* があれば、その位置から判定を始めます。オプションの *end* " +"があれば、その位置で比較を止めます。" + +#: ../../builtins/stdtypes.rst:2768 +msgid "" +">>> 'Python'.startswith('Py')\n" +"True\n" +">>> 'a tuple of prefixes'.startswith(('at', 'a'))\n" +"True\n" +">>> 'Python is amazing'.startswith('is', 7)\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:2777 +msgid "See also :meth:`endswith` and :meth:`removeprefix`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2782 +msgid "" +"Return a copy of the string with the leading and trailing characters " +"removed. The *chars* argument is a string specifying the set of characters " +"to be removed. If omitted or ``None``, the *chars* argument defaults to " +"removing whitespace. The *chars* argument is not a prefix or suffix; rather," +" all combinations of its values are stripped." +msgstr "" + +#: ../../builtins/stdtypes.rst:2788 +msgid "Whitespace characters are defined by :meth:`str.isspace`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2792 +msgid "" +">>> ' spacious '.strip()\n" +"'spacious'\n" +">>> 'www.example.com'.strip('cmowz.')\n" +"'example'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2799 +msgid "" +"The outermost leading and trailing *chars* argument values are stripped from" +" the string. Characters are removed from the leading end until reaching a " +"string character that is not contained in the set of characters in *chars*. " +"A similar action takes place on the trailing end." +msgstr "" + +#: ../../builtins/stdtypes.rst:2806 +msgid "" +">>> comment_string = '#....... Section 3.2.1 Issue #32 .......'\n" +">>> comment_string.strip('.#! ')\n" +"'Section 3.2.1 Issue #32'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2812 +msgid "See also :meth:`rstrip`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2817 +msgid "" +"Return a copy of the string with uppercase characters converted to lowercase" +" and vice versa. For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2820 +msgid "" +">>> 'Hello World'.swapcase()\n" +"'hELLO wORLD'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2825 +msgid "" +"Note that it is not necessarily true that ``s.swapcase().swapcase() == s``. " +"For example:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2828 +msgid "" +">>> 'straße'.swapcase().swapcase()\n" +"'strasse'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2833 +msgid "See also :meth:`str.lower` and :meth:`str.upper`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2838 +msgid "" +"Return a titlecased version of the string where words start with an " +"uppercase character and the remaining characters are lowercase." +msgstr "文字列を、単語ごとに大文字から始まり、残りの文字のうち大小文字の区別があるものは全て小文字にする、タイトルケースにして返します。" + +#: ../../builtins/stdtypes.rst:2843 +msgid "" +">>> 'Hello world'.title()\n" +"'Hello World'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2846 ../../builtins/stdtypes.rst:4336 +msgid "" +"The algorithm uses a simple language-independent definition of a word as " +"groups of consecutive letters. The definition works in many contexts but it" +" means that apostrophes in contractions and possessives form word " +"boundaries, which may not be the desired result::" +msgstr "" +"このアルゴリズムは、連続した文字の集まりという、言語から独立した単純な単語の定義を使います。この定義は多くの状況ではうまく機能しますが、短縮形や所有格のアポストロフィが単語の境界になってしまい、望みの結果を得られない場合があります::" + +#: ../../builtins/stdtypes.rst:2851 +msgid "" +">>> \"they're bill's friends from the UK\".title()\n" +"\"They'Re Bill'S Friends From The Uk\"" +msgstr "" + +#: ../../builtins/stdtypes.rst:2854 +msgid "" +"The :func:`string.capwords` function does not have this problem, as it " +"splits words on spaces only." +msgstr ":func:`string.capwords` 関数は単語をスペースでのみ分割するため、この問題はありません。" + +#: ../../builtins/stdtypes.rst:2857 +msgid "" +"Alternatively, a workaround for apostrophes can be constructed using regular" +" expressions::" +msgstr "または、正規表現を使うことでアポストロフィに対応できます::" + +#: ../../builtins/stdtypes.rst:2860 +msgid "" +">>> import re\n" +">>> def titlecase(s):\n" +"... return re.sub(r\"[A-Za-z]+('[A-Za-z]+)?\",\n" +"... lambda mo: mo.group(0).capitalize(),\n" +"... s)\n" +"...\n" +">>> titlecase(\"they're bill's friends.\")\n" +"\"They're Bill's Friends.\"" +msgstr "" + +#: ../../builtins/stdtypes.rst:2869 +msgid "See also :meth:`istitle`." +msgstr "" + +#: ../../builtins/stdtypes.rst:2874 +msgid "" +"Return a copy of the string in which each character has been mapped through " +"the given translation table. The table must be an object that implements " +"indexing via :meth:`~object.__getitem__`, typically a :term:`mapping` or " +":term:`sequence`. When indexed by a Unicode ordinal (an integer), the table" +" object can do any of the following: return a Unicode ordinal or a string, " +"to map the character to one or more other characters; return ``None``, to " +"delete the character from the return string; or raise a :exc:`LookupError` " +"exception, to map the character to itself." +msgstr "" +"与えられた変換テーブルに基づいて文字列を構成する各文字をマッピングし、マッピング後の文字列のコピーを返します。変換テーブルは、:meth:`~object.__getitem__`" +" によるインデックス指定を実装するオブジェクトである必要があります。一般的には、 :term:`mapping` または " +":term:`sequence` です。Unicode 序数 (整数) " +"でインデックス指定する場合、変換テーブルのオブジェクトは次のいずれも行うことができます。Unicode 序数または文字列を返して文字を 1 " +"文字以上の別の文字にマッピングすること、``None`` を返して返り値の文字列から指定した文字を削除すること、例外 " +":exc:`LookupError` を送出して文字をその文字自身にマッピングすること。" + +#: ../../builtins/stdtypes.rst:2883 +msgid "" +"You can use :meth:`str.maketrans` to create a translation map from " +"character-to-character mappings in different formats." +msgstr "文字から文字への異なる形式のマッピングから変換マップを作成するために、 :meth:`str.maketrans` が使えます。" + +#: ../../builtins/stdtypes.rst:2886 +msgid "" +"The following example uses a mapping to replace ``'a'`` with ``'X'``, " +"``'b'`` with ``'Y'``, and delete ``'c'``:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2889 +msgid "" +">>> 'abc123'.translate({ord('a'): 'X', ord('b'): 'Y', ord('c'): None})\n" +"'XY123'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2894 +msgid "" +"See also the :mod:`codecs` module for a more flexible approach to custom " +"character mappings." +msgstr "文字のマッピングを好みに合わせてより柔軟に変更する方法については、:mod:`codecs` モジュールも参照してください。" + +#: ../../builtins/stdtypes.rst:2900 +msgid "" +"Return a copy of the string with all the cased characters [4]_ converted to " +"uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` " +"contains uncased characters or if the Unicode category of the resulting " +"character(s) is not \"Lu\" (Letter, uppercase), but e.g. \"Lt\" (Letter, " +"titlecase)." +msgstr "" +"全ての大小文字の区別のある文字 [4]_ が大文字に変換された、文字列のコピーを返します。なお ``s.upper().isupper()`` は、 " +"``s`` が大小文字の区別のある文字を含まなかったり、結果の文字の Unicode カテゴリが \"Lu\" ではなく例えば \"Lt\" " +"(Letter, titlecase) などであったら、 ``False`` になりえます。" + +#: ../../builtins/stdtypes.rst:2906 +msgid "" +"The uppercasing algorithm used is `described in section 3.13.2 'Default Case" +" Conversion' of the Unicode Standard " +"`__." +msgstr "" + +#: ../../builtins/stdtypes.rst:2913 +msgid "" +"Return a copy of the string left filled with ASCII ``'0'`` digits to make a " +"string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled" +" by inserting the padding *after* the sign character rather than before. The" +" original string is returned if *width* is less than or equal to ``len(s)``." +msgstr "" +"長さが *width* になるよう ASCII ``'0'`` で左詰めした文字列のコピーを返します。先頭が符号接頭辞 " +"(``'+'``/``'-'``) だった場合、 ``'0'`` は符号の前ではなく *後* に挿入されます。*width* が ``len(s)`` " +"以下の場合元の文字列を返します。" + +#: ../../builtins/stdtypes.rst:2921 +msgid "" +">>> \"42\".zfill(5)\n" +"'00042'\n" +">>> \"-42\".zfill(5)\n" +"'-0042'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2948 +msgid "Formatted String Literals (f-strings)" +msgstr "" + +#: ../../builtins/stdtypes.rst:2951 +msgid "" +"The :keyword:`await` and :keyword:`async for` can be used in expressions " +"within f-strings." +msgstr "" + +#: ../../builtins/stdtypes.rst:2954 +msgid "Added the debug specifier (``=``)" +msgstr "" + +#: ../../builtins/stdtypes.rst:2956 +msgid "" +"Many restrictions on expressions within f-strings have been removed. " +"Notably, nested strings, comments, and backslashes are now permitted." +msgstr "" + +#: ../../builtins/stdtypes.rst:2960 +msgid "" +"An :dfn:`f-string` (formally a :dfn:`formatted string literal`) is a string " +"literal that is prefixed with ``f`` or ``F``. This type of string literal " +"allows embedding the results of arbitrary Python expressions within " +"*replacement fields*, which are delimited by curly brackets (``{}``). Each " +"replacement field must contain an expression, optionally followed by:" +msgstr "" + +#: ../../builtins/stdtypes.rst:2967 +msgid "a *debug specifier* -- an equal sign (``=``);" +msgstr "" + +#: ../../builtins/stdtypes.rst:2968 +msgid "a *conversion specifier* -- ``!s``, ``!r`` or ``!a``; and/or" +msgstr "" + +#: ../../builtins/stdtypes.rst:2969 +msgid "a *format specifier* prefixed with a colon (``:``)." +msgstr "" + +#: ../../builtins/stdtypes.rst:2971 +msgid "" +"See the :ref:`Lexical Analysis section on f-strings ` for details" +" on the syntax of these fields." +msgstr "" + +#: ../../builtins/stdtypes.rst:2975 +msgid "Debug specifier" +msgstr "" + +#: ../../builtins/stdtypes.rst:2979 +msgid "" +"If a debug specifier -- an equal sign (``=``) -- appears after the " +"replacement field expression, the resulting f-string will contain the " +"expression's source, the equal sign, and the value of the expression. This " +"is often useful for debugging::" +msgstr "" + +#: ../../builtins/stdtypes.rst:2984 +msgid "" +">>> number = 14.3\n" +">>> f'{number=}'\n" +"'number=14.3'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2988 +msgid "" +"Whitespace before, inside and after the expression, as well as whitespace " +"after the equal sign, is significant --- it is retained in the result::" +msgstr "" + +#: ../../builtins/stdtypes.rst:2991 +msgid "" +">>> f'{ number - 4 = }'\n" +"' number - 4 = 10.3'" +msgstr "" + +#: ../../builtins/stdtypes.rst:2996 +msgid "Conversion specifier" +msgstr "" + +#: ../../builtins/stdtypes.rst:2998 +msgid "" +"By default, the value of a replacement field expression is converted to a " +"string using :func:`str`::" +msgstr "" + +#: ../../builtins/stdtypes.rst:3001 +msgid "" +">>> from fractions import Fraction\n" +">>> one_third = Fraction(1, 3)\n" +">>> f'{one_third}'\n" +"'1/3'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3006 +msgid "" +"When a debug specifier but no format specifier is used, the default " +"conversion instead uses :func:`repr`::" +msgstr "" + +#: ../../builtins/stdtypes.rst:3009 +msgid "" +">>> f'{one_third = }'\n" +"'one_third = Fraction(1, 3)'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3012 +msgid "" +"The conversion can be specified explicitly using one of these specifiers:" +msgstr "" + +#: ../../builtins/stdtypes.rst:3014 +msgid "``!s`` for :func:`str`" +msgstr "" + +#: ../../builtins/stdtypes.rst:3015 +msgid "``!r`` for :func:`repr`" +msgstr "" + +#: ../../builtins/stdtypes.rst:3016 +msgid "``!a`` for :func:`ascii`" +msgstr "" + +#: ../../builtins/stdtypes.rst:3020 +msgid "" +">>> str(one_third)\n" +"'1/3'\n" +">>> repr(one_third)\n" +"'Fraction(1, 3)'\n" +"\n" +">>> f'{one_third!s} is {one_third!r}'\n" +"'1/3 is Fraction(1, 3)'\n" +"\n" +">>> string = \"¡kočka 😸!\"\n" +">>> ascii(string)\n" +"\"'\\\\xa1ko\\\\u010dka \\\\U0001f638!'\"\n" +"\n" +">>> f'{string = !a}'\n" +"\"string = '\\\\xa1ko\\\\u010dka \\\\U0001f638!'\"" +msgstr "" + +#: ../../builtins/stdtypes.rst:3037 +msgid "Format specifier" +msgstr "" + +#: ../../builtins/stdtypes.rst:3039 +msgid "" +"After the expression has been evaluated, and possibly converted using an " +"explicit conversion specifier, it is formatted using the :func:`format` " +"function. If the replacement field includes a *format specifier* introduced " +"by a colon (``:``), the specifier is passed to :func:`!format` as the second" +" argument. The result of :func:`!format` is then used as the final value for" +" the replacement field. For example::" +msgstr "" + +#: ../../builtins/stdtypes.rst:3046 +msgid "" +">>> from fractions import Fraction\n" +">>> one_third = Fraction(1, 3)\n" +">>> f'{one_third:.6f}'\n" +"'0.333333'\n" +">>> f'{one_third:_^+10}'\n" +"'___+1/3___'\n" +">>> f'{one_third!r:_^20}'\n" +"'___Fraction(1, 3)___'\n" +">>> f'{one_third = :~>10}~'\n" +"'one_third = ~~~~~~~1/3~'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3060 +msgid "Template String Literals (t-strings)" +msgstr "" + +#: ../../builtins/stdtypes.rst:3062 +msgid "" +"A :dfn:`t-string` (formally a :dfn:`template string literal`) is a string " +"literal that is prefixed with ``t`` or ``T``." +msgstr "" + +#: ../../builtins/stdtypes.rst:3065 +msgid "" +"These strings follow the same syntax and evaluation rules as :ref:`formatted" +" string literals `, with the following differences:" +msgstr "" + +#: ../../builtins/stdtypes.rst:3069 +msgid "" +"Rather than evaluating to a ``str`` object, template string literals " +"evaluate to a :class:`string.templatelib.Template` object." +msgstr "" + +#: ../../builtins/stdtypes.rst:3072 +msgid "" +"The :func:`format` protocol is not used. Instead, the format specifier and " +"conversions (if any) are passed to a new " +":class:`~string.templatelib.Interpolation` object that is created for each " +"evaluated expression. It is up to code that processes the resulting " +":class:`~string.templatelib.Template` object to decide how to handle format " +"specifiers and conversions." +msgstr "" + +#: ../../builtins/stdtypes.rst:3079 +msgid "" +"Format specifiers containing nested replacement fields are evaluated " +"eagerly, prior to being passed to the " +":class:`~string.templatelib.Interpolation` object. For instance, an " +"interpolation of the form ``{amount:.{precision}f}`` will evaluate the inner" +" expression ``{precision}`` to determine the value of the ``format_spec`` " +"attribute. If ``precision`` were to be ``2``, the resulting format specifier" +" would be ``'.2f'``." +msgstr "" + +#: ../../builtins/stdtypes.rst:3087 +msgid "" +"When the equals sign ``'='`` is provided in an interpolation expression, the" +" text of the expression is appended to the literal string that precedes the " +"relevant interpolation. This includes the equals sign and any surrounding " +"whitespace. The :class:`!Interpolation` instance for the expression will be " +"created as normal, except that " +":attr:`~string.templatelib.Interpolation.conversion` will be set to '``r``' " +"(:func:`repr`) by default. If an explicit conversion or format specifier is " +"provided, this will override the default behaviour." +msgstr "" + +#: ../../builtins/stdtypes.rst:3101 +msgid "``printf``-style String Formatting" +msgstr "``printf`` 形式の文字列書式化" + +#: ../../builtins/stdtypes.rst:3114 +msgid "" +"The formatting operations described here exhibit a variety of quirks that " +"lead to a number of common errors (such as failing to display tuples and " +"dictionaries correctly)." +msgstr "" + +#: ../../builtins/stdtypes.rst:3118 +msgid "" +"Using :ref:`formatted string literals `, the :meth:`str.format` " +"interface, or :class:`string.Template` may help avoid these errors. Each of " +"these alternatives provides their own trade-offs and benefits of simplicity," +" flexibility, and/or extensibility." +msgstr "" + +#: ../../builtins/stdtypes.rst:3123 +msgid "" +"String objects have one unique built-in operation: the ``%`` operator " +"(modulo). This is also known as the string *formatting* or *interpolation* " +"operator. Given ``format % values`` (where *format* is a string), ``%`` " +"conversion specifications in *format* are replaced with zero or more " +"elements of *values*. The effect is similar to using the :c:func:`sprintf` " +"function in the C language. For example:" +msgstr "" +"文字列オブジェクトには独特の組み込み演算子: ``%`` 演算子 (モジュロ) があります。これは 文字列の *書式化* あるいは *補間* " +"演算子としても知られています。 ``format % values`` (*format* は文字列とします) が与えられると、*format* の中の" +" ``%`` による変換の指定は0こ以上の *values* の要素で置き換えられます。この動作は C 言語における :c:func:`sprintf`" +" 関数の利用方法に似ています。使用例:" + +#: ../../builtins/stdtypes.rst:3130 +msgid "" +">>> print('%s has %d quote types.' % ('Python', 2))\n" +"Python has 2 quote types." +msgstr "" + +#: ../../builtins/stdtypes.rst:3135 +msgid "" +"If *format* requires a single argument, *values* may be a single non-tuple " +"object. [5]_ Otherwise, *values* must be a tuple with exactly the number of" +" items specified by the format string, or a single mapping object (for " +"example, a dictionary)." +msgstr "" +"*format* が単一の引数しか要求しない場合、 *values* はタプルでない単一のオブジェクトでもかまいません。 [5]_ それ以外の場合、 " +"*values* はフォーマット文字列中で指定された項目と正確に同じ数の要素からなるタプルか、単一のマップオブジェクトでなければなりません。" + +#: ../../builtins/stdtypes.rst:3145 ../../builtins/stdtypes.rst:4447 +msgid "" +"A conversion specifier contains two or more characters and has the following" +" components, which must occur in this order:" +msgstr "一つの変換指定子は 2 またはそれ以上の文字を含み、その構成要素は以下からなりますが、示した順に出現しなければなりません:" + +#: ../../builtins/stdtypes.rst:3148 ../../builtins/stdtypes.rst:4450 +msgid "The ``'%'`` character, which marks the start of the specifier." +msgstr "指定子の開始を示す文字 ``'%'`` 。" + +#: ../../builtins/stdtypes.rst:3150 ../../builtins/stdtypes.rst:4452 +msgid "" +"Mapping key (optional), consisting of a parenthesised sequence of characters" +" (for example, ``(somename)``)." +msgstr "マップキー (オプション)。丸括弧で囲った文字列からなります (例えば ``(somename)``) 。" + +#: ../../builtins/stdtypes.rst:3153 ../../builtins/stdtypes.rst:4455 +msgid "" +"Conversion flags (optional), which affect the result of some conversion " +"types." +msgstr "変換フラグ (オプション)。一部の変換型の結果に影響します。" + +#: ../../builtins/stdtypes.rst:3156 ../../builtins/stdtypes.rst:4458 +msgid "" +"Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " +"actual width is read from the next element of the tuple in *values*, and the" +" object to convert comes after the minimum field width and optional " +"precision." +msgstr "" +"最小のフィールド幅 (オプション)。 ``'*'`` (アスタリスク) を指定した場合、実際の文字列幅が *values* " +"タプルの次の要素から読み出されます。タプルには最小フィールド幅やオプションの精度指定の後に変換したいオブジェクトがくるようにします。" + +#: ../../builtins/stdtypes.rst:3160 ../../builtins/stdtypes.rst:4462 +msgid "" +"Precision (optional), given as a ``'.'`` (dot) followed by the precision. " +"If specified as ``'*'`` (an asterisk), the actual precision is read from the" +" next element of the tuple in *values*, and the value to convert comes after" +" the precision." +msgstr "" +"精度 (オプション)。 ``'.'`` (ドット) とその後に続く精度で与えられます。 ``'*'`` (アスタリスク) を指定した場合、精度の桁数は " +"*values* タプルの次の要素から読み出されます。タプルには精度指定の後に変換したい値がくるようにします。" + +#: ../../builtins/stdtypes.rst:3165 ../../builtins/stdtypes.rst:4467 +msgid "Length modifier (optional)." +msgstr "精度長変換子 (オプション)。" + +#: ../../builtins/stdtypes.rst:3167 ../../builtins/stdtypes.rst:4469 +msgid "Conversion type." +msgstr "変換型。" + +#: ../../builtins/stdtypes.rst:3169 +msgid "" +"When the right argument is a dictionary (or other mapping type), then the " +"formats in the string *must* include a parenthesised mapping key into that " +"dictionary inserted immediately after the ``'%'`` character. The mapping key" +" selects the value to be formatted from the mapping. For example:" +msgstr "" +"``%`` 演算子の右側の引数が辞書の場合 (またはその他のマップ型の場合), 文字列中のフォーマットには、辞書に挿入されているキーを丸括弧で囲い、文字" +" ``'%'`` の直後にくるようにしたものが含まれていなければ *なりません* 。マップキーはフォーマット化したい値をマップから選び出します。例えば:" + +#: ../../builtins/stdtypes.rst:3178 ../../builtins/stdtypes.rst:4480 +msgid "" +"In this case no ``*`` specifiers may occur in a format (since they require a" +" sequential parameter list)." +msgstr "この場合、 ``*`` 指定子をフォーマットに含めてはいけません (``*`` 指定子は順番付けされたパラメタのリストが必要だからです)。" + +#: ../../builtins/stdtypes.rst:3181 ../../builtins/stdtypes.rst:4483 +msgid "The conversion flag characters are:" +msgstr "変換フラグ文字を以下に示します:" + +#: ../../builtins/stdtypes.rst:3190 ../../builtins/stdtypes.rst:4492 +msgid "Flag" +msgstr "Flag" + +#: ../../builtins/stdtypes.rst:3192 ../../builtins/stdtypes.rst:4494 +msgid "``'#'``" +msgstr "``'#'``" + +#: ../../builtins/stdtypes.rst:3192 ../../builtins/stdtypes.rst:4494 +msgid "" +"The value conversion will use the \"alternate form\" (where defined below)." +msgstr "値の変換に (下で定義されている) \"別の形式\" を使います。" + +#: ../../builtins/stdtypes.rst:3195 ../../builtins/stdtypes.rst:4497 +msgid "``'0'``" +msgstr "``'0'``" + +#: ../../builtins/stdtypes.rst:3195 ../../builtins/stdtypes.rst:4497 +msgid "The conversion will be zero padded for numeric values." +msgstr "数値型に対してゼロによるパディングを行います。" + +#: ../../builtins/stdtypes.rst:3197 ../../builtins/stdtypes.rst:4499 +msgid "``'-'``" +msgstr "``'-'``" + +#: ../../builtins/stdtypes.rst:3197 ../../builtins/stdtypes.rst:4499 +msgid "" +"The converted value is left adjusted (overrides the ``'0'`` conversion if " +"both are given)." +msgstr "変換された値を左寄せにします (``'0'`` と同時に与えた場合、 ``'0'`` を上書きします) 。" + +#: ../../builtins/stdtypes.rst:3200 ../../builtins/stdtypes.rst:4502 +msgid "``' '``" +msgstr "``' '``" + +#: ../../builtins/stdtypes.rst:3200 ../../builtins/stdtypes.rst:4502 +msgid "" +"(a space) A blank should be left before a positive number (or empty string) " +"produced by a signed conversion." +msgstr "(スペース) 符号付きの変換で正の数の場合、前に一つスペースを空けます (そうでない場合は空文字になります) 。" + +#: ../../builtins/stdtypes.rst:3203 ../../builtins/stdtypes.rst:4505 +msgid "``'+'``" +msgstr "``'+'``" + +#: ../../builtins/stdtypes.rst:3203 ../../builtins/stdtypes.rst:4505 +msgid "" +"A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides" +" a \"space\" flag)." +msgstr "変換の先頭に符号文字 (``'+'`` または ``'-'``) を付けます(\"スペース\" フラグを上書きします) 。" + +#: ../../builtins/stdtypes.rst:3207 ../../builtins/stdtypes.rst:4509 +msgid "" +"A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as" +" it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``." +msgstr "" +"精度長変換子(``h``, ``l``,または ``L``) を使うことができますが、 Python では必要ないため無視されます。 -- " +"つまり、例えば ``%ld`` は ``%d`` と等価です。" + +#: ../../builtins/stdtypes.rst:3210 ../../builtins/stdtypes.rst:4512 +msgid "The conversion types are:" +msgstr "変換型を以下に示します:" + +#: ../../builtins/stdtypes.rst:3213 ../../builtins/stdtypes.rst:4515 +msgid "Conversion" +msgstr "変換" + +#: ../../builtins/stdtypes.rst:3215 ../../builtins/stdtypes.rst:4517 +msgid "``'d'``" +msgstr "``'d'``" + +#: ../../builtins/stdtypes.rst:3215 ../../builtins/stdtypes.rst:3217 +#: ../../builtins/stdtypes.rst:4517 ../../builtins/stdtypes.rst:4519 +msgid "Signed integer decimal." +msgstr "符号付き 10 進整数。" + +#: ../../builtins/stdtypes.rst:3217 ../../builtins/stdtypes.rst:4519 +msgid "``'i'``" +msgstr "``'i'``" + +#: ../../builtins/stdtypes.rst:3219 ../../builtins/stdtypes.rst:4521 +msgid "``'o'``" +msgstr "``'o'``" + +#: ../../builtins/stdtypes.rst:3219 ../../builtins/stdtypes.rst:4521 +msgid "Signed octal value." +msgstr "符号付き 8 進数。" + +#: ../../builtins/stdtypes.rst:3221 ../../builtins/stdtypes.rst:4523 +msgid "``'u'``" +msgstr "``'u'``" + +#: ../../builtins/stdtypes.rst:3221 ../../builtins/stdtypes.rst:4523 +msgid "Obsolete type -- it is identical to ``'d'``." +msgstr "旧式の型 -- ``'d'`` と同じです。" + +#: ../../builtins/stdtypes.rst:3223 ../../builtins/stdtypes.rst:4525 +msgid "``'x'``" +msgstr "``'x'``" + +#: ../../builtins/stdtypes.rst:3223 ../../builtins/stdtypes.rst:4525 +msgid "Signed hexadecimal (lowercase)." +msgstr "符号付き 16 進数 (小文字)。" + +#: ../../builtins/stdtypes.rst:3225 ../../builtins/stdtypes.rst:4527 +msgid "``'X'``" +msgstr "``'X'``" + +#: ../../builtins/stdtypes.rst:3225 ../../builtins/stdtypes.rst:4527 +msgid "Signed hexadecimal (uppercase)." +msgstr "符号付き 16 進数 (大文字)。" + +#: ../../builtins/stdtypes.rst:3227 ../../builtins/stdtypes.rst:4529 +msgid "``'e'``" +msgstr "``'e'``" + +#: ../../builtins/stdtypes.rst:3227 ../../builtins/stdtypes.rst:4529 +msgid "Floating-point exponential format (lowercase)." +msgstr "指数表記の浮動小数点数 (小文字)。" + +#: ../../builtins/stdtypes.rst:3229 ../../builtins/stdtypes.rst:4531 +msgid "``'E'``" +msgstr "``'E'``" + +#: ../../builtins/stdtypes.rst:3229 ../../builtins/stdtypes.rst:4531 +msgid "Floating-point exponential format (uppercase)." +msgstr "指数表記の浮動小数点数 (大文字)。" + +#: ../../builtins/stdtypes.rst:3231 ../../builtins/stdtypes.rst:4533 +msgid "``'f'``" +msgstr "``'f'``" + +#: ../../builtins/stdtypes.rst:3231 ../../builtins/stdtypes.rst:3233 +#: ../../builtins/stdtypes.rst:4533 ../../builtins/stdtypes.rst:4535 +msgid "Floating-point decimal format." +msgstr "10 進浮動小数点数。" + +#: ../../builtins/stdtypes.rst:3233 ../../builtins/stdtypes.rst:4535 +msgid "``'F'``" +msgstr "``'F'``" + +#: ../../builtins/stdtypes.rst:3235 ../../builtins/stdtypes.rst:4537 +msgid "``'g'``" +msgstr "``'g'``" + +#: ../../builtins/stdtypes.rst:3235 ../../builtins/stdtypes.rst:4537 +msgid "" +"Floating-point format. Uses lowercase exponential format if exponent is less" +" than -4 or not less than precision, decimal format otherwise." +msgstr "浮動小数点数。指数部が -4 以上または精度以下の場合には小文字指数表記、それ以外の場合には10進表記。" + +#: ../../builtins/stdtypes.rst:3239 ../../builtins/stdtypes.rst:4541 +msgid "``'G'``" +msgstr "``'G'``" + +#: ../../builtins/stdtypes.rst:3239 ../../builtins/stdtypes.rst:4541 +msgid "" +"Floating-point format. Uses uppercase exponential format if exponent is less" +" than -4 or not less than precision, decimal format otherwise." +msgstr "浮動小数点数。指数部が -4 以上または精度以下の場合には大文字指数表記、それ以外の場合には10進表記。" + +#: ../../builtins/stdtypes.rst:3243 ../../builtins/stdtypes.rst:4545 +msgid "``'c'``" +msgstr "``'c'``" + +#: ../../builtins/stdtypes.rst:3243 +msgid "Single character (accepts integer or single character string)." +msgstr "文字一文字 (整数または一文字からなる文字列を受理します)。" + +#: ../../builtins/stdtypes.rst:3246 ../../builtins/stdtypes.rst:4558 +msgid "``'r'``" +msgstr "``'r'``" + +#: ../../builtins/stdtypes.rst:3246 +msgid "String (converts any Python object using :func:`repr`)." +msgstr "文字列 (Python オブジェクトを :func:`repr` で変換します)。" + +#: ../../builtins/stdtypes.rst:3249 ../../builtins/stdtypes.rst:4552 +msgid "``'s'``" +msgstr "``'s'``" + +#: ../../builtins/stdtypes.rst:3249 +msgid "String (converts any Python object using :func:`str`)." +msgstr "文字列 (Python オブジェクトを :func:`str` で変換します)。" + +#: ../../builtins/stdtypes.rst:3252 ../../builtins/stdtypes.rst:4555 +msgid "``'a'``" +msgstr "``'a'``" + +#: ../../builtins/stdtypes.rst:3252 +msgid "String (converts any Python object using :func:`ascii`)." +msgstr "文字列 (Python オブジェクトを :func:`ascii` で変換します)。" + +#: ../../builtins/stdtypes.rst:3255 ../../builtins/stdtypes.rst:4561 +msgid "``'%'``" +msgstr "``'%'``" + +#: ../../builtins/stdtypes.rst:3255 ../../builtins/stdtypes.rst:4561 +msgid "" +"No argument is converted, results in a ``'%'`` character in the result." +msgstr "引数を変換せず、返される文字列中では文字 ``'%'`` になります。" + +#: ../../builtins/stdtypes.rst:3259 +msgid "" +"For floating-point formats, the result should be correctly rounded to a " +"given precision ``p`` of digits after the decimal point. The rounding mode " +"matches that of the :func:`round` builtin." +msgstr "" + +#: ../../builtins/stdtypes.rst:3266 ../../builtins/stdtypes.rst:4568 +msgid "" +"The alternate form causes a leading octal specifier (``'0o'``) to be " +"inserted before the first digit." +msgstr "" +"別の形式を指定(訳注: 変換フラグ ``#`` を使用)すると 8 進数を表す接頭辞 (``'0o'``) が最初の数字の前に挿入されます。" + +#: ../../builtins/stdtypes.rst:3270 ../../builtins/stdtypes.rst:4572 +msgid "" +"The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on " +"whether the ``'x'`` or ``'X'`` format was used) to be inserted before the " +"first digit." +msgstr "" +"別の形式を指定(訳注: 変換フラグ ``#`` を使用)すると 16 進数を表す接頭辞 ``'0x'`` または ``'0X'`` " +"(使用するフォーマット文字が ``'x'`` か ``'X'`` に依存します) が最初の数字の前に挿入されます。" + +#: ../../builtins/stdtypes.rst:3274 ../../builtins/stdtypes.rst:4576 +msgid "" +"The alternate form causes the result to always contain a decimal point, even" +" if no digits follow it." +msgstr "この形式にした場合、変換結果には常に小数点が含まれ、それはその後ろに数字が続かない場合にも適用されます。" + +#: ../../builtins/stdtypes.rst:3277 ../../builtins/stdtypes.rst:4579 +msgid "" +"The precision determines the number of digits after the decimal point and " +"defaults to 6." +msgstr "指定精度は小数点の後の桁数を決定し、そのデフォルトは 6 です。" + +#: ../../builtins/stdtypes.rst:3281 ../../builtins/stdtypes.rst:4583 +msgid "" +"The alternate form causes the result to always contain a decimal point, and " +"trailing zeroes are not removed as they would otherwise be." +msgstr "この形式にした場合、変換結果には常に小数点が含まれ他の形式とは違って末尾の 0 は取り除かれません。" + +#: ../../builtins/stdtypes.rst:3284 ../../builtins/stdtypes.rst:4586 +msgid "" +"The precision determines the number of significant digits before and after " +"the decimal point and defaults to 6." +msgstr "指定精度は小数点の前後の有効桁数を決定し、そのデフォルトは 6 です。" + +#: ../../builtins/stdtypes.rst:3288 ../../builtins/stdtypes.rst:4590 +msgid "If precision is ``N``, the output is truncated to ``N`` characters." +msgstr "精度が ``N`` なら、出力は ``N`` 文字に切り詰められます。" + +#: ../../builtins/stdtypes.rst:3291 ../../builtins/stdtypes.rst:4599 +msgid "See :pep:`237`." +msgstr ":pep:`237` を参照してください。" + +#: ../../builtins/stdtypes.rst:3293 +msgid "" +"Since Python strings have an explicit length, ``%s`` conversions do not " +"assume that ``'\\0'`` is the end of the string." +msgstr "Python 文字列には明示的な長さ情報があるので、 ``%s`` 変換において ``'\\0'`` を文字列の末端と仮定したりはしません。" + +#: ../../builtins/stdtypes.rst:3298 +msgid "" +"``%f`` conversions for numbers whose absolute value is over 1e50 are no " +"longer replaced by ``%g`` conversions." +msgstr "絶対値が 1e50 を超える数値の ``%f`` 変換が ``%g`` 変換に置き換えられなくなりました。" + +#: ../../builtins/stdtypes.rst:3309 +msgid "" +"Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, " +":class:`memoryview`" +msgstr "" +"バイナリシーケンス型 --- :class:`bytes`, :class:`bytearray`, :class:`memoryview`" + +#: ../../builtins/stdtypes.rst:3317 +msgid "" +"The core built-in types for manipulating binary data are :class:`bytes` and " +":class:`bytearray`. They are supported by :class:`memoryview` which uses the" +" :ref:`buffer protocol ` to access the memory of other binary" +" objects without needing to make a copy." +msgstr "" +"バイナリデータを操作するためのコア組み込み型は :class:`bytes` および :class:`bytearray` " +"です。これらは、別のバイナリオブジェクトのメモリにコピーを作成すること無くアクセスするための :ref:`バッファプロトコル " +"` を利用する :class:`memoryview` でサポートされています。" + +#: ../../builtins/stdtypes.rst:3322 +msgid "" +"The :mod:`array` module supports efficient storage of basic data types like " +"32-bit integers and IEEE754 double-precision floating values." +msgstr "" +":mod:`array` モジュールは、32 ビット整数や IEEE754 倍精度浮動小数点値のような基本データ型の、効率的な保存をサポートしています。" + +#: ../../builtins/stdtypes.rst:3328 +msgid "Bytes Objects" +msgstr "バイトオブジェクト" + +#: ../../builtins/stdtypes.rst:3332 +msgid "" +"Bytes objects are immutable sequences of single bytes. Since many major " +"binary protocols are based on the ASCII text encoding, bytes objects offer " +"several methods that are only valid when working with ASCII compatible data " +"and are closely related to string objects in a variety of other ways." +msgstr "" +"bytes はバイトの不変なシーケンスです。多くのメジャーなプロトコルがASCIIテキストエンコーディングをベースにしているので、 bytes " +"オブジェクトは ASCII 互換のデータに対してのみ動作する幾つかのメソッドを提供していて、文字列オブジェクトと他の多くの点で近いです。" + +#: ../../builtins/stdtypes.rst:3340 +msgid "" +"Firstly, the syntax for bytes literals is largely the same as that for " +"string literals, except that a ``b`` prefix is added:" +msgstr "まず、 bytes リテラルの構文は文字列リテラルとほぼ同じで、 ``b`` というプリフィックスを付けます:" + +#: ../../builtins/stdtypes.rst:3343 +msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" +msgstr "シングルクォート: ``b'still allows embedded \"double\" quotes'``" + +#: ../../builtins/stdtypes.rst:3344 +msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" +msgstr "ダブルクォート: ``b\"still allows embedded 'single' quotes\"``." + +#: ../../builtins/stdtypes.rst:3345 +msgid "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" +msgstr "3重クォート: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" + +#: ../../builtins/stdtypes.rst:3347 +msgid "" +"Only ASCII characters are permitted in bytes literals (regardless of the " +"declared source code encoding). Any binary values over 127 must be entered " +"into bytes literals using the appropriate escape sequence." +msgstr "" +"bytes リテラルでは (ソースコードのエンコーディングに関係なく) ASCII文字のみが許可されています。 127より大きい値を bytes " +"リテラルに記述する場合は適切なエスケープシーケンスを書く必要があります。" + +#: ../../builtins/stdtypes.rst:3351 +msgid "" +"As with string literals, bytes literals may also use a ``r`` prefix to " +"disable processing of escape sequences. See :ref:`strings` for more about " +"the various forms of bytes literal, including supported escape sequences." +msgstr "" +"文字列リテラルと同じく、 bytes リテラルでも ``r`` プリフィックスを用いてエスケープシーケンスの処理を無効にすることができます。 bytes" +" リテラルの様々な形式やサポートされているエスケープシーケンスについては :ref:`strings` を参照してください。" + +#: ../../builtins/stdtypes.rst:3355 +msgid "" +"While bytes literals and representations are based on ASCII text, bytes " +"objects actually behave like immutable sequences of integers, with each " +"value in the sequence restricted such that ``0 <= x < 256`` (attempts to " +"violate this restriction will trigger :exc:`ValueError`). This is done " +"deliberately to emphasise that while many binary formats include ASCII based" +" elements and can be usefully manipulated with some text-oriented " +"algorithms, this is not generally the case for arbitrary binary data " +"(blindly applying text processing algorithms to binary data formats that are" +" not ASCII compatible will usually lead to data corruption)." +msgstr "" +"bytesリテラルと repr 出力は ASCII テキストをベースにしたものですが、 bytes オブジェクトは、各値が ``0 <= x < " +"256`` の範囲に収まるような整数 (この制限に違反しようとすると :exc:`ValueError` が発生します) " +"の不変なシーケンスとして振る舞います。多くのバイナリフォーマットがASCIIテキストを元にした要素を持っていたり何らかのテキスト操作アルゴリズムによって操作されるものの、任意のバイナリデータが一般にテキストになっているわけではないことを強調するためにこのように設計されました" +" (何も考えずにテキスト操作アルゴリズムをASCII非互換なバイナリデータフォーマットに対して行うとデータを破壊することがあります)。" + +#: ../../builtins/stdtypes.rst:3365 +msgid "" +"In addition to the literal forms, bytes objects can be created in a number " +"of other ways:" +msgstr "リテラル以外に、幾つかの方法で bytes オブジェクトを作ることができます:" + +#: ../../builtins/stdtypes.rst:3368 +msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" +msgstr "指定された長さの、0で埋められた bytes オブジェクト: ``bytes(10)``" + +#: ../../builtins/stdtypes.rst:3369 +msgid "From an iterable of integers: ``bytes(range(20))``" +msgstr "整数の iterable から: ``bytes(range(20))``" + +#: ../../builtins/stdtypes.rst:3370 +msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" +msgstr "既存のバイナリデータからバッファプロトコルでコピーする: ``bytes(obj)``" + +#: ../../builtins/stdtypes.rst:3372 +msgid "Also see the :ref:`bytes ` built-in." +msgstr ":ref:`bytes ` ビルトイン関数も参照してください。" + +#: ../../builtins/stdtypes.rst:3374 +msgid "" +"Since 2 hexadecimal digits correspond precisely to a single byte, " +"hexadecimal numbers are a commonly used format for describing binary data. " +"Accordingly, the bytes type has an additional class method to read data in " +"that format:" +msgstr "" +"16 進数で 2 桁の数は正確に 1 バイトに相当するため、16 進整はバイナリデータを表現する形式として広く使われています。 従って、 bytes " +"型にはその形式でデータを読み取るための追加のクラスメソッドがあります。" + +#: ../../builtins/stdtypes.rst:3380 +msgid "" +"This :class:`bytes` class method returns a bytes object, decoding the given " +"string object. The string must contain two hexadecimal digits per byte, " +"with ASCII whitespace being ignored." +msgstr "" +"この :class:`bytes` のクラスメソッドは、与えられた文字列オブジェクトをデコードして bytes " +"オブジェクトを返します。それぞれのバイトを 16 進数 2 桁で表現した文字列を指定しなければなりません。ASCII 空白文字は無視されます。" + +#: ../../builtins/stdtypes.rst:3387 +msgid "" +":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just" +" spaces." +msgstr ":meth:`bytes.fromhex` は文字列にある空白だけでなく、 ASCII の空白文字全てをスキップするようになりました。" + +#: ../../builtins/stdtypes.rst:3391 +msgid "" +":meth:`bytes.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-like" +" objects ` as input." +msgstr "" + +#: ../../builtins/stdtypes.rst:3395 +msgid "" +"A reverse conversion function exists to transform a bytes object into its " +"hexadecimal representation." +msgstr "bytes オブジェクトをその 16 進表記に変換するための、反対向きの変換関数があります。" + +#: ../../builtins/stdtypes.rst:3401 ../../builtins/stdtypes.rst:3492 +msgid "" +"Return a string object containing two hexadecimal digits for each byte in " +"the instance." +msgstr "インスタンス内の 1 バイトにつき 2 つの 16 進数を含む、文字列オブジェクトを返します。" + +#: ../../builtins/stdtypes.rst:3407 +msgid "" +"If you want to make the hex string easier to read, you can specify a single " +"character separator *sep* parameter to include in the output. By default, " +"this separator will be included between each byte. A second optional " +"*bytes_per_sep* parameter controls the spacing. Positive values calculate " +"the separator position from the right, negative values from the left." +msgstr "" +"16進数文字列を読みやすく表示したい場合、単一文字パラメータ *sep* " +"を指定してセパレータを出力に含めることができます。デフォルトでは、セパレータはバイトごとに表示が区切られるように追加されます。2つ目のオプションパラメータ" +" *bytes_per_sep* はセパレータを入れる間隔を制御します。正の整数値はセパレータの位置を右から計算し、負の整数値は左から計算します。" + +#: ../../builtins/stdtypes.rst:3424 +msgid "" +":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters" +" to insert separators between bytes in the hex output." +msgstr "" +":meth:`bytes.hex` が、16進数出力の各バイトを分割するセパレータを挿入するためのオプションパラメータ *sep* と " +"*bytes_per_sep* をサポートするようになりました。" + +#: ../../builtins/stdtypes.rst:3428 +msgid "" +"Since bytes objects are sequences of integers (akin to a tuple), for a bytes" +" object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes " +"object of length 1. (This contrasts with text strings, where both indexing " +"and slicing will produce a string of length 1)" +msgstr "" +"bytes オブジェクトは (タプルに似た) 整数のシーケンスなので、 bytes オブジェクト *b* について、 ``b[0]`` は整数になり、 " +"``b[0:1]`` は長さ 1 の bytes オブジェクトになります。 (この動作は、文字列に対するインデックス指定もスライスも長さ 1 " +"の文字列を返すのと対照的です。)" + +#: ../../builtins/stdtypes.rst:3433 +msgid "" +"The representation of bytes objects uses the literal format (``b'...'``) " +"since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can " +"always convert a bytes object into a list of integers using ``list(b)``." +msgstr "" +"bytes オブジェクトの repr 出力はリテラル形式 (``b'...'``) になります。 ``bytes([46, 46, 46])`` " +"などの形式よりも便利な事が多いからです。 bytes オブジェクトはいつでも ``list(b)`` で整数のリストに変換できます。" + +#: ../../builtins/stdtypes.rst:3441 +msgid "Bytearray Objects" +msgstr "bytearray オブジェクト" + +#: ../../builtins/stdtypes.rst:3445 +msgid "" +":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " +"objects." +msgstr ":class:`bytearray` オブジェクトは :class:`bytes` オブジェクトの可変なバージョンです。" + +#: ../../builtins/stdtypes.rst:3451 +msgid "" +"There is no dedicated literal syntax for bytearray objects, instead they are" +" always created by calling the constructor:" +msgstr "bytearray に専用のリテラル構文はないので、コンストラクタを使って作成します:" + +#: ../../builtins/stdtypes.rst:3454 +msgid "Creating an empty instance: ``bytearray()``" +msgstr "空のインスタンスを作る: ``bytearray()``" + +#: ../../builtins/stdtypes.rst:3455 +msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" +msgstr "指定された長さの0で埋められたインスタンスを作る: ``bytearray(10)``" + +#: ../../builtins/stdtypes.rst:3456 +msgid "From an iterable of integers: ``bytearray(range(20))``" +msgstr "整数の iterable から: ``bytearray(range(20))``" + +#: ../../builtins/stdtypes.rst:3457 +msgid "" +"Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" +msgstr "既存のバイナリデータからバッファプロトコルを通してコピーする: ``bytearray(b'Hi!')``" + +#: ../../builtins/stdtypes.rst:3459 +msgid "" +"As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " +"operations described in :ref:`bytes-methods`." +msgstr "" +"bytearray オブジェクトは可変なので、 :ref:`bytes-methods` で解説されている bytes " +"オブジェクトと共通の操作に加えて、 :ref:`mutable ` シーケンス操作もサポートしています。" + +#: ../../builtins/stdtypes.rst:3463 +msgid "Also see the :ref:`bytearray ` built-in." +msgstr ":ref:`bytearray ` ビルトイン関数も参照してください。" + +#: ../../builtins/stdtypes.rst:3465 +msgid "" +"Since 2 hexadecimal digits correspond precisely to a single byte, " +"hexadecimal numbers are a commonly used format for describing binary data. " +"Accordingly, the bytearray type has an additional class method to read data " +"in that format:" +msgstr "" +"16 進数で 2 桁の数は正確に 1 バイトに相当するため、16 進整はバイナリデータを表現する形式として広く使われています。 従って、 " +"bytearray 型にはその形式でデータを読み取るための追加のクラスメソッドがあります。" + +#: ../../builtins/stdtypes.rst:3471 +msgid "" +"This :class:`bytearray` class method returns a bytearray object, decoding " +"the given string object. The string must contain two hexadecimal digits per" +" byte, with ASCII whitespace being ignored." +msgstr "" + +#: ../../builtins/stdtypes.rst:3478 +msgid "" +":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " +"just spaces." +msgstr "" +":meth:`bytearray.fromhex` は文字列にある空白だけでなく、 ASCII の空白文字全てをスキップするようになりました。" + +#: ../../builtins/stdtypes.rst:3482 +msgid "" +":meth:`bytearray.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-" +"like objects ` as input." +msgstr "" + +#: ../../builtins/stdtypes.rst:3486 +msgid "" +"A reverse conversion function exists to transform a bytearray object into " +"its hexadecimal representation." +msgstr "bytearray オブジェクトをその 16 進表記に変換するための、反対向きの変換関数があります。" + +#: ../../builtins/stdtypes.rst:3500 +msgid "" +"Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " +"*sep* and *bytes_per_sep* parameters to insert separators between bytes in " +"the hex output." +msgstr "" +":meth:`bytes.hex` と同様に、 :meth:`bytearray.hex` " +"が、16進数出力の各バイトを分割するセパレータを挿入するためのオプションパラメータ *sep* と *bytes_per_sep* " +"をサポートするようになりました。" + +#: ../../builtins/stdtypes.rst:3507 +msgid "" +"Resize the :class:`bytearray` to contain *size* bytes. *size* must be " +"greater than or equal to 0." +msgstr "" + +#: ../../builtins/stdtypes.rst:3510 +msgid "" +"If the :class:`bytearray` needs to shrink, bytes beyond *size* are " +"truncated." +msgstr "" + +#: ../../builtins/stdtypes.rst:3512 +msgid "" +"If the :class:`bytearray` needs to grow, all new bytes, those beyond *size*," +" will be set to null bytes." +msgstr "" + +#: ../../builtins/stdtypes.rst:3516 +msgid "This is equivalent to:" +msgstr "" + +#: ../../builtins/stdtypes.rst:3524 +msgid "Examples:" +msgstr "例:" + +#: ../../builtins/stdtypes.rst:3539 +msgid "" +"Remove the first *n* bytes from the bytearray and return them as an " +"immutable :class:`bytes`. By default (if *n* is ``None``), return all bytes " +"and clear the bytearray." +msgstr "" + +#: ../../builtins/stdtypes.rst:3543 +msgid "" +"If *n* is negative, index from the end and take the first :func:`len` plus " +"*n* bytes. If *n* is out of bounds, raise :exc:`IndexError`." +msgstr "" + +#: ../../builtins/stdtypes.rst:3546 +msgid "" +"Taking less than the full length will leave remaining bytes in the " +":class:`bytearray`, which requires a copy. If the remaining bytes should be " +"discarded, use :func:`~bytearray.resize` or :keyword:`del` to truncate then " +":func:`~bytearray.take_bytes` without a size." +msgstr "" + +#: ../../builtins/stdtypes.rst:3553 +msgid "Taking all bytes is a zero-copy operation." +msgstr "" + +#: ../../builtins/stdtypes.rst:3557 +msgid "" +"See the :ref:`What's New ` entry for " +"common code patterns which can be optimized with " +":meth:`bytearray.take_bytes`." +msgstr "" + +#: ../../builtins/stdtypes.rst:3561 +msgid "" +"Since bytearray objects are sequences of integers (akin to a list), for a " +"bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be " +"a bytearray object of length 1. (This contrasts with text strings, where " +"both indexing and slicing will produce a string of length 1)" +msgstr "" +"bytearray オブジェクトは整数のシーケンス (リストのようなもの) なので、 bytearray オブジェクト *b* について、 " +"``b[0]`` は整数になり、 ``b[0:1]`` は長さ 1 の bytearray " +"オブジェクトになります。(これは、文字列においてインデックス指定もスライスも長さ 1 の文字列を返すのと対照的です。)" + +#: ../../builtins/stdtypes.rst:3566 +msgid "" +"The representation of bytearray objects uses the bytes literal format " +"(``bytearray(b'...')``) since it is often more useful than e.g. " +"``bytearray([46, 46, 46])``. You can always convert a bytearray object into" +" a list of integers using ``list(b)``." +msgstr "" +"bytearray オブジェクトの表記はバイトのリテラル形式 (``bytearray(b'...')``) を使用します。これは ``bytearray([46, 46, 46])`` などの形式よりも便利な事が多いためです。\n" +"bytearray オブジェクトはいつでも ``list(b)`` で整数のリストに変換できます。" + +#: ../../builtins/stdtypes.rst:3573 +msgid "" +"For detailed information on thread-safety guarantees for :class:`bytearray` " +"objects, see :ref:`thread-safety-bytearray`." +msgstr "" + +#: ../../builtins/stdtypes.rst:3580 +msgid "Bytes and Bytearray Operations" +msgstr "bytes と bytearray の操作" + +#: ../../builtins/stdtypes.rst:3585 +msgid "" +"Both bytes and bytearray objects support the :ref:`common `" +" sequence operations. They interoperate not just with operands of the same " +"type, but with any :term:`bytes-like object`. Due to this flexibility, they " +"can be freely mixed in operations without causing errors. However, the " +"return type of the result may depend on the order of operands." +msgstr "" +"bytes と bytearray は両方共 :ref:`一般のシーケンス操作 ` " +"をサポートしています。また、両方とも :term:`bytes-like object` " +"をサポートしている任意のオブジェクトを対象に操作することもできます。この柔軟性により bytes と bytearray " +"を自由に混ぜてもエラーを起こすことなく扱うことができます。ただし、操作の結果のオブジェクトはその操作の順序に依存することになります。" + +#: ../../builtins/stdtypes.rst:3593 +msgid "" +"The methods on bytes and bytearray objects don't accept strings as their " +"arguments, just as the methods on strings don't accept bytes as their " +"arguments. For example, you have to write::" +msgstr "" +"文字列のメソッドが引数として bytes を受け付けないのと同様、bytes オブジェクトと bytearray " +"オブジェクトのメソッドは引数として文字列を受け付けません。例えば、以下のように書かなければなりません::" + +#: ../../builtins/stdtypes.rst:3597 +msgid "" +"a = \"abc\"\n" +"b = a.replace(\"a\", \"f\")" +msgstr "" + +#: ../../builtins/stdtypes.rst:3600 +msgid "and::" +msgstr "および::" + +#: ../../builtins/stdtypes.rst:3602 +msgid "" +"a = b\"abc\"\n" +"b = a.replace(b\"a\", b\"f\")" +msgstr "" + +#: ../../builtins/stdtypes.rst:3605 +msgid "" +"Some bytes and bytearray operations assume the use of ASCII compatible " +"binary formats, and hence should be avoided when working with arbitrary " +"binary data. These restrictions are covered below." +msgstr "" +"いくつかの bytes と bytearray の操作は ASCII " +"と互換性のあるバイナリフォーマットが使われていると仮定していますので、フォーマットの不明なバイナリデータに対して使うことは避けるべきです。こうした制約については以下で説明します。" + +#: ../../builtins/stdtypes.rst:3610 +msgid "" +"Using these ASCII based operations to manipulate binary data that is not " +"stored in an ASCII based format may lead to data corruption." +msgstr "これらの ASCII ベースの演算を使って ASCII ベースではないバイナリデータを操作すると、データを破壊する恐れがあります。" + +#: ../../builtins/stdtypes.rst:3613 +msgid "" +"The following methods on bytes and bytearray objects can be used with " +"arbitrary binary data." +msgstr "以下の bytes および bytearray オブジェクトのメソッドは、任意のバイナリデータに対して使用できます。" + +#: ../../builtins/stdtypes.rst:3619 +msgid "" +"Return the number of non-overlapping occurrences of subsequence *sub* in the" +" range [*start*, *end*]. Optional arguments *start* and *end* are " +"interpreted as in slice notation." +msgstr "" +"[*start*, *end*] の範囲に、部分シーケンス *sub* が重複せず出現する回数を返します。オプション引数 *start* および " +"*end* はスライス表記と同じように解釈されます。" + +#: ../../builtins/stdtypes.rst:3623 ../../builtins/stdtypes.rst:3728 +#: ../../builtins/stdtypes.rst:3750 ../../builtins/stdtypes.rst:3820 +#: ../../builtins/stdtypes.rst:3833 +msgid "" +"The subsequence to search for may be any :term:`bytes-like object` or an " +"integer in the range 0 to 255." +msgstr "" +"検索対象の部分シーケンスは、任意の :term:`bytes-like object` または 0 から 255 の範囲の整数にできます。" + +#: ../../builtins/stdtypes.rst:3626 +msgid "" +"If *sub* is empty, returns the number of empty slices between characters " +"which is the length of the bytes object plus one." +msgstr "*sub* が空の場合は、文字と文字の間にある空のスライスの数、すなわちbytesオブジェクトの長さに1を加えたものを返します。" + +#: ../../builtins/stdtypes.rst:3629 ../../builtins/stdtypes.rst:3740 +#: ../../builtins/stdtypes.rst:3753 ../../builtins/stdtypes.rst:3823 +#: ../../builtins/stdtypes.rst:3836 +msgid "Also accept an integer in the range 0 to 255 as the subsequence." +msgstr "部分シーケンスとして 0 から 255 の範囲の整数も受け取れるようになりました。" + +#: ../../builtins/stdtypes.rst:3636 +msgid "" +"If the binary data starts with the *prefix* string, return " +"``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " +"data::" +msgstr "" +"バリナリーデータが文字列 *prefix* で始まる場合、 ``bytes[len(prefix):]`` " +"を返します。それ以外の場合、元のバイナリーデータのコピーを返します::" + +#: ../../builtins/stdtypes.rst:3640 +msgid "" +">>> b'TestHook'.removeprefix(b'Test')\n" +"b'Hook'\n" +">>> b'BaseTestCase'.removeprefix(b'Test')\n" +"b'BaseTestCase'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3645 +msgid "The *prefix* may be any :term:`bytes-like object`." +msgstr "*prefix* は、任意の :term:`bytes-like object` にできます。" + +#: ../../builtins/stdtypes.rst:3649 ../../builtins/stdtypes.rst:3671 +#: ../../builtins/stdtypes.rst:3805 ../../builtins/stdtypes.rst:3901 +#: ../../builtins/stdtypes.rst:3915 ../../builtins/stdtypes.rst:3946 +#: ../../builtins/stdtypes.rst:3960 ../../builtins/stdtypes.rst:4003 +#: ../../builtins/stdtypes.rst:4075 ../../builtins/stdtypes.rst:4093 +#: ../../builtins/stdtypes.rst:4121 ../../builtins/stdtypes.rst:4260 +#: ../../builtins/stdtypes.rst:4315 ../../builtins/stdtypes.rst:4358 +#: ../../builtins/stdtypes.rst:4379 ../../builtins/stdtypes.rst:4401 +#: ../../builtins/stdtypes.rst:4603 +msgid "" +"The bytearray version of this method does *not* operate in place - it always" +" produces a new object, even if no changes were made." +msgstr "bytearray のこのメソッドはインプレースでは動作 *しません* -- 一切変化が無い場合でも、常に新しいオブジェクトを生成します。" + +#: ../../builtins/stdtypes.rst:3658 +msgid "" +"If the binary data ends with the *suffix* string and that *suffix* is not " +"empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the " +"original binary data::" +msgstr "" +"バイナリーデータが文字列 *suffix* で終わり、 *suffix* が空でない場合、 ``bytes[:-len(suffix)]`` " +"を返します。それ以外の場合、元のバイナリーデータのコピーを返します::" + +#: ../../builtins/stdtypes.rst:3662 +msgid "" +">>> b'MiscTests'.removesuffix(b'Tests')\n" +"b'Misc'\n" +">>> b'TmpDirMixin'.removesuffix(b'Tests')\n" +"b'TmpDirMixin'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3667 +msgid "The *suffix* may be any :term:`bytes-like object`." +msgstr "*suffix* は、任意の :term:`bytes-like object` にできます。" + +#: ../../builtins/stdtypes.rst:3680 +msgid "Return the bytes decoded to a :class:`str`." +msgstr ":class:`str` にデコードされたbytesを返します。" + +#: ../../builtins/stdtypes.rst:3685 +msgid "" +"*errors* controls how decoding errors are handled. If ``'strict'`` (the " +"default), a :exc:`UnicodeError` exception is raised. Other possible values " +"are ``'ignore'``, ``'replace'``, and any other name registered via " +":func:`codecs.register_error`. See :ref:`error-handlers` for details." +msgstr "" +"*errors* はデコーディングエラーをどのように取り扱うかを制御します。 ``'strict'`` (デフォルト) では " +":exc:`UnicodeError` 例外が送出されます。そのほかに指定可能な値は ``'ignore'``, ``'replace'`` と、そして" +" :func:`codecs.register_error` で登録された名前です。詳しくは :ref:`error-handlers` " +"を参照してください。" + +#: ../../builtins/stdtypes.rst:3691 +msgid "" +"For performance reasons, the value of *errors* is not checked for validity " +"unless a decoding error actually occurs, :ref:`devmode` is enabled or a " +":ref:`debug build ` is used." +msgstr "" +"パフォーマンス上の理由から、 *errors* の値の妥当性は、デコーディングエラーが実際に発生するか、 :ref:`devmode` " +"が有効になっているか、もしくは :ref:`デバッグビルド ` が使われていない限りチェックされません。" + +#: ../../builtins/stdtypes.rst:3697 +msgid "" +"Passing the *encoding* argument to :class:`str` allows decoding any " +":term:`bytes-like object` directly, without needing to make a temporary " +":class:`!bytes` or :class:`!bytearray` object." +msgstr "" +"引数 *encoding* を :class:`str` に渡すと :term:`bytes-like object` " +"を直接デコードすることができます。つまり、一時的な :class:`!bytes` や :class:`!bytearray` " +"オブジェクトを作成する必要はありません。" + +#: ../../builtins/stdtypes.rst:3712 +msgid "" +"Return ``True`` if the binary data ends with the specified *suffix*, " +"otherwise return ``False``. *suffix* can also be a tuple of suffixes to " +"look for. With optional *start*, test beginning at that position. With " +"optional *end*, stop comparing at that position." +msgstr "" +"バイナリデータが指定された *suffix* で終わる場合は ``True`` を、そうでなければ ``False`` を返します。 *suffix* " +"は見つけたい複数の接尾語のタプルでも構いません。オプションの *start* が指定されている場合、その位置から判定を開始します。オプションの " +"*end* が指定されている場合、その位置で比較を終了します。" + +#: ../../builtins/stdtypes.rst:3717 +msgid "The suffix(es) to search for may be any :term:`bytes-like object`." +msgstr "検索対象の接尾語 (複数も可) は、任意の :term:`bytes-like object` にできます。" + +#: ../../builtins/stdtypes.rst:3723 +msgid "" +"Return the lowest index in the data where the subsequence *sub* is found, " +"such that *sub* is contained in the slice ``s[start:end]``. Optional " +"arguments *start* and *end* are interpreted as in slice notation. Return " +"``-1`` if *sub* is not found." +msgstr "" +"スライス ``s[start:end]`` に部分シーケンス *sub* が含まれる場合、データ中のその *sub* " +"の最小のインデックスを返します。オプション引数 *start* および *end* はスライス表記と同様に解釈されます。 *sub* " +"が見つからなかった場合、 ``-1`` を返します。" + +#: ../../builtins/stdtypes.rst:3733 +msgid "" +"The :meth:`~bytes.find` method should be used only if you need to know the " +"position of *sub*. To check if *sub* is a substring or not, use the " +":keyword:`in` operator::" +msgstr "" +":meth:`~bytes.find` メソッドは、 *sub* の位置を知りたいときにのみ使うべきです。 *sub* が部分文字列 (訳注: " +"おそらく原文の誤り、正しくは部分シーケンス) であるかどうかのみを調べるには、 :keyword:`in` 演算子を使ってください::" + +#: ../../builtins/stdtypes.rst:3737 +msgid "" +">>> b'Py' in b'Python'\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:3747 +msgid "" +"Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " +"is not found." +msgstr "" +":meth:`~bytes.find` と同様ですが、部分シーケンスが見つからなかった場合 :exc:`ValueError` を送出します。" + +#: ../../builtins/stdtypes.rst:3760 +msgid "" +"Return a bytes or bytearray object which is the concatenation of the binary " +"data sequences in *iterable*. A :exc:`TypeError` will be raised if there " +"are any values in *iterable* that are not :term:`bytes-like objects `, including :class:`str` objects. The separator between " +"elements is the contents of the bytes or bytearray object providing this " +"method." +msgstr "" +"*iterable* 中のバイナリデータを結合した bytes または bytearray オブジェクトを返します。 *iterable* に " +":class:`str` オブジェクトなど :term:`bytes-like objects ` " +"ではない値が含まれている場合、 :exc:`TypeError` が送出されます。なお要素間のセパレータは、このメソッドを提供する bytes または " +"bytearray オブジェクトとなります。" + +#: ../../builtins/stdtypes.rst:3771 +msgid "" +"This static method returns a translation table usable for " +":meth:`bytes.translate` that will map each character in *from* into the " +"character at the same position in *to*; *from* and *to* must both be " +":term:`bytes-like objects ` and have the same length." +msgstr "" +"この静的メソッドは、 :func:`bytes.translate` に渡すのに適した変換テーブルを返します。このテーブルは、 *from* " +"中の各バイトを *to* の同じ位置にあるバイトにマッピングします。 *from* と *to* は両方とも同じ長さの :term:`bytes-" +"like objects ` でなければなりません。" + +#: ../../builtins/stdtypes.rst:3782 +msgid "" +"Split the sequence at the first occurrence of *sep*, and return a 3-tuple " +"containing the part before the separator, the separator itself or its " +"bytearray copy, and the part after the separator. If the separator is not " +"found, return a 3-tuple containing a copy of the original sequence, followed" +" by two empty bytes or bytearray objects." +msgstr "" +"区切り *sep* が最初に出現する位置でシーケンスを分割し、 3 " +"要素のタプルを返します。タプルの内容は、区切りの前の部分、その区切りオブジェクトまたはその bytearray " +"型のコピー、そして区切りの後ろの部分です。もし区切りが見つからなければ、タプルには元のシーケンスのコピーと、その後ろに二つの空の bytes または " +"bytearray オブジェクトが入ります。" + +#: ../../builtins/stdtypes.rst:3789 ../../builtins/stdtypes.rst:3850 +msgid "The separator to search for may be any :term:`bytes-like object`." +msgstr "検索する区切りとしては、任意の :term:`bytes-like object` を指定できます。" + +#: ../../builtins/stdtypes.rst:3795 +msgid "" +"Return a copy of the sequence with all occurrences of subsequence *old* " +"replaced by *new*. If *count* is given, only the first *count* occurrences " +"are replaced. If *count* is not specified or ``-1``, then all occurrences " +"are replaced." +msgstr "" + +#: ../../builtins/stdtypes.rst:3800 +msgid "" +"The subsequence to search for and its replacement may be any :term:`bytes-" +"like object`." +msgstr "検索する部分シーケンスおよび置換後の部分シーケンスとしては、任意の :term:`bytes-like object` を指定できます。" + +#: ../../builtins/stdtypes.rst:3815 +msgid "" +"Return the highest index in the sequence where the subsequence *sub* is " +"found, such that *sub* is contained within ``s[start:end]``. Optional " +"arguments *start* and *end* are interpreted as in slice notation. Return " +"``-1`` on failure." +msgstr "" +"シーケンス中の領域 ``s[start:end]`` に *sub* が含まれる場合、その最大のインデックスを返します。オプション引数 *start* " +"および *end* はスライス表記と同様に解釈されます。 *sub* が見つからなかった場合 ``-1`` を返します。" + +#: ../../builtins/stdtypes.rst:3830 +msgid "" +"Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " +"*sub* is not found." +msgstr "" +":meth:`~bytes.rfind` と同様ですが、部分シーケンス *sub* が見つからなかった場合 :exc:`ValueError` " +"を送出します。" + +#: ../../builtins/stdtypes.rst:3843 +msgid "" +"Split the sequence at the last occurrence of *sep*, and return a 3-tuple " +"containing the part before the separator, the separator itself or its " +"bytearray copy, and the part after the separator. If the separator is not " +"found, return a 3-tuple containing two empty bytes or bytearray objects, " +"followed by a copy of the original sequence." +msgstr "" +"区切り *sep* が最後に出現する位置でシーケンスを分割し、 3 " +"要素のタプルを返します。タプルの内容は、区切りの前の部分、その区切りオブジェクトまたはその bytearray " +"型のコピー、そして区切りの後ろの部分です。もし区切れなければ、タプルには二つの空の bytes または bytearray " +"オブジェクトと、その後ろに元のシーケンスのコピーが入ります。" + +#: ../../builtins/stdtypes.rst:3856 +msgid "" +"Return ``True`` if the binary data starts with the specified *prefix*, " +"otherwise return ``False``. *prefix* can also be a tuple of prefixes to " +"look for. With optional *start*, test beginning at that position. With " +"optional *end*, stop comparing at that position." +msgstr "" +"バイナリデータが指定された *prefix* で始まる場合は ``True`` を、そうでなければ ``False`` を返します。 *prefix* " +"は見つけたい複数の接頭語のタプルでも構いません。オプションの *start* が指定されている場合、その位置から判定を開始します。オプションの " +"*end* が指定されている場合、その位置で比較を終了します。" + +#: ../../builtins/stdtypes.rst:3861 +msgid "The prefix(es) to search for may be any :term:`bytes-like object`." +msgstr "検索対象の接頭語 (複数も可) は、任意の :term:`bytes-like object` にできます。" + +#: ../../builtins/stdtypes.rst:3867 +msgid "" +"Return a copy of the bytes or bytearray object where all bytes occurring in " +"the optional argument *delete* are removed, and the remaining bytes have " +"been mapped through the given translation table, which must be a bytes " +"object of length 256." +msgstr "" +"オプション引数 *delete* " +"に現れるすべてのバイトを除去し、残ったバイトを与えられた変換テーブルに従ってマップした、バイト列やバイト配列オブジェクトのコピーを返します。変換テーブルは長さ" +" 256 のバイト列オブジェクトでなければなりません。" + +#: ../../builtins/stdtypes.rst:3872 +msgid "" +"You can use the :func:`bytes.maketrans` method to create a translation " +"table." +msgstr "変換テーブルの作成に、 :func:`bytes.maketrans` メソッドを使うこともできます。" + +#: ../../builtins/stdtypes.rst:3875 +msgid "" +"Set the *table* argument to ``None`` for translations that only delete " +"characters::" +msgstr "文字を削除するだけの変換には、 *table* 引数を ``None`` に設定してください::" + +#: ../../builtins/stdtypes.rst:3878 +msgid "" +">>> b'read this short text'.translate(None, b'aeiou')\n" +"b'rd ths shrt txt'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3881 +msgid "*delete* is now supported as a keyword argument." +msgstr "*delete* はキーワード引数として指定可能になりました。" + +#: ../../builtins/stdtypes.rst:3885 +msgid "" +"The following methods on bytes and bytearray objects have default behaviours" +" that assume the use of ASCII compatible binary formats, but can still be " +"used with arbitrary binary data by passing appropriate arguments. Note that " +"all of the bytearray methods in this section do *not* operate in place, and " +"instead produce new objects." +msgstr "" +"以下の bytes および bytearray オブジェクトのメソッドは、 ASCII " +"と互換性のあるバイナリフォーマットが使われていると仮定していますが、適切な引数を指定すれば任意のバイナリデータに使用できます。なお、このセクションで紹介する" +" bytearray のメソッドはすべてインプレースで動作 *せず* 、新しいオブジェクトを生成します。" + +#: ../../builtins/stdtypes.rst:3894 +msgid "" +"Return a copy of the object centered in a sequence of length *width*. " +"Padding is done using the specified *fillbyte* (default is an ASCII space). " +"For :class:`bytes` objects, the original sequence is returned if *width* is " +"less than or equal to ``len(s)``." +msgstr "" +"長さ *width* の中央寄せされたシーケンスのコピーを返します。パディングには *fillbyte* で指定された値 (デフォルトでは ASCII " +"スペース) が使われます。 :class:`bytes` オブジェクトの場合、 *width* が ``len(s)`` " +"以下なら元のシーケンスが返されます。" + +#: ../../builtins/stdtypes.rst:3908 +msgid "" +"Return a copy of the object left justified in a sequence of length *width*. " +"Padding is done using the specified *fillbyte* (default is an ASCII space). " +"For :class:`bytes` objects, the original sequence is returned if *width* is " +"less than or equal to ``len(s)``." +msgstr "" +"長さ *width* の左寄せされたシーケンスのコピーを返します。パディングには *fillbyte* で指定された値 (デフォルトでは ASCII " +"スペース) が使われます。 :class:`bytes` オブジェクトの場合、 *width* が ``len(s)`` " +"以下なら元のシーケンスが返されます。" + +#: ../../builtins/stdtypes.rst:3922 +msgid "" +"Return a copy of the sequence with specified leading bytes removed. The " +"*bytes* argument is a binary sequence specifying the set of byte values to " +"be removed. If omitted or ``None``, the *bytes* argument defaults to " +"removing :meth:`ASCII whitespace `. The *bytes* argument is " +"not a prefix; rather, all combinations of its values are stripped::" +msgstr "" + +#: ../../builtins/stdtypes.rst:3929 +msgid "" +">>> b' spacious '.lstrip()\n" +"b'spacious '\n" +">>> b'www.example.com'.lstrip(b'cmowz.')\n" +"b'example.com'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3934 +msgid "" +"The binary sequence of byte values to remove may be any :term:`bytes-like " +"object`. See :meth:`~bytes.removeprefix` for a method that will remove a " +"single prefix string rather than all of a set of characters. For example::" +msgstr "" +"削除したいバイト値のバイナリシーケンスには、 :term:`bytes-like object` " +"を指定することができます。バイナリシーケンスで指定した文字の集合全てではなく、指定した文字列そのものを接頭辞として削除するメソッドについては、 " +":meth:`~bytes.removeprefix` を参照してください。使用例::" + +#: ../../builtins/stdtypes.rst:3939 +msgid "" +">>> b'Arthur: three!'.lstrip(b'Arthur: ')\n" +"b'ee!'\n" +">>> b'Arthur: three!'.removeprefix(b'Arthur: ')\n" +"b'three!'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3953 +msgid "" +"Return a copy of the object right justified in a sequence of length *width*." +" Padding is done using the specified *fillbyte* (default is an ASCII space)." +" For :class:`bytes` objects, the original sequence is returned if *width* is" +" less than or equal to ``len(s)``." +msgstr "" +"長さ *width* の右寄せされたシーケンスのコピーを返します。パディングには *fillbyte* で指定された値 (デフォルトでは ASCII " +"スペース) が使われます。 :class:`bytes` オブジェクトの場合、 *width* が ``len(s)`` " +"以下なら元のシーケンスが返されます。" + +#: ../../builtins/stdtypes.rst:3967 +msgid "" +"Split the binary sequence into subsequences of the same type, using *sep* as" +" the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are" +" done, the *rightmost* ones. If *sep* is not specified or ``None``, any " +"subsequence consisting solely of :meth:`ASCII whitespace ` is" +" a separator. Except for splitting from the right, :meth:`rsplit` behaves " +"like :meth:`split` which is described in detail below." +msgstr "" + +#: ../../builtins/stdtypes.rst:3979 +msgid "" +"Return a copy of the sequence with specified trailing bytes removed. The " +"*bytes* argument is a binary sequence specifying the set of byte values to " +"be removed. If omitted or ``None``, the *bytes* argument defaults to " +"removing :meth:`ASCII whitespace `. The *bytes* argument is " +"not a suffix; rather, all combinations of its values are stripped::" +msgstr "" + +#: ../../builtins/stdtypes.rst:3986 +msgid "" +">>> b' spacious '.rstrip()\n" +"b' spacious'\n" +">>> b'mississippi'.rstrip(b'ipz')\n" +"b'mississ'" +msgstr "" + +#: ../../builtins/stdtypes.rst:3991 +msgid "" +"The binary sequence of byte values to remove may be any :term:`bytes-like " +"object`. See :meth:`~bytes.removesuffix` for a method that will remove a " +"single suffix string rather than all of a set of characters. For example::" +msgstr "" +"削除したいバイト値のバイナリシーケンスには、 :term:`bytes-like object` " +"を指定することができます。バイナリシーケンスで指定した文字の集合全てではなく、指定した文字列そのものを接尾辞として削除するメソッドについては、 " +":meth:`~bytes.removesuffix` を参照してください。使用例::" + +#: ../../builtins/stdtypes.rst:3996 +msgid "" +">>> b'Monty Python'.rstrip(b' Python')\n" +"b'M'\n" +">>> b'Monty Python'.removesuffix(b' Python')\n" +"b'Monty'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4010 +msgid "" +"Split the binary sequence into subsequences of the same type, using *sep* as" +" the delimiter string. If *maxsplit* is given and non-negative, at most " +"*maxsplit* splits are done (thus, the list will have at most ``maxsplit+1`` " +"elements). If *maxsplit* is not specified or is ``-1``, then there is no " +"limit on the number of splits (all possible splits are made)." +msgstr "" +"*sep* を区切りとして、同じ型の部分シーケンスに分割します。 *maxsplit* が与えられ、かつ負の数でない場合、シーケンスの *左端* " +"から最大 *maxsplit* 回だけ分割を行います (したがって結果のリストの要素数は最大で ``maxsplit+1`` になります)。 " +"*maxsplit* が指定されていないか ``-1`` のとき、分割の回数に制限はありません (可能なだけ分割されます)。" + +#: ../../builtins/stdtypes.rst:4016 +msgid "" +"If *sep* is given, consecutive delimiters are not grouped together and are " +"deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " +"returns ``[b'1', b'', b'2']``). The *sep* argument may consist of a " +"multibyte sequence as a single delimiter. Splitting an empty sequence with a" +" specified separator returns ``[b'']`` or ``[bytearray(b'')]`` depending on " +"the type of object being split. The *sep* argument may be any :term:`bytes-" +"like object`." +msgstr "" +"*sep* が与えられた場合、連続した区切り用バイト値はまとめられず、空の部分シーケンスを区切っていると判断されます(例えば " +"``b'1,,2'.split(b',')`` は ``[b'1', b'', b'2']`` を返します)。引数 *sep* " +"は複数バイトのシーケンスを1つの区切り文字にもできます。空のシーケンスを分割すると、分割するオブジェクトの型によって ``[b'']`` または " +"``[bytearray(b'')]`` が返ります。引数 *sep* には、あらゆる :term:`bytes-like object` " +"を指定できます。" + +#: ../../builtins/stdtypes.rst:4026 +msgid "" +">>> b'1,2,3'.split(b',')\n" +"[b'1', b'2', b'3']\n" +">>> b'1,2,3'.split(b',', maxsplit=1)\n" +"[b'1', b'2,3']\n" +">>> b'1,2,,3,'.split(b',')\n" +"[b'1', b'2', b'', b'3', b'']\n" +">>> b'1<>2<>3<4'.split(b'<>')\n" +"[b'1', b'2', b'3<4']" +msgstr "" + +#: ../../builtins/stdtypes.rst:4035 +msgid "" +"If *sep* is not specified or is ``None``, a different splitting algorithm is" +" applied: runs of consecutive :meth:`ASCII whitespace ` are " +"regarded as a single separator, and the result will contain no empty strings" +" at the start or end if the sequence has leading or trailing whitespace. " +"Consequently, splitting an empty sequence or a sequence consisting solely of" +" ASCII whitespace without a specified separator returns ``[]``." +msgstr "" + +#: ../../builtins/stdtypes.rst:4046 +msgid "" +">>> b'1 2 3'.split()\n" +"[b'1', b'2', b'3']\n" +">>> b'1 2 3'.split(maxsplit=1)\n" +"[b'1', b'2 3']\n" +">>> b' 1 2 3 '.split()\n" +"[b'1', b'2', b'3']" +msgstr "" + +#: ../../builtins/stdtypes.rst:4057 +msgid "" +"Return a copy of the sequence with specified leading and trailing bytes " +"removed. The *bytes* argument is a binary sequence specifying the set of " +"byte values to be removed. If omitted or ``None``, the *bytes* argument " +"defaults to removing :meth:`ASCII whitespace `. The *bytes* " +"argument is not a prefix or suffix; rather, all combinations of its values " +"are stripped::" +msgstr "" + +#: ../../builtins/stdtypes.rst:4065 +msgid "" +">>> b' spacious '.strip()\n" +"b'spacious'\n" +">>> b'www.example.com'.strip(b'cmowz.')\n" +"b'example'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4070 +msgid "" +"The binary sequence of byte values to remove may be any :term:`bytes-like " +"object`." +msgstr "除去対象のバイト値を含むバイナリシーケンスには、任意の :term:`bytes-like object` を指定できます。" + +#: ../../builtins/stdtypes.rst:4079 +msgid "" +"The following methods on bytes and bytearray objects assume the use of ASCII" +" compatible binary formats and should not be applied to arbitrary binary " +"data. Note that all of the bytearray methods in this section do *not* " +"operate in place, and instead produce new objects." +msgstr "" +"以下の bytes および bytearray オブジェクトのメソッドは、 ASCII " +"と互換性のあるバイナリフォーマットが使われていると仮定しており、任意のバイナリデータに対して使用すべきではありません。なお、このセクションで紹介する " +"bytearray のメソッドはすべてインプレースで動作 *せず* 、新しいオブジェクトを生成します。" + +#: ../../builtins/stdtypes.rst:4087 +msgid "" +"Return a copy of the sequence with each byte interpreted as an ASCII " +"character, and the first byte capitalized and the rest lowercased. Non-ASCII" +" byte values are passed through unchanged." +msgstr "" +"各バイトを ASCII 文字と解釈して、最初のバイトを大文字にし、残りを小文字にしたシーケンスのコピーを返します。 ASCII " +"文字と解釈できないバイト値は、変更されません。" + +#: ../../builtins/stdtypes.rst:4100 +msgid "" +"Return a copy of the sequence where all ASCII tab characters are replaced by" +" one or more ASCII spaces, depending on the current column and the given tab" +" size. Tab positions occur every *tabsize* bytes (default is 8, giving tab " +"positions at columns 0, 8, 16 and so on). To expand the sequence, the " +"current column is set to zero and the sequence is examined byte by byte. If" +" the byte is an ASCII tab character (``b'\\t'``), one or more space " +"characters are inserted in the result until the current column is equal to " +"the next tab position. (The tab character itself is not copied.) If the " +"current byte is an ASCII newline (``b'\\n'``) or carriage return " +"(``b'\\r'``), it is copied and the current column is reset to zero. Any " +"other byte value is copied unchanged and the current column is incremented " +"by one regardless of how the byte value is represented when printed::" +msgstr "" +"桁 (column) 位置と指定されたタブ幅 (tab size) に応じて、全ての ASCII タブ文字を 1 つ以上の ASCII " +"スペース文字に置換したシーケンスのコピーを返します。ここで *tabsize* バイトごとの桁位置をタブ位置とします (デフォルト値である 8 " +"の場合、タブ位置は 0 桁目、 8 桁目、 16 桁目、と続いていきます)。シーケンスを展開するにあたって、まず現桁位置をゼロに設定し、シーケンスを 1" +" バイトずつ調べていきます。もしバイト値が ASCII タブ文字 (``b'\\t'``) であれば、現桁位置が次のタブ位置と一致するまで 1 つ以上の" +" ASCII スペース文字を結果のシーケンスに挿入していきます(ASCII タブ文字自体はコピーしません)。もしバイト値が ASCII 改行文字 " +"(``b'\\n'`` もしくは ``b'\\r'``) であれば、そのままコピーした上で現桁位置を 0 " +"にリセットします。その他のバイト値については変更せずにコピーし、そのバイト値の表示のされ方(訳注: 全角、半角など)に関わらず現桁位置を 1 " +"つ増加させます::" + +#: ../../builtins/stdtypes.rst:4114 +msgid "" +">>> b'01\\t012\\t0123\\t01234'.expandtabs()\n" +"b'01 012 0123 01234'\n" +">>> b'01\\t012\\t0123\\t01234'.expandtabs(4)\n" +"b'01 012 0123 01234'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4128 +msgid "" +"Return ``True`` if all bytes in the sequence are alphabetical ASCII " +"characters or ASCII decimal digits and the sequence is not empty, ``False`` " +"otherwise. Alphabetic ASCII characters are those byte values in the sequence" +" ``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``. ASCII decimal " +"digits are those byte values in the sequence ``b'0123456789'``." +msgstr "" +"シーケンスが空でなく、かつ全てのバイト値が ASCII 文字のアルファベットまたは数字である場合は ``True`` を、そうでなければ " +"``False`` を返します。ここでの ASCII 文字のアルファベットとはシーケンス " +"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'`` に含まれるバイト値です。 " +"ASCII 文字の数字とは ``b'0123456789'`` に含まれるバイト値です。" + +#: ../../builtins/stdtypes.rst:4136 +msgid "" +">>> b'ABCabc1'.isalnum()\n" +"True\n" +">>> b'ABC abc1'.isalnum()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:4145 +msgid "" +"Return ``True`` if all bytes in the sequence are alphabetic ASCII characters" +" and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " +"characters are those byte values in the sequence " +"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." +msgstr "" +"シーケンスが空でなく、かつ全てのバイト値が ASCII 文字のアルファベットである場合は ``True`` を、そうでなければ ``False`` " +"を返します。ここでの ASCII 文字のアルファベットとはシーケンス " +"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'`` に含まれるバイト値です。" + +#: ../../builtins/stdtypes.rst:4152 +msgid "" +">>> b'ABCabc'.isalpha()\n" +"True\n" +">>> b'ABCabc1'.isalpha()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:4161 +msgid "" +"Return ``True`` if the sequence is empty or all bytes in the sequence are " +"ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F." +msgstr "" +"シーケンスが空であるか、シーケンスの全てのバイトが ASCII である場合に ``True`` を、それ以外の場合に ``False`` を返します。\n" +"ASCII バイトは 0-0x7F の範囲にあります。" + +#: ../../builtins/stdtypes.rst:4171 +msgid "" +"Return ``True`` if all bytes in the sequence are ASCII decimal digits and " +"the sequence is not empty, ``False`` otherwise. ASCII decimal digits are " +"those byte values in the sequence ``b'0123456789'``." +msgstr "" +"シーケンスが空でなく、かつ全てのバイト値が ASCII 文字の数字である場合は ``True`` を、そうでなければ ``False`` " +"を返します。ここでの ASCII 文字の数字とは ``b'0123456789'`` に含まれるバイト値です。" + +#: ../../builtins/stdtypes.rst:4177 +msgid "" +">>> b'1234'.isdigit()\n" +"True\n" +">>> b'1.23'.isdigit()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:4186 +msgid "" +"Return ``True`` if there is at least one lowercase ASCII character in the " +"sequence and no uppercase ASCII characters, ``False`` otherwise." +msgstr "" +"シーケンス中に小文字アルファベットの ASCII 文字が一つ以上あり、かつ大文字アルファベットの ASCII 文字が一つも無い場合に ``True`` " +"を返します。そうでなければ ``False`` を返します。" + +#: ../../builtins/stdtypes.rst:4191 +msgid "" +">>> b'hello world'.islower()\n" +"True\n" +">>> b'Hello world'.islower()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:4196 ../../builtins/stdtypes.rst:4238 +#: ../../builtins/stdtypes.rst:4254 ../../builtins/stdtypes.rst:4304 +#: ../../builtins/stdtypes.rst:4373 +msgid "" +"Lowercase ASCII characters are those byte values in the sequence " +"``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte" +" values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." +msgstr "" +"ここでの小文字の ASCII 文字とは ``b'abcdefghijklmnopqrstuvwxyz'`` に含まれるバイト値です。また大文字の " +"ASCII 文字とは ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`` に含まれるバイト値です。" + +#: ../../builtins/stdtypes.rst:4204 +msgid "" +"Return ``True`` if all bytes in the sequence are ASCII whitespace and the " +"sequence is not empty, ``False`` otherwise. ASCII whitespace characters are" +" those byte values in the sequence ``b' \\t\\n\\r\\x0b\\f'`` (space, tab, " +"newline, carriage return, vertical tab, form feed)." +msgstr "" +"シーケンスが空でなく、かつ全てのバイト値が ASCII 空白文字である場合は ``True`` を、そうでなければ ``False`` " +"を返します。ここでの ASCII 空白文字とはシーケンス ``b' \\t\\n\\r\\x0b\\f'`` に含まれるバイト値です " +"(半角スペース、タブ、ラインフィード、キャリッジリターン、垂直タブ、フォームフィード) 。" + +#: ../../builtins/stdtypes.rst:4213 +msgid "" +"Return ``True`` if the sequence is ASCII titlecase and the sequence is not " +"empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the " +"definition of \"titlecase\"." +msgstr "" +"シーケンスが空でなく、かつ ASCII のタイトルケース文字列になっている場合は ``True`` を、そうでなければ ``False`` " +"を返します。「タイトルケース文字列」の定義については :meth:`bytes.title` を参照してください。" + +#: ../../builtins/stdtypes.rst:4219 +msgid "" +">>> b'Hello World'.istitle()\n" +"True\n" +">>> b'Hello world'.istitle()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:4228 +msgid "" +"Return ``True`` if there is at least one uppercase alphabetic ASCII " +"character in the sequence and no lowercase ASCII characters, ``False`` " +"otherwise." +msgstr "" +"シーケンス中に大文字アルファベットの ASCII 文字が一つ以上あり、かつ小文字アルファベットの ASCII 文字が一つも無い場合に ``True`` " +"を返します。そうでなければ ``False`` を返します。" + +#: ../../builtins/stdtypes.rst:4233 +msgid "" +">>> b'HELLO WORLD'.isupper()\n" +"True\n" +">>> b'Hello world'.isupper()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:4246 +msgid "" +"Return a copy of the sequence with all the uppercase ASCII characters " +"converted to their corresponding lowercase counterpart." +msgstr "シーケンスに含まれる大文字アルファベットの ASCII 文字を全て小文字アルファベットに変換したシーケンスのコピーを返します。" + +#: ../../builtins/stdtypes.rst:4251 +msgid "" +">>> b'Hello World'.lower()\n" +"b'hello world'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4271 +msgid "" +"Return a list of the lines in the binary sequence, breaking at ASCII line " +"boundaries. This method uses the :term:`universal newlines` approach to " +"splitting lines. Line breaks are not included in the resulting list unless " +"*keepends* is given and true." +msgstr "" +"バイナリシーケンスを ASCII の改行コードで分割し、各行をリストにして返します。このメソッドは :term:`universal newlines`" +" アプローチで行を分割します。 *keepends* 引数に真を与えた場合を除き、改行コードは結果のリストに含まれません。" + +#: ../../builtins/stdtypes.rst:4278 +msgid "" +">>> b'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines()\n" +"[b'ab c', b'', b'de fg', b'kl']\n" +">>> b'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines(keepends=True)\n" +"[b'ab c\\n', b'\\n', b'de fg\\r', b'kl\\r\\n']" +msgstr "" + +#: ../../builtins/stdtypes.rst:4283 +msgid "" +"Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this " +"method returns an empty list for the empty string, and a terminal line break" +" does not result in an extra line::" +msgstr "" +":meth:`~bytes.split` とは違って、空シーケンスに対して区切り *sep* " +"を与えて呼び出すと空のリストを返します。またシーケンス末尾に改行コードがある場合、(訳註: " +"その後ろに空行があるとは判断せず)余分な行を生成することはありません::" + +#: ../../builtins/stdtypes.rst:4287 +msgid "" +">>> b\"\".split(b'\\n'), b\"Two lines\\n\".split(b'\\n')\n" +"([b''], [b'Two lines', b''])\n" +">>> b\"\".splitlines(), b\"One line\\n\".splitlines()\n" +"([], [b'One line'])" +msgstr "" + +#: ../../builtins/stdtypes.rst:4296 +msgid "" +"Return a copy of the sequence with all the lowercase ASCII characters " +"converted to their corresponding uppercase counterpart and vice-versa." +msgstr "" +"シーケンスに含まれる小文字アルファベットの ASCII " +"文字を全て大文字アルファベットに変換し、さらに大文字アルファベットを同様に小文字アルファベットに変換したシーケンスのコピーを返します。" + +#: ../../builtins/stdtypes.rst:4301 +msgid "" +">>> b'Hello World'.swapcase()\n" +"b'hELLO wORLD'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4308 +msgid "" +"Unlike :func:`str.swapcase`, it is always the case that " +"``bin.swapcase().swapcase() == bin`` for the binary versions. Case " +"conversions are symmetrical in ASCII, even though that is not generally true" +" for arbitrary Unicode code points." +msgstr "" + +#: ../../builtins/stdtypes.rst:4322 +msgid "" +"Return a titlecased version of the binary sequence where words start with an" +" uppercase ASCII character and the remaining characters are lowercase. " +"Uncased byte values are left unmodified." +msgstr "" +"タイトルケース化したバイナリシーケンスを返します。具体的には、各単語が大文字アルファベットの ASCII " +"文字で始まり、かつ残りの文字が小文字アルファベットになっているシーケンスが返ります。大文字小文字の区別が無いバイト値については変更されずそのままになります。" + +#: ../../builtins/stdtypes.rst:4328 +msgid "" +">>> b'Hello world'.title()\n" +"b'Hello World'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4331 +msgid "" +"Lowercase ASCII characters are those byte values in the sequence " +"``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte" +" values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. All other byte " +"values are uncased." +msgstr "" +"ここでの小文字の ASCII 文字とは ``b'abcdefghijklmnopqrstuvwxyz'`` に含まれるバイト値です。また大文字の " +"ASCII 文字とは ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`` " +"に含まれるバイト値です。その他のバイト値については、大文字小文字の区別はありません。" + +#: ../../builtins/stdtypes.rst:4341 +msgid "" +">>> b\"they're bill's friends from the UK\".title()\n" +"b\"They'Re Bill'S Friends From The Uk\"" +msgstr "" + +#: ../../builtins/stdtypes.rst:4344 +msgid "" +"A workaround for apostrophes can be constructed using regular expressions::" +msgstr "正規表現を使うことでアポストロフィに対応できます::" + +#: ../../builtins/stdtypes.rst:4346 +msgid "" +">>> import re\n" +">>> def titlecase(s):\n" +"... return re.sub(rb\"[A-Za-z]+('[A-Za-z]+)?\",\n" +"... lambda mo: mo.group(0)[0:1].upper() +\n" +"... mo.group(0)[1:].lower(),\n" +"... s)\n" +"...\n" +">>> titlecase(b\"they're bill's friends.\")\n" +"b\"They're Bill's Friends.\"" +msgstr "" + +#: ../../builtins/stdtypes.rst:4365 +msgid "" +"Return a copy of the sequence with all the lowercase ASCII characters " +"converted to their corresponding uppercase counterpart." +msgstr "シーケンスに含まれる小文字アルファベットの ASCII 文字を全て大文字アルファベットに変換したシーケンスのコピーを返します。" + +#: ../../builtins/stdtypes.rst:4370 +msgid "" +">>> b'Hello World'.upper()\n" +"b'HELLO WORLD'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4386 +msgid "" +"Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make" +" a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is" +" handled by inserting the padding *after* the sign character rather than " +"before. For :class:`bytes` objects, the original sequence is returned if " +"*width* is less than or equal to ``len(seq)``." +msgstr "" +"長さが *width* になるよう ASCII ``b'0'`` で左詰めしたシーケンスのコピーを返します。先頭が符号接頭辞 " +"(``b'+'``/``b'-'``) だった場合、 ``b'0'`` は符号の前ではなく *後* に挿入されます。 :class:`bytes` " +"オブジェクトの場合、 *width* が ``len(seq)`` 以下であれば元のシーケンスが返ります。" + +#: ../../builtins/stdtypes.rst:4394 +msgid "" +">>> b\"42\".zfill(5)\n" +"b'00042'\n" +">>> b\"-42\".zfill(5)\n" +"b'-0042'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4408 +msgid "``printf``-style Bytes Formatting" +msgstr "``printf`` 形式での bytes の書式化" + +#: ../../builtins/stdtypes.rst:4425 +msgid "" +"The formatting operations described here exhibit a variety of quirks that " +"lead to a number of common errors (such as failing to display tuples and " +"dictionaries correctly). If the value being printed may be a tuple or " +"dictionary, wrap it in a tuple." +msgstr "" +"ここで述べる書式化演算には様々な癖があり、よく間違いの元になっています " +"(タプルや辞書を正しく表示できないなど)。もし表示する値がタプルや辞書かもしれない場合、それをタプルに包むようにしてください。" + +#: ../../builtins/stdtypes.rst:4430 +msgid "" +"Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " +"the ``%`` operator (modulo). This is also known as the bytes *formatting* or" +" *interpolation* operator. Given ``format % values`` (where *format* is a " +"bytes object), ``%`` conversion specifications in *format* are replaced with" +" zero or more elements of *values*. The effect is similar to using the " +":c:func:`sprintf` function in the C language." +msgstr "" + +#: ../../builtins/stdtypes.rst:4437 +msgid "" +"If *format* requires a single argument, *values* may be a single non-tuple " +"object. [5]_ Otherwise, *values* must be a tuple with exactly the number of" +" items specified by the format bytes object, or a single mapping object (for" +" example, a dictionary)." +msgstr "" +"*format* が単一の引数しか要求しない場合、 *values* はタプルではない単一のオブジェクトで問題ありません。 [5]_ それ以外の場合、 " +"*values* は書式シーケンス(訳註: 先の例での *format* " +")中で指定された項目と正確に同じ数の要素を含むタプルか、単一のマッピング型のオブジェクト (たとえば辞書) でなければなりません。" + +#: ../../builtins/stdtypes.rst:4471 +msgid "" +"When the right argument is a dictionary (or other mapping type), then the " +"formats in the bytes object *must* include a parenthesised mapping key into " +"that dictionary inserted immediately after the ``'%'`` character. The " +"mapping key selects the value to be formatted from the mapping. For " +"example:" +msgstr "" +"``%`` 演算子の右側の引数が辞書の場合 (またはその他のマッピング型の場合) 、 bytes " +"オブジェクト中のフォーマットには、辞書のキーを丸括弧で囲って文字 ``'%'`` の直後に書いたものが含まれていなければ *なりません* " +"。マップキーは書式化したい値をマッピングから選び出します。例えば:" + +#: ../../builtins/stdtypes.rst:4523 +msgid "\\(8)" +msgstr "\\(8)" + +#: ../../builtins/stdtypes.rst:4545 +msgid "Single byte (accepts integer or single byte objects)." +msgstr "1 バイト (整数または要素 1 つの ``bytes``/``bytearray`` オブジェクトを受理します)" + +#: ../../builtins/stdtypes.rst:4548 +msgid "``'b'``" +msgstr "``'b'``" + +#: ../../builtins/stdtypes.rst:4548 +msgid "" +"Bytes (any object that follows the :ref:`buffer protocol ` or" +" has :meth:`~object.__bytes__`)." +msgstr "" +"バイナリシーケンス (:ref:`buffer protocol ` をサポートするか、 " +":meth:`~object.__bytes__` メソッドがあるオブジェクト)" + +#: ../../builtins/stdtypes.rst:4552 +msgid "" +"``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " +"bases." +msgstr "``'s'`` は ``'b'`` の別名です。Python 2/3 の両方を対象としたコードでのみ使用すべきです。" + +#: ../../builtins/stdtypes.rst:4555 +msgid "" +"Bytes (converts any Python object using ``repr(obj).encode('ascii', " +"'backslashreplace')``)." +msgstr "" +"バイナリシーケンス (Python オブジェクトを ``repr(obj).encode('ascii', 'backslashreplace')`` " +"で変換します)。" + +#: ../../builtins/stdtypes.rst:4558 +msgid "" +"``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " +"bases." +msgstr "``'r'`` は ``'a'`` の別名です。Python 2/3 の両方を対象としたコードでのみ使用すべきです。" + +#: ../../builtins/stdtypes.rst:4558 +msgid "\\(7)" +msgstr "\\(7)" + +#: ../../builtins/stdtypes.rst:4593 +msgid "" +"``b'%s'`` is deprecated, but will not be removed during the 3.x series." +msgstr "``b'%s'`` は非推奨ですが、3.x 系では削除されません。" + +#: ../../builtins/stdtypes.rst:4596 +msgid "" +"``b'%r'`` is deprecated, but will not be removed during the 3.x series." +msgstr "``b'%r'`` は非推奨ですが、3.x 系では削除されません。" + +#: ../../builtins/stdtypes.rst:4608 +msgid ":pep:`461` - Adding % formatting to bytes and bytearray" +msgstr ":pep:`461` - bytes と bytearray への % 書式化の追加" + +#: ../../builtins/stdtypes.rst:4615 +msgid "Memory Views" +msgstr "メモリビュー" + +#: ../../builtins/stdtypes.rst:4617 +msgid "" +":class:`memoryview` objects allow Python code to access the internal data of" +" an object that supports the :ref:`buffer protocol ` without " +"copying." +msgstr "" +":class:`memoryview` オブジェクトは、Python コードが :ref:`バッファプロトコル ` " +"をサポートするオブジェクトの内部データへ、コピーすることなくアクセスすることを可能にします。" + +#: ../../builtins/stdtypes.rst:4623 +msgid "" +"Create a :class:`memoryview` that references *object*. *object* must " +"support the buffer protocol. Built-in objects that support the buffer " +"protocol include :class:`bytes` and :class:`bytearray`." +msgstr "" +"*object* を参照する :class:`memoryview` を作成します。 *object* " +"はバッファプロトコルをサポートしていなければなりません。バッファプロトコルをサポートする組み込みオブジェクトには、 :class:`bytes` 、 " +":class:`bytearray` などがあります。" + +#: ../../builtins/stdtypes.rst:4627 +msgid "" +"A :class:`memoryview` has the notion of an *element*, which is the atomic " +"memory unit handled by the originating *object*. For many simple types such" +" as :class:`bytes` and :class:`bytearray`, an element is a single byte, but " +"other types such as :class:`array.array` may have bigger elements." +msgstr "" +":class:`memoryview` は元となる *object* が扱うメモリーの最小単位を *要素* " +"として扱います。多くの単純なオブジェクト、例えば :class:`bytes` や :class:`bytearray` " +"では、要素は単バイトになりますが、他の :class:`array.array` 等の型では、要素はより大きくなりえます。" + +#: ../../builtins/stdtypes.rst:4632 +msgid "" +":class:`!memoryview`\\s are :ref:`generic ` over the type of their" +" underlying data." +msgstr "" + +#: ../../builtins/stdtypes.rst:4635 +msgid "" +"``len(view)`` is equal to the length of :meth:`~memoryview.tolist`, which is" +" the nested list representation of the view. If ``view.ndim == 1``, this is " +"equal to the number of elements in the view." +msgstr "" + +#: ../../builtins/stdtypes.rst:4639 +msgid "" +"If ``view.ndim == 0``, ``len(view)`` now raises :exc:`TypeError` instead of " +"returning 1." +msgstr "" +"``view.ndim == 0`` で ``len(view)`` の場合、1の代わりに :exc:`TypeError` を返すようになりました。" + +#: ../../builtins/stdtypes.rst:4642 +msgid "" +"The :class:`~memoryview.itemsize` attribute will give you the number of " +"bytes in a single element." +msgstr ":class:`~memoryview.itemsize` 属性は各要素のバイト数を与えます。" + +#: ../../builtins/stdtypes.rst:4645 +msgid "" +"A :class:`memoryview` supports slicing and indexing to expose its data. One-" +"dimensional slicing will result in a subview::" +msgstr ":class:`memoryview` はスライスおよびインデックス指定で内容を取得できます。一次元のスライスは部分ビューになります::" + +#: ../../builtins/stdtypes.rst:4648 +msgid "" +">>> v = memoryview(b'abcefg')\n" +">>> v[1]\n" +"98\n" +">>> v[-1]\n" +"103\n" +">>> v[1:4]\n" +"\n" +">>> bytes(v[1:4])\n" +"b'bce'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4658 +msgid "" +"If :class:`~memoryview.format` is one of the native format specifiers from " +"the :mod:`struct` module, indexing with an integer or a tuple of integers is" +" also supported and returns a single *element* with the correct type. One-" +"dimensional memoryviews can be indexed with an integer or a one-integer " +"tuple. Multi-dimensional memoryviews can be indexed with tuples of exactly " +"*ndim* integers where *ndim* is the number of dimensions. Zero-dimensional " +"memoryviews can be indexed with the empty tuple." +msgstr "" +"もしメモリビューの :class:`~memoryview.format` が :mod:`struct` " +"モジュールによって定義されているネイティブのフォーマット指定子であれば、整数または整数のタプルでのインデックス指定により適切な型の *要素1つ* " +"を得ることができます。一次元のメモリビューでは、整数または整数 1 つのタプルでインデックス指定できます。多次元のメモリビューでは、その次元数を " +"*ndim* としたとき、ちょうど *ndim* " +"個の整数からなるタプルでインデックス指定できます。ゼロ次元のメモリビューでは、空のタプルでインデックス指定できます。" + +#: ../../builtins/stdtypes.rst:4667 +msgid "Here is an example with a non-byte format::" +msgstr ":class:`~memoryview.format` が単バイト単位ではない例を示します::" + +#: ../../builtins/stdtypes.rst:4669 +msgid "" +">>> import array\n" +">>> a = array.array('l', [-11111111, 22222222, -33333333, 44444444])\n" +">>> m = memoryview(a)\n" +">>> m[0]\n" +"-11111111\n" +">>> m[-1]\n" +"44444444\n" +">>> m[::2].tolist()\n" +"[-11111111, -33333333]" +msgstr "" + +#: ../../builtins/stdtypes.rst:4679 +msgid "" +"If the underlying object is writable, the memoryview supports one-" +"dimensional slice assignment. Resizing is not allowed::" +msgstr "メモリビューの参照しているオブジェクトが書き込み可能であれば、一次元スライスでの代入が可能です。ただしサイズの変更はできません::" + +#: ../../builtins/stdtypes.rst:4682 +msgid "" +">>> data = bytearray(b'abcefg')\n" +">>> v = memoryview(data)\n" +">>> v.readonly\n" +"False\n" +">>> v[0] = ord(b'z')\n" +">>> data\n" +"bytearray(b'zbcefg')\n" +">>> v[1:4] = b'123'\n" +">>> data\n" +"bytearray(b'z123fg')\n" +">>> v[2:3] = b'spam'\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"ValueError: memoryview assignment: lvalue and rvalue have different structures\n" +">>> v[2:6] = b'spam'\n" +">>> data\n" +"bytearray(b'z1spam')" +msgstr "" + +#: ../../builtins/stdtypes.rst:4700 +msgid "" +"One-dimensional memoryviews of :term:`hashable` (read-only) types with " +"formats 'B', 'b' or 'c' are also hashable. The hash is defined as ``hash(m) " +"== hash(m.tobytes())``::" +msgstr "" +"'B', 'b', 'c' いずれかのフォーマットの :term:`ハッシュ可能 ` な (読み出し専用の) " +"型の1次元メモリビューもまた、ハッシュ可能です。ハッシュは ``hash(m) == hash(m.tobytes())`` として定義されています::" + +#: ../../builtins/stdtypes.rst:4704 +msgid "" +">>> v = memoryview(b'abcefg')\n" +">>> hash(v) == hash(b'abcefg')\n" +"True\n" +">>> hash(v[2:4]) == hash(b'ce')\n" +"True\n" +">>> hash(v[::-2]) == hash(b'abcefg'[::-2])\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:4712 +msgid "" +"One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " +"with formats 'B', 'b' or 'c' are now :term:`hashable`." +msgstr "" +"1 次元のメモリビューがスライス可能になりました。 'B', 'b', 'c' いずれかのフォーマットの 1 次元のメモリビューが " +":term:`ハッシュ可能 ` になりました。" + +#: ../../builtins/stdtypes.rst:4716 +msgid "" +"memoryview is now registered automatically with " +":class:`collections.abc.Sequence`" +msgstr "memoryview は自動的に :class:`collections.abc.Sequence` へ登録されるようになりました。" + +#: ../../builtins/stdtypes.rst:4720 +msgid "memoryviews can now be indexed with a tuple of integers." +msgstr "" + +#: ../../builtins/stdtypes.rst:4723 +msgid "memoryview is now a :term:`generic type`." +msgstr "" + +#: ../../builtins/stdtypes.rst:4726 +msgid ":class:`memoryview` has several methods:" +msgstr ":class:`memoryview` にはいくつかのメソッドがあります:" + +#: ../../builtins/stdtypes.rst:4730 +msgid "" +"A memoryview and a :pep:`3118` exporter are equal if their shapes are " +"equivalent and if all corresponding values are equal when the operands' " +"respective format codes are interpreted using :mod:`struct` syntax." +msgstr "" +"memoryview と :pep:`3118` エクスポーターは、 shape が同じで、 :mod:`struct` " +"のフォーマットで解釈したときの値が同じ場合に同値になります。" + +#: ../../builtins/stdtypes.rst:4734 +msgid "" +"For the subset of :mod:`struct` format strings currently supported by " +":meth:`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" +msgstr "" +":meth:`tolist` がサポートしている :mod:`struct` フォーマットの一部では、 ``v.tolist() == " +"w.tolist()`` が成り立つときに ``v`` == ``w`` になります::" + +#: ../../builtins/stdtypes.rst:4737 +msgid "" +">>> import array\n" +">>> a = array.array('I', [1, 2, 3, 4, 5])\n" +">>> b = array.array('d', [1.0, 2.0, 3.0, 4.0, 5.0])\n" +">>> c = array.array('b', [5, 3, 1])\n" +">>> x = memoryview(a)\n" +">>> y = memoryview(b)\n" +">>> x == a == y == b\n" +"True\n" +">>> x.tolist() == a.tolist() == y.tolist() == b.tolist()\n" +"True\n" +">>> z = y[::-2]\n" +">>> z == c\n" +"True\n" +">>> z.tolist() == c.tolist()\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:4753 +msgid "" +"If either format string is not supported by the :mod:`struct` module, then " +"the objects will always compare as unequal (even if the format strings and " +"buffer contents are identical)::" +msgstr "" +"どちらかの書式文字列が :mod:`struct` モジュールにサポートされていなければ、 (書式文字列とバッファの内容が同一でも) " +"オブジェクトは常に等しくないものとして比較されます::" + +#: ../../builtins/stdtypes.rst:4757 +msgid "" +">>> from ctypes import BigEndianStructure, c_long\n" +">>> class BEPoint(BigEndianStructure):\n" +"... _fields_ = [(\"x\", c_long), (\"y\", c_long)]\n" +"...\n" +">>> point = BEPoint(100, 200)\n" +">>> a = memoryview(point)\n" +">>> b = memoryview(point)\n" +">>> a == point\n" +"False\n" +">>> a == b\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:4769 +msgid "" +"Note that, as with floating-point numbers, ``v is w`` does *not* imply ``v " +"== w`` for memoryview objects." +msgstr "" +"浮動小数点数の場合と同様 memoryview オブジェクトに対する ``v is w`` は ``v == w`` を意味 *しない* " +"ことに注意してください。" + +#: ../../builtins/stdtypes.rst:4772 +msgid "" +"Previous versions compared the raw memory disregarding the item format and " +"the logical array structure." +msgstr "以前のバージョンは、要素フォーマットと論理的な配列構造を無視して生のメモリを比較していました。" + +#: ../../builtins/stdtypes.rst:4778 +msgid "" +"Return the data in the buffer as a bytestring. This is equivalent to " +"calling the :class:`bytes` constructor on the memoryview. ::" +msgstr "" +"バッファ中のデータをバイト文字列として返します。これはメモリビューに対して :class:`bytes` コンストラクタを呼び出すのと同等です。 ::" + +#: ../../builtins/stdtypes.rst:4781 +msgid "" +">>> m = memoryview(b\"abc\")\n" +">>> m.tobytes()\n" +"b'abc'\n" +">>> bytes(m)\n" +"b'abc'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4787 +msgid "" +"For non-contiguous arrays the result is equal to the flattened list " +"representation with all elements converted to bytes. :meth:`tobytes` " +"supports all format strings, including those that are not in :mod:`struct` " +"module syntax." +msgstr "" +"連続でない配列については、結果はすべての要素がバイトに変換されたものを含むフラットなリスト表現に等しくなります。 :meth:`tobytes` は、 " +":mod:`struct` モジュール文法にないものを含むすべての書式文字列をサポートします。" + +#: ../../builtins/stdtypes.rst:4792 +msgid "" +"*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the" +" original array is converted to C or Fortran order. For contiguous views, " +"'A' returns an exact copy of the physical memory. In particular, in-memory " +"Fortran order is preserved. For non-contiguous views, the data is converted " +"to C first. *order=None* is the same as *order='C'*." +msgstr "" +"*order* は {'C', 'F', 'A'} のいずれかを取ることができます。 *order* が 'C' か 'F' の場合、元の配列は C " +"または Fortran のデータ並びにそれぞれ変換されます。連続したデータに対するビューの場合、 'A' " +"は物理メモリ上のデータの正確なコピーを返します。特に、メモリ上における Fortran " +"のデータ並びは保存されます。不連続なデータに対するビューの場合、データはまず C のデータ並びに変換されます。 *order=None* は " +"*order='C'* と同じです。" + +#: ../../builtins/stdtypes.rst:4802 +msgid "" +"Return a string object containing two hexadecimal digits for each byte in " +"the buffer. ::" +msgstr "バッファ中の各バイトを 2 つの 16 進数で表した文字列を返します::" + +#: ../../builtins/stdtypes.rst:4805 +msgid "" +">>> m = memoryview(b\"abc\")\n" +">>> m.hex()\n" +"'616263'" +msgstr "" + +#: ../../builtins/stdtypes.rst:4811 +msgid "" +"Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " +"*sep* and *bytes_per_sep* parameters to insert separators between bytes in " +"the hex output." +msgstr "" +":meth:`bytes.hex` と同様に、 :meth:`memoryview.hex` " +"は、16進数出力のバイト文字列を分割するセパレータを挿入するためのオプションパラメータ *sep* と *bytes_per_sep* " +"をサポートするようになりました。" + +#: ../../builtins/stdtypes.rst:4818 +msgid "Return the data in the buffer as a list of elements. ::" +msgstr "バッファ中のデータを要素のリストとして返します。 ::" + +#: ../../builtins/stdtypes.rst:4820 +msgid "" +">>> memoryview(b'abc').tolist()\n" +"[97, 98, 99]\n" +">>> import array\n" +">>> a = array.array('d', [1.1, 2.2, 3.3])\n" +">>> m = memoryview(a)\n" +">>> m.tolist()\n" +"[1.1, 2.2, 3.3]" +msgstr "" + +#: ../../builtins/stdtypes.rst:4828 +msgid "" +":meth:`tolist` now supports all single character native formats in " +":mod:`struct` module syntax as well as multi-dimensional representations." +msgstr "" +":meth:`tolist` が :mod:`struct` モジュール文法に含まれるすべての単一文字の native " +"フォーマットと多次元の表現をサポートするようになりました。" + +#: ../../builtins/stdtypes.rst:4835 +msgid "" +"Return a readonly version of the memoryview object. The original memoryview" +" object is unchanged. ::" +msgstr "読み込み専用のメモリビューオブジェクトを返します。元のメモリビューオブジェクトは変更されません。 ::" + +#: ../../builtins/stdtypes.rst:4838 +msgid "" +">>> m = memoryview(bytearray(b'abc'))\n" +">>> mm = m.toreadonly()\n" +">>> mm.tolist()\n" +"[97, 98, 99]\n" +">>> mm[0] = 42\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: cannot modify read-only memory\n" +">>> m[0] = 43\n" +">>> mm.tolist()\n" +"[43, 98, 99]" +msgstr "" + +#: ../../builtins/stdtypes.rst:4854 +msgid "" +"Release the underlying buffer exposed by the memoryview object. Many " +"objects take special actions when a view is held on them (for example, a " +":class:`bytearray` would temporarily forbid resizing); therefore, calling " +"release() is handy to remove these restrictions (and free any dangling " +"resources) as soon as possible." +msgstr "" +"memoryview " +"オブジェクトによって晒されている、元になるバッファを解放します。多くのオブジェクトはビューに支配されているときに特殊なふるまいをします (例えば、 " +":class:`bytearray` は大きさの変更を一時的に禁止します)。ですから、release() " +"を呼び出すことは、これらの制約をできるだけ早く取り除く (そしてぶら下がったリソースをすべて解放する) のに便利です。" + +#: ../../builtins/stdtypes.rst:4860 +msgid "" +"After this method has been called, any further operation on the view raises " +"a :class:`ValueError` (except :meth:`release` itself which can be called " +"multiple times)::" +msgstr "" + +#: ../../builtins/stdtypes.rst:4864 +msgid "" +">>> m = memoryview(b'abc')\n" +">>> m.release()\n" +">>> m[0]\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"ValueError: operation forbidden on released memoryview object" +msgstr "" + +#: ../../builtins/stdtypes.rst:4871 +msgid "" +"The context management protocol can be used for a similar effect, using the " +"``with`` statement::" +msgstr "コンテキストマネージャプロトコルは、 ``with`` 文を使って同様の効果を得るのに使えます::" + +#: ../../builtins/stdtypes.rst:4874 +msgid "" +">>> with memoryview(b'abc') as m:\n" +"... m[0]\n" +"...\n" +"97\n" +">>> m[0]\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"ValueError: operation forbidden on released memoryview object" +msgstr "" + +#: ../../builtins/stdtypes.rst:4888 +msgid "" +"Cast a memoryview to a new format or shape. *shape* defaults to " +"``[byte_length//new_itemsize]``, which means that the result view will be " +"one-dimensional. The return value is a new memoryview, but the buffer itself" +" is not copied. Supported casts are 1D -> C-:term:`contiguous` and " +"C-contiguous -> 1D." +msgstr "" +"memoryview を新しいフォーマットか shape にキャストします。 *shape* はデフォルトで " +"``[byte_length//new_itemsize]`` で、 1次元配列になります。戻り値は memoryview " +"ですが、バッファー自体はコピーされません。サポートされている変換は 1次元配列 -> C言語型の連続配列 と C言語型の連続配列 -> 1次元配列 " +"です(参考: :term:`contiguous`)。" + +#: ../../builtins/stdtypes.rst:4894 +msgid "" +"The destination format is restricted to a single element native format in " +":mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " +"'c'). The byte length of the result must be the same as the original length." +" Note that all byte lengths may depend on the operating system." +msgstr "" +"キャスト後のフォーマットは単一要素のネイティブフォーマットに限定され、 :mod:`struct` " +"の文法で指定します。利用可能なフォーマットのひとつはバイトフォーマット ('B', 'b' または 'c') " +"です。キャスト後のバイト長は元の長さと同じでなければなりません。全てのフォーマットのバイト長は、オペレーティングシステムに依存することに注意してください。" + +#: ../../builtins/stdtypes.rst:4900 +msgid "Cast 1D/long to 1D/unsigned bytes::" +msgstr "1次元 long から 1次元 unsigned byte へのキャスト::" + +#: ../../builtins/stdtypes.rst:4902 +msgid "" +">>> import array\n" +">>> a = array.array('l', [1,2,3])\n" +">>> x = memoryview(a)\n" +">>> x.format\n" +"'l'\n" +">>> x.itemsize\n" +"8\n" +">>> len(x)\n" +"3\n" +">>> x.nbytes\n" +"24\n" +">>> y = x.cast('B')\n" +">>> y.format\n" +"'B'\n" +">>> y.itemsize\n" +"1\n" +">>> len(y)\n" +"24\n" +">>> y.nbytes\n" +"24" +msgstr "" + +#: ../../builtins/stdtypes.rst:4923 +msgid "Cast 1D/unsigned bytes to 1D/char::" +msgstr "1次元 unsigned byte から 1次元 char へのキャスト::" + +#: ../../builtins/stdtypes.rst:4925 +msgid "" +">>> b = bytearray(b'zyz')\n" +">>> x = memoryview(b)\n" +">>> x[0] = b'a'\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: memoryview: invalid type for format 'B'\n" +">>> y = x.cast('c')\n" +">>> y[0] = b'a'\n" +">>> b\n" +"bytearray(b'ayz')" +msgstr "" + +#: ../../builtins/stdtypes.rst:4936 +msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" +msgstr "1次元 byte から 3次元 int へ、そして 1次元 signed char へのキャスト::" + +#: ../../builtins/stdtypes.rst:4938 +msgid "" +">>> import struct\n" +">>> buf = struct.pack(\"i\"*12, *list(range(12)))\n" +">>> x = memoryview(buf)\n" +">>> y = x.cast('i', shape=[2,2,3])\n" +">>> y.tolist()\n" +"[[[0, 1, 2], [3, 4, 5]], [[6, 7, 8], [9, 10, 11]]]\n" +">>> y.format\n" +"'i'\n" +">>> y.itemsize\n" +"4\n" +">>> len(y)\n" +"2\n" +">>> y.nbytes\n" +"48\n" +">>> z = y.cast('b')\n" +">>> z.format\n" +"'b'\n" +">>> z.itemsize\n" +"1\n" +">>> len(z)\n" +"48\n" +">>> z.nbytes\n" +"48" +msgstr "" + +#: ../../builtins/stdtypes.rst:4962 +msgid "Cast 1D/unsigned long to 2D/unsigned long::" +msgstr "1次元 unsigned long から 2次元 unsigned long へのキャスト::" + +#: ../../builtins/stdtypes.rst:4964 +msgid "" +">>> buf = struct.pack(\"L\"*6, *list(range(6)))\n" +">>> x = memoryview(buf)\n" +">>> y = x.cast('L', shape=[2,3])\n" +">>> len(y)\n" +"2\n" +">>> y.nbytes\n" +"48\n" +">>> y.tolist()\n" +"[[0, 1, 2], [3, 4, 5]]" +msgstr "" + +#: ../../builtins/stdtypes.rst:4976 +msgid "The source format is no longer restricted when casting to a byte view." +msgstr "単バイトのビューへキャストする場合、キャスト元のフォーマットについて制約は無くなりました。" + +#: ../../builtins/stdtypes.rst:4981 +msgid "Count the number of occurrences of *value*." +msgstr "" + +#: ../../builtins/stdtypes.rst:4987 +msgid "" +"Return the index of the first occurrence of *value* (at or after index " +"*start* and before index *stop*)." +msgstr "" + +#: ../../builtins/stdtypes.rst:4990 +msgid "Raises a :exc:`ValueError` if *value* cannot be found." +msgstr "" + +#: ../../builtins/stdtypes.rst:4994 +msgid "There are also several readonly attributes available:" +msgstr "読み出し専用の属性もいくつか使えます:" + +#: ../../builtins/stdtypes.rst:4998 +msgid "The underlying object of the memoryview::" +msgstr "memoryview が参照しているオブジェクト::" + +#: ../../builtins/stdtypes.rst:5000 +msgid "" +">>> b = bytearray(b'xyz')\n" +">>> m = memoryview(b)\n" +">>> m.obj is b\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:5009 +msgid "" +"``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " +"amount of space in bytes that the array would use in a contiguous " +"representation. It is not necessarily equal to ``len(m)``::" +msgstr "" +"``nbytes == product(shape) * itemsize == len(m.tobytes())``. " +"その配列が連続表現において利用するスペースです。これは ``len(m)`` と一致するとは限りません::" + +#: ../../builtins/stdtypes.rst:5013 +msgid "" +">>> import array\n" +">>> a = array.array('i', [1,2,3,4,5])\n" +">>> m = memoryview(a)\n" +">>> len(m)\n" +"5\n" +">>> m.nbytes\n" +"20\n" +">>> y = m[::2]\n" +">>> len(y)\n" +"3\n" +">>> y.nbytes\n" +"12\n" +">>> len(y.tobytes())\n" +"12" +msgstr "" + +#: ../../builtins/stdtypes.rst:5028 +msgid "Multi-dimensional arrays::" +msgstr "多次元配列::" + +#: ../../builtins/stdtypes.rst:5030 +msgid "" +">>> import struct\n" +">>> buf = struct.pack(\"d\"*12, *[1.5*x for x in range(12)])\n" +">>> x = memoryview(buf)\n" +">>> y = x.cast('d', shape=[3,4])\n" +">>> y.tolist()\n" +"[[0.0, 1.5, 3.0, 4.5], [6.0, 7.5, 9.0, 10.5], [12.0, 13.5, 15.0, 16.5]]\n" +">>> len(y)\n" +"3\n" +">>> y.nbytes\n" +"96" +msgstr "" + +#: ../../builtins/stdtypes.rst:5045 +msgid "A bool indicating whether the memory is read only." +msgstr "メモリが読み出し専用かどうかを示す真偽値です。" + +#: ../../builtins/stdtypes.rst:5049 +msgid "" +"A string containing the format (in :mod:`struct` module style) for each " +"element in the view. A memoryview can be created from exporters with " +"arbitrary format strings, but some methods (e.g. :meth:`tolist`) are " +"restricted to native single element formats." +msgstr "" +"ビューの中の各要素に対する (:mod:`struct` モジュールスタイルの) フォーマットを含む文字列。 memoryview " +"は、任意のフォーマット文字列を使ってエクスポーターから作成することができます。しかし、いくつかのメソッド(例えば :meth:`tolist`) " +"はネイティブの単一要素フォーマットに制限されます。" + +#: ../../builtins/stdtypes.rst:5054 +msgid "" +"format ``'B'`` is now handled according to the struct module syntax. This " +"means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." +msgstr "" +"フォーマット ``'B'`` は struct モジュール構文で扱われるようになりました。これは ``memoryview(b'abc')[0] == " +"b'abc'[0] == 97`` ということを意味します。" + +#: ../../builtins/stdtypes.rst:5060 +msgid "The size in bytes of each element of the memoryview::" +msgstr "memoryview の各要素のバイト単位の大きさ::" + +#: ../../builtins/stdtypes.rst:5062 +msgid "" +">>> import array, struct\n" +">>> m = memoryview(array.array('H', [32000, 32001, 32002]))\n" +">>> m.itemsize\n" +"2\n" +">>> m[0]\n" +"32000\n" +">>> struct.calcsize('H') == m.itemsize\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:5073 +msgid "" +"An integer indicating how many dimensions of a multi-dimensional array the " +"memory represents." +msgstr "メモリが表す多次元配列が何次元かを示す整数です。" + +#: ../../builtins/stdtypes.rst:5078 +msgid "" +"A tuple of integers the length of :attr:`ndim` giving the shape of the " +"memory as an N-dimensional array." +msgstr "メモリが表している N 次元配列の形状を表す、長さ :attr:`ndim` の整数のタプルです。" + +#: ../../builtins/stdtypes.rst:5081 ../../builtins/stdtypes.rst:5089 +msgid "An empty tuple instead of ``None`` when ndim = 0." +msgstr "ndim = 0 の場合は ``None`` ではなく空のタプルとなるよう変更されました。" + +#: ../../builtins/stdtypes.rst:5086 +msgid "" +"A tuple of integers the length of :attr:`ndim` giving the size in bytes to " +"access each element for each dimension of the array." +msgstr "配列のそれぞれの次元に対して、それぞれの要素にアクセスするのに必要なバイト数を表す、長さ :attr:`ndim` の整数のタプルです。" + +#: ../../builtins/stdtypes.rst:5094 +msgid "Used internally for PIL-style arrays. The value is informational only." +msgstr "PILスタイルの配列の内部で利用している値。この値はただの情報として公開されています。" + +#: ../../builtins/stdtypes.rst:5098 +msgid "A bool indicating whether the memory is C-:term:`contiguous`." +msgstr "メモリーが C 形式の順序で連続しているかどうかを示す真偽値(参考: :term:`contiguous` )。" + +#: ../../builtins/stdtypes.rst:5104 +msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." +msgstr "メモリーがFortran形式の順序で連続しているかどうかを示す真偽値(参考: :term:`contiguous` )。" + +#: ../../builtins/stdtypes.rst:5110 +msgid "A bool indicating whether the memory is :term:`contiguous`." +msgstr "メモリーが連続しているかどうかを示す真偽値(参考: :term:`contiguous` )。" + +#: ../../builtins/stdtypes.rst:5114 +msgid "" +"For information on the thread safety of :class:`memoryview` objects in the " +":term:`free-threaded build`, see :ref:`thread-safety-memoryview`." +msgstr "" + +#: ../../builtins/stdtypes.rst:5121 +msgid "Set Types --- :class:`set`, :class:`frozenset`" +msgstr "set(集合)型 --- :class:`set`, :class:`frozenset`" + +#: ../../builtins/stdtypes.rst:5125 +msgid "" +"A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " +"objects. Common uses include membership testing, removing duplicates from a " +"sequence, and computing mathematical operations such as intersection, union," +" difference, and symmetric difference. (For other containers see the built-" +"in :class:`dict`, :class:`list`, and :class:`tuple` classes, and the " +":mod:`collections` module.) See :ref:`time-complexity` for the costs of the " +"various set operations." +msgstr "" + +#: ../../builtins/stdtypes.rst:5133 +msgid "" +"Like other collections, sets support ``x in set``, ``len(set)``, and ``for x" +" in set``. Being an unordered collection, sets do not record element " +"position or order of insertion. Accordingly, sets do not support indexing, " +"slicing, or other sequence-like behavior." +msgstr "" +"集合は、他のコレクションと同様、 ``x in set``, ``len(set)``, ``for x in set`` " +"をサポートします。コレクションには順序がないので、集合は挿入の順序や要素の位置を記録しません。従って、集合はインデクシング、スライシング、その他のシーケンス的な振舞いをサポートしません。" + +#: ../../builtins/stdtypes.rst:5138 +msgid "" +"There are currently two built-in set types, :class:`set` and " +":class:`frozenset`. The :class:`set` type is mutable --- the contents can be" +" changed using methods like :meth:`~set.add` and :meth:`~set.remove`. Since " +"it is mutable, it has no hash value and cannot be used as either a " +"dictionary key or as an element of another set. The :class:`frozenset` type " +"is immutable and :term:`hashable` --- its contents cannot be altered after " +"it is created; it can therefore be used as a dictionary key or as an element" +" of another set." +msgstr "" + +#: ../../builtins/stdtypes.rst:5147 +msgid "" +"Non-empty sets (not frozensets) can be created by placing a comma-separated " +"list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " +"addition to the :class:`set` constructor." +msgstr "" +"空でない :class:`set` (:class:`frozenset` ではない) は、:class:`set` " +"コンストラクタに加え、要素を波括弧中にカンマで区切って列挙することでも生成できます。例: ``{'jack', 'sjoerd'}``。" + +#: ../../builtins/stdtypes.rst:5151 +msgid "The constructors for both classes work the same:" +msgstr "どちらのクラスのコンストラクタも同様に働きます:" + +#: ../../builtins/stdtypes.rst:5156 +msgid "" +"Return a new set or frozenset object whose elements are taken from " +"*iterable*. The elements of a set must be :term:`hashable`. To represent " +"sets of sets, the inner sets must be :class:`frozenset` objects. If " +"*iterable* is not specified, a new empty set is returned." +msgstr "" +"*iterable* から要素を取り込んだ、新しい :class:`set` もしくは :class:`frozenset` オブジェクトを返します。 " +"集合の要素は :term:`ハッシュ可能 ` なものでなくてはなりません。集合の集合を表現するためには、内側の集合は " +":class:`frozenset` オブジェクトでなくてはなりません。*iterable* が指定されない場合、新しい空の集合が返されます。" + +#: ../../builtins/stdtypes.rst:5162 +msgid "Sets can be created by several means:" +msgstr "集合はいくつかの方法で生成できます:" + +#: ../../builtins/stdtypes.rst:5164 +msgid "" +"Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" +msgstr "波括弧内にカンマ区切りで要素を列挙する: ``{'jack', 'sjoerd'}``" + +#: ../../builtins/stdtypes.rst:5165 +msgid "" +"Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" +msgstr "集合内包表記を使う: ``{c for c in 'abracadabra' if c not in 'abc'}``" + +#: ../../builtins/stdtypes.rst:5166 +msgid "" +"Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " +"'foo'])``" +msgstr "型コンストラクタを使う: ``set()``, ``set('foobar')``, ``set(['a', 'b', 'foo'])``" + +#: ../../builtins/stdtypes.rst:5168 +msgid "" +"Instances of :class:`set` and :class:`frozenset` provide the following " +"operations:" +msgstr ":class:`set` および :class:`frozenset` のインスタンスは以下の操作を提供します:" + +#: ../../builtins/stdtypes.rst:5173 +msgid "Return the number of elements in set *s* (cardinality of *s*)." +msgstr "集合 *s* の要素数 (*s* の濃度) を返します。" + +#: ../../builtins/stdtypes.rst:5177 +msgid "Test *x* for membership in *s*." +msgstr "*x* が *s* のメンバーに含まれるか判定します。" + +#: ../../builtins/stdtypes.rst:5181 +msgid "Test *x* for non-membership in *s*." +msgstr "*x* が *s* のメンバーに含まれていないことを判定します。" + +#: ../../builtins/stdtypes.rst:5186 +msgid "" +"Return ``True`` if the set has no elements in common with *other*. Sets are" +" disjoint if and only if their intersection is the empty set." +msgstr "" +"集合が *other* と共通の要素を持たないとき、``True`` を返します。集合はそれらの積集合が空集合となるときのみ、互いに素 " +"(disjoint) となります。" + +#: ../../builtins/stdtypes.rst:5193 +msgid "Test whether every element in the set is in *other*." +msgstr "set の全ての要素が *other* に含まれるか判定します。" + +#: ../../builtins/stdtypes.rst:5197 +msgid "" +"Test whether the set is a proper subset of *other*, that is, ``set <= other " +"and set != other``." +msgstr "" +"set が *other* の真部分集合であるかを判定します。つまり、 ``set <= other and set != other`` と等価です。" + +#: ../../builtins/stdtypes.rst:5204 +msgid "Test whether every element in *other* is in the set." +msgstr "*other* の全ての要素が set に含まれるか判定します。" + +#: ../../builtins/stdtypes.rst:5208 +msgid "" +"Test whether the set is a proper superset of *other*, that is, ``set >= " +"other and set != other``." +msgstr "" +"set が *other* の真上位集合であるかを判定します。つまり、 ``set >= other and set != other`` と等価です。" + +#: ../../builtins/stdtypes.rst:5215 +msgid "Return a new set with elements from the set and all others." +msgstr "set と全ての other の要素からなる新しい集合を返します。" + +#: ../../builtins/stdtypes.rst:5221 +msgid "Return a new set with elements common to the set and all others." +msgstr "set と全ての other に共通する要素を持つ、新しい集合を返します。" + +#: ../../builtins/stdtypes.rst:5227 +msgid "Return a new set with elements in the set that are not in the others." +msgstr "set に含まれて、かつ、全ての other に含まれない要素を持つ、新しい集合を返します。" + +#: ../../builtins/stdtypes.rst:5233 +msgid "" +"Return a new set with elements in either the set or *other* but not both." +msgstr "set と *other* のいずれか一方だけに含まれる要素を持つ新しい集合を返します。" + +#: ../../builtins/stdtypes.rst:5238 +msgid "Return a shallow copy of the set." +msgstr "集合の浅いコピーを返します。" + +#: ../../builtins/stdtypes.rst:5241 +msgid "" +"Note, the non-operator versions of :meth:`~frozenset.union`, " +":meth:`~frozenset.intersection`, :meth:`~frozenset.difference`, " +":meth:`~frozenset.symmetric_difference`, :meth:`~frozenset.issubset`, and " +":meth:`~frozenset.issuperset` methods will accept any iterable as an " +"argument. In contrast, their operator based counterparts require their " +"arguments to be sets. This precludes error-prone constructions like " +"``set('abc') & 'cbs'`` in favor of the more readable " +"``set('abc').intersection('cbs')``." +msgstr "" + +#: ../../builtins/stdtypes.rst:5248 +msgid "" +"Both :class:`set` and :class:`frozenset` support set to set comparisons. Two" +" sets are equal if and only if every element of each set is contained in the" +" other (each is a subset of the other). A set is less than another set if " +"and only if the first set is a proper subset of the second set (is a subset," +" but is not equal). A set is greater than another set if and only if the " +"first set is a proper superset of the second set (is a superset, but is not " +"equal)." +msgstr "" +":class:`set` と :class:`frozenset` " +"のどちらも、集合同士の比較をサポートします。二つの集合は、それぞれの集合の要素全てが他方にも含まれている (互いに他方の部分集合である) " +"とき、かつそのときに限り等しいです。一方の集合が他方の集合の真部分集合である (部分集合であるが等しくない) " +"とき、かつそのときに限り一方の集合は他方の集合より小さいです。一方の集合が他方の集合の真上位集合である (上位集合であるが等しくない) " +"とき、かつそのときに限り一方の集合は他方の集合より大きいです。" + +#: ../../builtins/stdtypes.rst:5255 +msgid "" +"Instances of :class:`set` are compared to instances of :class:`frozenset` " +"based on their members. For example, ``set('abc') == frozenset('abc')`` " +"returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``." +msgstr "" +":class:`set` のインスタンスは、 :class:`frozenset` のインスタンスと、要素に基づいて比較されます。例えば、 " +"``set('abc') == frozenset('abc')`` や ``set('abc') in " +"set([frozenset('abc')])`` は ``True`` を返します。" + +#: ../../builtins/stdtypes.rst:5259 +msgid "" +"The subset and equality comparisons do not generalize to a total ordering " +"function. For example, any two nonempty disjoint sets are not equal and are" +" not subsets of each other, so *all* of the following return ``False``: " +"``ab``." +msgstr "" +"部分集合と等価性の比較は全順序付けを行う関数へと一般化することはできません。例えば、互いに素である二つの非空集合は、等しくなく、他方の部分集合でもありませんから、以下の" +" *すべて* に ``False`` を返します: ``ab``." + +#: ../../builtins/stdtypes.rst:5264 +msgid "" +"Since sets only define partial ordering (subset relationships), the output " +"of the :meth:`list.sort` method is undefined for lists of sets." +msgstr "集合は半順序(部分集合関係)しか定義しないので、集合のリストにおける :meth:`list.sort` メソッドの出力は未定義です。" + +#: ../../builtins/stdtypes.rst:5267 +msgid "Set elements, like dictionary keys, must be :term:`hashable`." +msgstr "集合の要素は、辞書のキーのように、 :term:`ハッシュ可能 ` でなければなりません。" + +#: ../../builtins/stdtypes.rst:5269 +msgid "" +"Binary operations that mix :class:`set` instances with :class:`frozenset` " +"return the type of the first operand. For example: ``frozenset('ab') | " +"set('bc')`` returns an instance of :class:`frozenset`." +msgstr "" +":class:`set` インスタンスと :class:`frozenset` " +"インスタンスを取り混ぜての二項演算は、第一被演算子の型を返します。例えば: ``frozenset('ab') | set('bc')`` は " +":class:`frozenset` インスタンスを返します。" + +#: ../../builtins/stdtypes.rst:5273 +msgid "" +"The following table lists operations available for :class:`set` that do not " +"apply to immutable instances of :class:`frozenset`:" +msgstr "" +"以下の表に挙げる演算は :class:`set` に適用されますが、:class:`frozenset` " +"のイミュータブルなインスタンスには適用されません:" + +#: ../../builtins/stdtypes.rst:5279 +msgid "Update the set, adding elements from all others." +msgstr "全ての other の要素を追加し、 set を更新します。" + +#: ../../builtins/stdtypes.rst:5284 +msgid "Update the set, keeping only elements found in it and all others." +msgstr "元の set と全ての other に共通する要素だけを残して set を更新します。" + +#: ../../builtins/stdtypes.rst:5289 +msgid "Update the set, removing elements found in others." +msgstr "*other* に含まれる要素を取り除き、 set を更新します。" + +#: ../../builtins/stdtypes.rst:5294 +msgid "" +"Update the set, keeping only elements found in either set, but not in both." +msgstr "どちらかにのみ含まれて、共通には持たない要素のみで set を更新します。" + +#: ../../builtins/stdtypes.rst:5298 +msgid "Add element *elem* to the set." +msgstr "要素 *elem* を set に追加します。" + +#: ../../builtins/stdtypes.rst:5302 +msgid "" +"Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not" +" contained in the set." +msgstr "" +"要素 *elem* を set から取り除きます。*elem* が set に含まれていなければ :exc:`KeyError` を送出します。" + +#: ../../builtins/stdtypes.rst:5307 +msgid "Remove element *elem* from the set if it is present." +msgstr "要素 *elem* が set に含まれていれば、取り除きます。" + +#: ../../builtins/stdtypes.rst:5311 +msgid "" +"Remove and return an arbitrary element from the set. Raises :exc:`KeyError`" +" if the set is empty." +msgstr "*s* から任意の要素を取り除き、それを返します。集合が空の場合、 :exc:`KeyError` を送出します" + +#: ../../builtins/stdtypes.rst:5316 +msgid "Remove all elements from the set." +msgstr "set の全ての要素を取り除きます。" + +#: ../../builtins/stdtypes.rst:5319 +msgid "" +"Note, the non-operator versions of the :meth:`~set.update`, " +":meth:`~set.intersection_update`, :meth:`~set.difference_update`, and " +":meth:`~set.symmetric_difference_update` methods will accept any iterable as" +" an argument." +msgstr "" + +#: ../../builtins/stdtypes.rst:5324 +msgid "" +"Note, the *elem* argument to the :meth:`~object.__contains__`, " +":meth:`~set.remove`, and :meth:`~set.discard` methods may be a set. To " +"support searching for an equivalent frozenset, a temporary one is created " +"from *elem*." +msgstr "" + +#: ../../builtins/stdtypes.rst:5329 +msgid "" +"Sets and frozensets are :ref:`generic ` over the type of their " +"elements." +msgstr "" + +#: ../../builtins/stdtypes.rst:5333 +msgid "" +"For detailed information on thread-safety guarantees for :class:`set` " +"objects, see :ref:`thread-safety-set`." +msgstr "" + +#: ../../builtins/stdtypes.rst:5340 +msgid "Mapping types --- :class:`!dict`, :class:`!frozendict`" +msgstr "" + +#: ../../builtins/stdtypes.rst:5350 +msgid "" +"A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " +"There are currently two standard mapping types, the :dfn:`dictionary` and " +":class:`frozendict`. (For other containers see the built-in :class:`list`, " +":class:`set`, and :class:`tuple` classes, and the :mod:`collections` " +"module.) See :ref:`time-complexity` for the costs of the various dictionary " +"operations." +msgstr "" + +#: ../../builtins/stdtypes.rst:5359 +msgid "" +"A dictionary's keys are *almost* arbitrary values. Values that are not " +":term:`hashable`, that is, values containing lists, dictionaries or other " +"mutable types (that are compared by value rather than by object identity) " +"may not be used as keys. Values that compare equal (such as ``1``, ``1.0``, " +"and ``True``) can be used interchangeably to index the same dictionary " +"entry." +msgstr "" +"辞書のキーには、 *ほぼ* どんな値も使うことができます。\n" +"キーとして使えないのは、 :term:`hashable` (ハッシュ可能) でない値、すなわちリストや辞書のようなミュータブルな型 (内包する値ではなくオブジェクト自体が同一であるかによって比較が行われるような型)です。\n" +"比較した際に等しいとみなされる値 (例えば ``1`` と ``1.0`` と ``True``) は、どれを使っても同じエントリーに関連付けられます。" + +#: ../../builtins/stdtypes.rst:5370 +msgid "" +"Return a new dictionary initialized from an optional positional argument and" +" a possibly empty set of keyword arguments." +msgstr "オプションの位置引数と空の可能性もあるキーワード引数の集合により初期化された新しい辞書を返します。" + +#: ../../builtins/stdtypes.rst:5373 +msgid "Dictionaries can be created by several means:" +msgstr "辞書はいくつかの方法で生成できます:" + +#: ../../builtins/stdtypes.rst:5375 +msgid "" +"Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack':" +" 4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" +msgstr "" +"波括弧内にカンマ区切りで ``key: value`` 対を列挙する: ``{'jack': 4098, 'sjoerd': 4127}`` あるいは " +"``{4098: 'jack', 4127: 'sjoerd'}``" + +#: ../../builtins/stdtypes.rst:5377 +msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" +msgstr "辞書内包表記を使う: ``{}``, ``{x: x ** 2 for x in range(10)}``" + +#: ../../builtins/stdtypes.rst:5378 +msgid "" +"Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " +"200)])``, ``dict(foo=100, bar=200)``" +msgstr "" +"型コンストラクタを使う: ``dict()``, ``dict([('foo', 100), ('bar', 200)])``, " +"``dict(foo=100, bar=200)``" + +#: ../../builtins/stdtypes.rst:5381 +msgid "" +"If no positional argument is given, an empty dictionary is created. If a " +"positional argument is given and it defines a ``keys()`` method, a " +"dictionary is created by calling :meth:`~object.__getitem__` on the argument" +" with each returned key from the method. Otherwise, the positional argument" +" must be an :term:`iterable` object. Each item in the iterable must itself " +"be an iterable with exactly two elements. The first element of each item " +"becomes a key in the new dictionary, and the second element the " +"corresponding value. If a key occurs more than once, the last value for " +"that key becomes the corresponding value in the new dictionary." +msgstr "" + +#: ../../builtins/stdtypes.rst:5391 +msgid "" +"If keyword arguments are given, the keyword arguments and their values are " +"added to the dictionary created from the positional argument. If a key " +"being added is already present, the value from the keyword argument replaces" +" the value from the positional argument." +msgstr "" +"キーワード引数が与えられた場合、キーワード引数とその値が位置引数から作られた辞書に追加されます。既に存在しているキーが追加された場合、キーワード引数の値は位置引数の値を置き換えます。" + +#: ../../builtins/stdtypes.rst:5396 +msgid "" +"Dictionaries compare equal if and only if they have the same ``(key, " +"value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>='," +" '>') raise :exc:`TypeError`. To illustrate dictionary creation and " +"equality, the following examples all return a dictionary equal to " +"``{\"one\": 1, \"two\": 2, \"three\": 3}``::" +msgstr "" + +#: ../../builtins/stdtypes.rst:5402 +msgid "" +">>> a = dict(one=1, two=2, three=3)\n" +">>> b = {'one': 1, 'two': 2, 'three': 3}\n" +">>> c = dict(zip(['one', 'two', 'three'], [1, 2, 3]))\n" +">>> d = dict([('two', 2), ('one', 1), ('three', 3)])\n" +">>> e = dict({'three': 3, 'one': 1, 'two': 2})\n" +">>> f = dict({'one': 1, 'three': 3}, two=2)\n" +">>> a == b == c == d == e == f\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:5411 +msgid "" +"Providing keyword arguments as in the first example only works for keys that" +" are valid Python identifiers. Otherwise, any valid keys can be used." +msgstr "" +"最初の例のようにキーワード引数を与える方法では、キーは有効な Python " +"の識別子でなければなりません。それ以外の方法では、辞書のキーとして有効などんなキーでも使えます。" + +#: ../../builtins/stdtypes.rst:5414 +msgid "" +"Dictionaries preserve insertion order. Note that updating a key does not " +"affect the order. Keys added after deletion are inserted at the end. ::" +msgstr "" +"辞書は挿入順序を保存するようになりました。\n" +"キーの更新は順序には影響が無いことに注意してください。\n" +"いったん削除されてから再度追加されたキーは末尾に挿入されます。::" + +#: ../../builtins/stdtypes.rst:5417 +msgid "" +">>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\n" +">>> d\n" +"{'one': 1, 'two': 2, 'three': 3, 'four': 4}\n" +">>> list(d)\n" +"['one', 'two', 'three', 'four']\n" +">>> list(d.values())\n" +"[1, 2, 3, 4]\n" +">>> d[\"one\"] = 42\n" +">>> d\n" +"{'one': 42, 'two': 2, 'three': 3, 'four': 4}\n" +">>> del d[\"two\"]\n" +">>> d[\"two\"] = None\n" +">>> d\n" +"{'one': 42, 'three': 3, 'four': 4, 'two': None}" +msgstr "" + +#: ../../builtins/stdtypes.rst:5432 +msgid "" +"Dictionary order is guaranteed to be insertion order. This behavior was an " +"implementation detail of CPython from 3.6." +msgstr "辞書の順序が挿入順序であることが保証されるようになりました。この振る舞いは CPython 3.6 の実装詳細でした。" + +#: ../../builtins/stdtypes.rst:5436 +msgid "" +"Dictionaries are :ref:`generic ` over two types, signifying " +"(respectively) the types of the dictionary's keys and values." +msgstr "" + +#: ../../builtins/stdtypes.rst:5439 +msgid "" +"These are the operations that dictionaries support (and therefore, custom " +"mapping types should support too):" +msgstr "以下は辞書型がサポートする操作です (それゆえ、カスタムのマップ型もこれらの操作をサポートするべきです):" + +#: ../../builtins/stdtypes.rst:5444 +msgid "Return a list of all the keys used in the dictionary *d*." +msgstr "辞書 *d* で使われている全てのキーのリストを返します。" + +#: ../../builtins/stdtypes.rst:5448 +msgid "Return the number of items in the dictionary *d*." +msgstr "辞書 *d* の項目数を返します。" + +#: ../../builtins/stdtypes.rst:5452 +msgid "" +"Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is" +" not in the map." +msgstr "*d* のキー *key* の項目を返します。マップに *key* が存在しなければ、 :exc:`KeyError` を送出します。" + +#: ../../builtins/stdtypes.rst:5457 +msgid "" +"If a subclass of dict defines a method :meth:`~object.__missing__` and *key*" +" is not present, the ``d[key]`` operation calls that method with the key " +"*key* as argument. The ``d[key]`` operation then returns or raises whatever" +" is returned or raised by the ``__missing__(key)`` call. No other operations" +" or methods invoke :meth:`~object.__missing__`. If " +":meth:`~object.__missing__` is not defined, :exc:`KeyError` is raised. " +":meth:`~object.__missing__` must be a method; it cannot be an instance " +"variable::" +msgstr "" + +#: ../../builtins/stdtypes.rst:5465 +msgid "" +">>> class Counter(dict):\n" +"... def __missing__(self, key):\n" +"... return 0\n" +"...\n" +">>> c = Counter()\n" +">>> c['red']\n" +"0\n" +">>> c['red'] += 1\n" +">>> c['red']\n" +"1" +msgstr "" + +#: ../../builtins/stdtypes.rst:5476 +msgid "" +"The example above shows part of the implementation of " +":class:`collections.Counter`. A different :meth:`!__missing__` method is " +"used by :class:`collections.defaultdict`." +msgstr "" + +#: ../../builtins/stdtypes.rst:5483 +msgid "Set ``d[key]`` to *value*." +msgstr "``d[key]`` に *value* を設定します。" + +#: ../../builtins/stdtypes.rst:5487 +msgid "" +"Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the" +" map." +msgstr "*d* から ``d[key]`` を削除します。マップに *key* が存在しなければ、 :exc:`KeyError` を送出します。" + +#: ../../builtins/stdtypes.rst:5492 +msgid "Return ``True`` if *d* has a key *key*, else ``False``." +msgstr "*d* がキー *key* を持っていれば ``True`` を、そうでなければ、 ``False`` を返します。" + +#: ../../builtins/stdtypes.rst:5496 +msgid "Equivalent to ``not key in d``." +msgstr "``not key in d`` と等価です。" + +#: ../../builtins/stdtypes.rst:5500 +msgid "" +"Return an iterator over the keys of the dictionary. This is a shortcut for " +"``iter(d.keys())``." +msgstr "辞書のキーに渡るイテレータを返します。これは ``iter(d.keys())`` へのショートカットです。" + +#: ../../builtins/stdtypes.rst:5505 +msgid "Remove all items from the dictionary." +msgstr "辞書の全ての項目を消去します。" + +#: ../../builtins/stdtypes.rst:5509 +msgid "Return a shallow copy of the dictionary." +msgstr "辞書の浅いコピーを返します。" + +#: ../../builtins/stdtypes.rst:5513 +msgid "" +"Create a new dictionary with keys from *iterable* and values set to *value*." +msgstr "*iterable* からキーを取り、値を *value* に設定した、新しい辞書を作成します。" + +#: ../../builtins/stdtypes.rst:5515 +msgid "" +":meth:`fromkeys` is a class method that returns a new dictionary. *value* " +"defaults to ``None``. All of the values refer to just a single instance, so" +" it generally doesn't make sense for *value* to be a mutable object such as " +"an empty list. To get distinct values, use a :ref:`dict comprehension " +"` instead." +msgstr "" +":meth:`fromkeys` は新しい辞書を返すクラスメソッドです。\n" +"*value* はデフォルトで ``None`` となります。\n" +"作られる辞書内のすべての値が同一のインスタンスを指すことになるため、*value* にミュータブルなオブジェクト (例えば空のリスト) を指定しても通常意味はありません。\n" +"別々の値を指すようにしたい場合は、代わりに :ref:`辞書内包表記 ` を使用してください。" + +#: ../../builtins/stdtypes.rst:5523 +msgid "" +"Return the value for *key* if *key* is in the dictionary, else *default*. If" +" *default* is not given, it defaults to ``None``, so that this method never " +"raises a :exc:`KeyError`." +msgstr "" +"*key* が辞書にあれば *key* に対する値を、そうでなければ *default* を返します。 *default* " +"が与えられなかった場合、デフォルトでは ``None`` となります。そのため、このメソッドは :exc:`KeyError` " +"を送出することはありません。" + +#: ../../builtins/stdtypes.rst:5529 +msgid "" +"Return a new view of the dictionary's items (``(key, value)`` pairs). See " +"the :ref:`documentation of view objects `." +msgstr "" +"辞書の項目 (``(key, value)`` 対) の新しいビューを返します。:ref:`ビューオブジェクトのドキュメント `" +" を参照してください。" + +#: ../../builtins/stdtypes.rst:5534 +msgid "" +"Return a new view of the dictionary's keys. See the :ref:`documentation of " +"view objects `." +msgstr "辞書のキーの新しいビューを返します。:ref:`ビューオブジェクトのドキュメント ` を参照してください。" + +#: ../../builtins/stdtypes.rst:5540 +msgid "" +"If *key* is in the dictionary, remove it and return its value, else return " +"*default*. If *default* is not given and *key* is not in the dictionary, a " +":exc:`KeyError` is raised." +msgstr "" +"*key* が辞書に存在すればその値を辞書から消去して返し、そうでなければ *default* を返します。 *default* が与えられず、かつ " +"*key* が辞書に存在しなければ :exc:`KeyError` を送出します。" + +#: ../../builtins/stdtypes.rst:5546 +msgid "" +"Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " +"returned in :abbr:`LIFO (last-in, first-out)` order." +msgstr "" +"任意の ``(key, value)`` 対を辞書から消去して返します。\n" +"対は :abbr:`LIFO (後入れ、先出し)` の順序で返却されます。" + +#: ../../builtins/stdtypes.rst:5549 +msgid "" +":meth:`popitem` is useful to destructively iterate over a dictionary, as " +"often used in set algorithms. If the dictionary is empty, calling " +":meth:`popitem` raises a :exc:`KeyError`." +msgstr "" +"集合のアルゴリズムで使われるのと同じように、 :meth:`popitem` は辞書に繰り返し適用して消去するのに便利です。辞書が空であれば、 " +":meth:`popitem` の呼び出しは :exc:`KeyError` を送出します。" + +#: ../../builtins/stdtypes.rst:5553 +msgid "" +"LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " +"return an arbitrary key/value pair." +msgstr "" +"LIFO 順序が保証されるようになりました。\n" +"以前のバージョンでは、 :meth:`popitem` は任意の key/value 対を返していました。" + +#: ../../builtins/stdtypes.rst:5559 +msgid "" +"Return a reverse iterator over the keys of the dictionary. This is a " +"shortcut for ``reversed(d.keys())``." +msgstr "辞書のキーに渡る逆イテレータを返します。これは ``reversed(d.keys())`` へのショートカットです。" + +#: ../../builtins/stdtypes.rst:5566 +msgid "" +"If *key* is in the dictionary, return its value. If not, insert *key* with " +"a value of *default* and return *default*. *default* defaults to ``None``." +msgstr "" +"もし、 *key* が辞書に存在すれば、その値を返します。そうでなければ、値を *default* として *key* を挿入し、 *default* " +"を返します。 *default* のデフォルトは ``None`` です。" + +#: ../../builtins/stdtypes.rst:5574 +msgid "" +"Update the dictionary with the key/value pairs from *mapping* or *iterable* " +"and *kwargs*, overwriting existing keys. Return ``None``." +msgstr "" + +#: ../../builtins/stdtypes.rst:5577 +msgid "" +":meth:`update` accepts either another object with a ``keys()`` method (in " +"which case :meth:`~object.__getitem__` is called with every key returned " +"from the method) or an iterable of key/value pairs (as tuples or other " +"iterables of length two). If keyword arguments are specified, the dictionary" +" is then updated with those key/value pairs: ``d.update(red=1, blue=2)``." +msgstr "" + +#: ../../builtins/stdtypes.rst:5585 +msgid "" +"Return a new view of the dictionary's values. See the :ref:`documentation " +"of view objects `." +msgstr "辞書の値の新しいビューを返します。:ref:`ビューオブジェクトのドキュメント ` を参照してください。" + +#: ../../builtins/stdtypes.rst:5588 +msgid "" +"An equality comparison between one ``dict.values()`` view and another will " +"always return ``False``. This also applies when comparing ``dict.values()`` " +"to itself::" +msgstr "" +"``dict.values()`` で得られた2つのビューの等しさを比較すると、必ず ``False`` が返ります。\n" +"``dict.values()`` どうしを比較したときも同様です::" + +#: ../../builtins/stdtypes.rst:5592 +msgid "" +">>> d = {'a': 1}\n" +">>> d.values() == d.values()\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:5598 +msgid "" +"Create a new dictionary with the merged keys and values of *d* and *other*, " +"which must both be dictionaries. The values of *other* take priority when " +"*d* and *other* share keys." +msgstr "" +"*d* と *other* のキーと値を統合した新しい辞書を作成します。\n" +"*d* と *other* のキーに重複がある場合は、 *other* の方の値が優先されます。" + +#: ../../builtins/stdtypes.rst:5606 +msgid "" +"Update the dictionary *d* with keys and values from *other*, which may be " +"either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " +"values of *other* take priority when *d* and *other* share keys." +msgstr "" +"辞書 *d* のキーと値を *other* で更新します。\n" +"*other* は :term:`マッピング ` か、またはキーと値のペアの :term:`イテラブル ` です。\n" +"*d* と *other* のキーに重複がある場合は、 *other* の方の値が優先されます。" + +#: ../../builtins/stdtypes.rst:5612 +msgid "Dictionaries and dictionary views are reversible. ::" +msgstr "辞書と辞書のビューは ``reversed()`` で順序を逆にすることができます::" + +#: ../../builtins/stdtypes.rst:5614 +msgid "" +">>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\n" +">>> d\n" +"{'one': 1, 'two': 2, 'three': 3, 'four': 4}\n" +">>> list(reversed(d))\n" +"['four', 'three', 'two', 'one']\n" +">>> list(reversed(d.values()))\n" +"[4, 3, 2, 1]\n" +">>> list(reversed(d.items()))\n" +"[('four', 4), ('three', 3), ('two', 2), ('one', 1)]" +msgstr "" + +#: ../../builtins/stdtypes.rst:5624 +msgid "Dictionaries are now reversible." +msgstr "辞書がリバース可能になりました。" + +#: ../../builtins/stdtypes.rst:5629 +msgid "" +":class:`frozendict` and :class:`types.MappingProxyType` can be used to " +"create a read-only view of a :class:`dict`." +msgstr "" + +#: ../../builtins/stdtypes.rst:5634 +msgid "" +"For detailed information on thread-safety guarantees for :class:`dict` " +"objects, see :ref:`thread-safety-dict`." +msgstr "" + +#: ../../builtins/stdtypes.rst:5641 +msgid "Dictionary view objects" +msgstr "辞書ビューオブジェクト" + +#: ../../builtins/stdtypes.rst:5643 +msgid "" +"The objects returned by :meth:`dict.keys`, :meth:`dict.values` and " +":meth:`dict.items` are *view objects*. They provide a dynamic view on the " +"dictionary's entries, which means that when the dictionary changes, the view" +" reflects these changes." +msgstr "" +":meth:`dict.keys`, :meth:`dict.values`, :meth:`dict.items` によって返されるオブジェクトは、 " +"*ビューオブジェクト* です。これらは、辞書の項目の動的なビューを提供し、辞書が変更された時、ビューはその変更を反映します。" + +#: ../../builtins/stdtypes.rst:5648 +msgid "" +"Dictionary views can be iterated over to yield their respective data, and " +"support membership tests:" +msgstr "辞書ビューは、イテレートすることで対応するデータを yield できます。また、帰属判定をサポートします:" + +#: ../../builtins/stdtypes.rst:5653 +msgid "Return the number of entries in the dictionary." +msgstr "辞書の項目数を返します。" + +#: ../../builtins/stdtypes.rst:5657 +msgid "" +"Return an iterator over the keys, values or items (represented as tuples of " +"``(key, value)``) in the dictionary." +msgstr "辞書のキー、値、または (``(key, value)`` のタプルとして表される) 項目に渡るイテレータを返します。" + +#: ../../builtins/stdtypes.rst:5660 +msgid "" +"Keys and values are iterated over in insertion order. This allows the " +"creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = " +"zip(d.values(), d.keys())``. Another way to create the same list is ``pairs" +" = [(v, k) for (k, v) in d.items()]``." +msgstr "" +"キーと値は挿入順序で反復されます。\n" +"これにより、 ``(value, key)`` の対の列を ``pairs = zip(d.values(), d.keys())`` のように :func:`zip` で作成できます。\n" +"同じリストを作成する他の方法は、 ``pairs = [(v, k) for (k, v) in d.items()]`` です。 " + +#: ../../builtins/stdtypes.rst:5665 +msgid "" +"Iterating views while adding or deleting entries in the dictionary may raise" +" a :exc:`RuntimeError` or fail to iterate over all entries." +msgstr "" +"辞書の項目の追加や削除中にビューをイテレートすると、 :exc:`RuntimeError` " +"を送出したり、すべての項目に渡ってイテレートできなかったりします。" + +#: ../../builtins/stdtypes.rst:5668 +msgid "Dictionary order is guaranteed to be insertion order." +msgstr "辞書の順序が挿入順序であると保証されるようになりました。" + +#: ../../builtins/stdtypes.rst:5673 +msgid "" +"Return ``True`` if *x* is in the underlying dictionary's keys, values or " +"items (in the latter case, *x* should be a ``(key, value)`` tuple)." +msgstr "" +"*x* が元の辞書のキー、値、または項目 (項目の場合、 *x* は ``(key, value)`` タプルです) にあるとき ``True`` " +"を返します。" + +#: ../../builtins/stdtypes.rst:5678 +msgid "" +"Return a reverse iterator over the keys, values or items of the dictionary. " +"The view will be iterated in reverse order of the insertion." +msgstr "" +"辞書のキーもしくは値、項目の順序を逆にしたイテレーターを返します。\n" +"戻り値のビューは、挿入された順とは逆の順でイテレートします。" + +#: ../../builtins/stdtypes.rst:5681 +msgid "Dictionary views are now reversible." +msgstr "辞書のビューがリバース可能になりました。" + +#: ../../builtins/stdtypes.rst:5686 +msgid "" +"Return a :class:`types.MappingProxyType` that wraps the original dictionary " +"to which the view refers." +msgstr "ビューの参照先の辞書をラップする :class:`types.MappingProxyType` オブジェクト を返します。" + +#: ../../builtins/stdtypes.rst:5691 +msgid "" +"Keys views are set-like since their entries are unique and :term:`hashable`." +" Items views also have set-like operations since the (key, value) pairs are " +"unique and the keys are hashable. If all values in an items view are " +"hashable as well, then the items view can interoperate with other sets. " +"(Values views are not treated as set-like since the entries are generally " +"not unique.) For set-like views, all of the operations defined for the " +"abstract base class :class:`collections.abc.Set` are available (for example," +" ``==``, ``<``, or ``^``). While using set operators, set-like views accept" +" any iterable as the other operand, unlike sets which only accept sets as " +"the input." +msgstr "" +"キーのビューは要素に重複がなくハッシュ可能 (:term:`hashable`) であるため、集合の特性を持ちます。項目のビューも、 " +"キーと値の対に重複がなく、かつキーがハッシュ可能であるため、集合的な演算を持っています。もし項目の全ての値がハッシュ可能ならば、項目のビューは集合と相互に演算することが可能です。" +" (値のビューは一般に要素に重複があるため、集合の特性を持つとはみなされません。) 集合の特性を持つビューに対しては、 " +":class:`collections.abc.Set` 抽象基底クラスで定義された全ての演算が利用可能です (たとえば ``==``, ``<`` や" +" ``^`` など)。 " +"集合演算に対しては、集合はオペランドとして集合しか取ることができないのに対して、これら集合の特性を持つビューはオペランドとして任意のイテラブルを取ることができます。" +" " + +#: ../../builtins/stdtypes.rst:5703 +msgid "An example of dictionary view usage::" +msgstr "辞書ビューの使用法の例::" + +#: ../../builtins/stdtypes.rst:5705 +msgid "" +">>> dishes = {'eggs': 2, 'sausage': 1, 'bacon': 1, 'spam': 500}\n" +">>> keys = dishes.keys()\n" +">>> values = dishes.values()\n" +"\n" +">>> # iteration\n" +">>> n = 0\n" +">>> for val in values:\n" +"... n += val\n" +"...\n" +">>> print(n)\n" +"504\n" +"\n" +">>> # keys and values are iterated over in the same order (insertion order)\n" +">>> list(keys)\n" +"['eggs', 'sausage', 'bacon', 'spam']\n" +">>> list(values)\n" +"[2, 1, 1, 500]\n" +"\n" +">>> # view objects are dynamic and reflect dict changes\n" +">>> del dishes['eggs']\n" +">>> del dishes['sausage']\n" +">>> list(keys)\n" +"['bacon', 'spam']\n" +"\n" +">>> # set operations\n" +">>> keys & {'eggs', 'bacon', 'salad'}\n" +"{'bacon'}\n" +">>> keys ^ {'sausage', 'juice'} == {'juice', 'sausage', 'bacon', 'spam'}\n" +"True\n" +">>> keys | ['juice', 'juice', 'juice'] == {'bacon', 'spam', 'juice'}\n" +"True\n" +"\n" +">>> # get back a read-only proxy for the original dictionary\n" +">>> values.mapping\n" +"mappingproxy({'bacon': 1, 'spam': 500})\n" +">>> values.mapping['spam']\n" +"500" +msgstr "" + +#: ../../builtins/stdtypes.rst:5745 +msgid "Frozen dictionaries" +msgstr "" + +#: ../../builtins/stdtypes.rst:5751 +msgid "" +"Return a new frozen dictionary initialized from an optional positional " +"argument and a possibly empty set of keyword arguments." +msgstr "" + +#: ../../builtins/stdtypes.rst:5754 +msgid "" +"A :class:`!frozendict` has a similar API to the :class:`dict` API, with the " +"following differences:" +msgstr "" + +#: ../../builtins/stdtypes.rst:5757 +msgid ":class:`!dict` has more methods than :class:`!frozendict`:" +msgstr "" + +#: ../../builtins/stdtypes.rst:5759 +msgid ":meth:`!__delitem__`" +msgstr "" + +#: ../../builtins/stdtypes.rst:5760 +msgid ":meth:`!__setitem__`" +msgstr "" + +#: ../../builtins/stdtypes.rst:5761 +msgid ":meth:`~dict.clear`" +msgstr "" + +#: ../../builtins/stdtypes.rst:5762 +msgid ":meth:`~dict.pop`" +msgstr "" + +#: ../../builtins/stdtypes.rst:5763 +msgid ":meth:`~dict.popitem`" +msgstr "" + +#: ../../builtins/stdtypes.rst:5764 +msgid ":meth:`~dict.setdefault`" +msgstr "" + +#: ../../builtins/stdtypes.rst:5765 +msgid ":meth:`~dict.update`" +msgstr "" + +#: ../../builtins/stdtypes.rst:5767 +msgid "" +"A :class:`!frozendict` can be hashed with ``hash(frozendict)`` if all keys " +"and values can be hashed." +msgstr "" + +#: ../../builtins/stdtypes.rst:5770 +msgid "" +"``frozendict |= other`` does not modify the :class:`!frozendict` in-place " +"but creates a new frozen dictionary." +msgstr "" + +#: ../../builtins/stdtypes.rst:5773 +msgid "" +":class:`!frozendict` is not a :class:`!dict` subclass but inherits directly " +"from ``object``." +msgstr "" + +#: ../../builtins/stdtypes.rst:5776 +msgid "" +"Like dictionaries, frozendicts are :ref:`generic ` over two types," +" signifying (respectively) the types of the frozendict's keys and values." +msgstr "" + +#: ../../builtins/stdtypes.rst:5781 +msgid "" +"Similar to :meth:`dict.fromkeys`, but call again the type constructor with " +"an initialized :class:`frozendict` if the type is a :class:`frozendict` " +"subclass or if the constructor returned a :class:`frozendict`." +msgstr "" + +#: ../../builtins/stdtypes.rst:5792 +msgid "Context Manager Types" +msgstr "コンテキストマネージャ型" + +#: ../../builtins/stdtypes.rst:5799 +msgid "" +"Python's :keyword:`with` statement supports the concept of a runtime context" +" defined by a context manager. This is implemented using a pair of methods " +"that allow user-defined classes to define a runtime context that is entered " +"before the statement body is executed and exited when the statement ends:" +msgstr "" +"Python の :keyword:`with` " +"文は、コンテキストマネージャによって定義される実行時コンテキストの概念をサポートします。これは、文の本体が実行される前に進入し文の終わりで脱出する実行時コンテキストを、ユーザ定義クラスが定義できるようにする一対のメソッドで実装されます:" + +#: ../../builtins/stdtypes.rst:5807 +msgid "" +"Enter the runtime context and return either this object or another object " +"related to the runtime context. The value returned by this method is bound " +"to the identifier in the :keyword:`!as` clause of :keyword:`with` statements" +" using this context manager." +msgstr "" +"実行時コンテキストに入り、このオブジェクトまたは他の実行時コンテキストに関連したオブジェクトを返します。このメソッドが返す値はこのコンテキストマネージャを使う" +" :keyword:`with` 文の :keyword:`!as` 節の識別子に束縛されます。" + +#: ../../builtins/stdtypes.rst:5812 +msgid "" +"An example of a context manager that returns itself is a :term:`file " +"object`. File objects return themselves from __enter__() to allow " +":func:`open` to be used as the context expression in a :keyword:`with` " +"statement." +msgstr "" +"自分自身を返すコンテキストマネージャの例として :term:`ファイルオブジェクト ` があります。ファイルオブジェクトは " +"__enter__() から自分自身を返し、 :func:`open` が :keyword:`with` " +"文のコンテキスト式として使われるようにします。" + +#: ../../builtins/stdtypes.rst:5816 +msgid "" +"An example of a context manager that returns a related object is the one " +"returned by :func:`decimal.localcontext`. These managers set the active " +"decimal context to a copy of the original decimal context and then return " +"the copy. This allows changes to be made to the current decimal context in " +"the body of the :keyword:`with` statement without affecting code outside the" +" :keyword:`!with` statement." +msgstr "" +"関連オブジェクトを返すコンテキストマネージャの例としては :func:`decimal.localcontext` " +"が返すものがあります。このマネージャはアクティブな10進数コンテキストをオリジナルのコンテキストのコピーにセットしてそのコピーを返します。こうすることで," +" :keyword:`with` 文の本体の内部で、:keyword:`!with` 文の外側のコードに影響を与えずに、 " +"10進数コンテキストを変更できます。" + +#: ../../builtins/stdtypes.rst:5826 +msgid "" +"Exit the runtime context and return a Boolean flag indicating if any " +"exception that occurred should be suppressed. If an exception occurred while" +" executing the body of the :keyword:`with` statement, the arguments contain " +"the exception type, value and traceback information. Otherwise, all three " +"arguments are ``None``." +msgstr "" +"実行時コンテキストから抜け、(発生していた場合) 例外を抑制するかどうかを示すブール値フラグを返します。 :keyword:`with` " +"文の本体の実行中に例外が発生した場合、引数にはその例外の型と値とトレースバック情報を渡します。そうでない場合、引数は全て ``None`` となります。" + +#: ../../builtins/stdtypes.rst:5831 +msgid "" +"Returning a true value from this method will cause the :keyword:`with` " +"statement to suppress the exception and continue execution with the " +"statement immediately following the :keyword:`!with` statement. Otherwise " +"the exception continues propagating after this method has finished " +"executing." +msgstr "" + +#: ../../builtins/stdtypes.rst:5836 +msgid "" +"If this method raises an exception while handling an earlier exception from " +"the :keyword:`with` block, the new exception is raised, and the original " +"exception is stored in its :attr:`~BaseException.__context__` attribute." +msgstr "" + +#: ../../builtins/stdtypes.rst:5840 +msgid "" +"The exception passed in should never be reraised explicitly - instead, this " +"method should return a false value to indicate that the method completed " +"successfully and does not want to suppress the raised exception. This allows" +" context management code to easily detect whether or not an " +":meth:`~object.__exit__` method has actually failed." +msgstr "" +"渡された例外を明示的に再送出すべきではありません。その代わりに、このメソッドが偽の値を返すことでメソッドの正常終了と送出された例外を抑制しないことを伝えるべきです。このようにすればコンテキストマネージャは" +" :meth:`~object.__exit__` メソッド自体が失敗したのかどうかを簡単に見分けることができます。" + +#: ../../builtins/stdtypes.rst:5846 +msgid "" +"Python defines several context managers to support easy thread " +"synchronisation, prompt closure of files or other objects, and simpler " +"manipulation of the active decimal arithmetic context. The specific types " +"are not treated specially beyond their implementation of the context " +"management protocol. See the :mod:`contextlib` module for some examples." +msgstr "" +"Python " +"は、易しいスレッド同期、ファイルなどのオブジェクトの即時クローズ、アクティブな小数算術コンテキストの単純な操作をサポートするために、いくつかのコンテキストマネージャを用意しています。各型はコンテキスト管理プロトコルを実装しているという以上の特別の取り扱いを受けるわけではありません。例については" +" :mod:`contextlib` モジュールを参照してください。" + +#: ../../builtins/stdtypes.rst:5852 +msgid "" +"Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " +"decorator provide a convenient way to implement these protocols. If a " +"generator function is decorated with the :class:`contextlib.contextmanager` " +"decorator, it will return a context manager implementing the necessary " +":meth:`~contextmanager.__enter__` and :meth:`~contextmanager.__exit__` " +"methods, rather than the iterator produced by an undecorated generator " +"function." +msgstr "" +"Python の :term:`ジェネレータ ` と :class:`contextlib.contextmanager` " +":term:`デコレータ ` はこのプロトコルの簡便な実装方法を提供します。ジェネレータ関数を " +":class:`contextlib.contextmanager` " +"デコレータでデコレートすると、デコレートされないジェネレータ関数が作成するイテレータの代わりに、必要な " +":meth:`~contextmanager.__enter__` および :meth:`~contextmanager.__exit__` " +"メソッドを実装したコンテキストマネージャを返すようになります。" + +#: ../../builtins/stdtypes.rst:5859 +msgid "" +"Note that there is no specific slot for any of these methods in the type " +"structure for Python objects in the Python/C API. Extension types wanting to" +" define these methods must provide them as a normal Python accessible " +"method. Compared to the overhead of setting up the runtime context, the " +"overhead of a single class dictionary lookup is negligible." +msgstr "" +"これらのメソッドのために Python/C API の中の Python " +"オブジェクトの型構造体に特別なスロットが作られたわけではないことに注意してください。これらのメソッドを定義したい拡張型はこれらを通常の Python " +"からアクセスできるメソッドとして提供しなければなりません。実行時コンテキストを準備するオーバーヘッドに比べたら、一回のクラス辞書の探索のオーバーヘッドは無視できます。" + +#: ../../builtins/stdtypes.rst:5867 +msgid "" +"Type Annotation Types --- :ref:`Generic Alias `, " +":ref:`Union `" +msgstr "" +"型アノテーション型 --- :ref:`ジェネリックエイリアス ` 、 :ref:`ユニオン `" + +#: ../../builtins/stdtypes.rst:5872 +msgid "" +"The core built-in types for :term:`type annotations ` are " +":ref:`Generic Alias ` and :ref:`Union `." +msgstr "" +":term:`型アノテーション ` の中心となる組み込みの型は :ref:`ジェネリックエイリアス ` と :ref:`ユニオン ` です。" + +#: ../../builtins/stdtypes.rst:5879 +msgid "Generic Alias Type" +msgstr "ジェネリックエイリアス型" + +#: ../../builtins/stdtypes.rst:5885 +msgid "" +"``GenericAlias`` objects are generally created by :ref:`subscripting " +"` a class. They are most often used with :ref:`container " +"classes `, such as :class:`list` or :class:`dict`. For " +"example, ``list[int]`` is a ``GenericAlias`` object created by subscripting " +"the ``list`` class with the argument :class:`int`. ``GenericAlias`` objects " +"are intended primarily for use with :term:`type annotations `." +msgstr "" +"``GenericAlias`` オブジェクトは一般的に、クラスに :ref:`添字表記 ` をすることで作られます。\n" +":class:`list` や :class:`dict` のような :ref:`コンテナ系のクラス ` に対して使われることがほとんどです。\n" +"例えば、 ``list[int]`` は ``list`` クラスに :class:`int` という引数を与えた添字表記をすることで作られる ``GenericAlias`` オブジェクトです。\n" +"``GenericAlias`` オブジェクトは主に :term:`型アノテーション ` の用途で使われます。" + +#: ../../builtins/stdtypes.rst:5895 +msgid "" +"It is generally only possible to subscript a class if the class implements " +"the special method :meth:`~object.__class_getitem__`." +msgstr "" +"一般に、クラスへの添字表記は、そのクラスが特殊メソッド :meth:`~object.__class_getitem__` " +"を実装しているときに限り可能です。" + +#: ../../builtins/stdtypes.rst:5898 +msgid "" +"A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " +"implementing *parameterized generics*." +msgstr "" +"``GenericAlias`` オブジェクトは *パラメータ付きジェネリック型* を実装したジェネリック型 (:term:`generic " +"type`) の代用として振る舞います。" + +#: ../../builtins/stdtypes.rst:5901 +msgid "" +"For a container class, the argument(s) supplied to a :ref:`subscription " +"` of the class may indicate the type(s) of the elements an " +"object contains. For example, ``set[bytes]`` can be used in type annotations" +" to signify a :class:`set` in which all the elements are of type " +":class:`bytes`." +msgstr "" +"コンテナクラスに対してクラスの :ref:`添字表記 ` " +"に与えられた単一または複数の引数は、そのオブジェクトが包含する要素の型をあらわします。たとえば ``set[bytes]`` という表記は、全ての要素が" +" :class:`bytes` であるような :class:`set` をあらわす型アノテーションとして使うことができます。" + +#: ../../builtins/stdtypes.rst:5907 +msgid "" +"For a class which defines :meth:`~object.__class_getitem__` but is not a " +"container, the argument(s) supplied to a subscription of the class will " +"often indicate the return type(s) of one or more methods defined on an " +"object. For example, :mod:`regular expressions ` can be used on both the" +" :class:`str` data type and the :class:`bytes` data type:" +msgstr "" +":meth:`~object.__class_getitem__` " +"メソッドを定義しているけれどもコンテナでないクラスに対しては、クラスの添字表記に与えられた単一または複数の引数は、しばしばオブジェクトに定義された単一または複数のメソッドの戻り値の型をあらわします。たとえば、" +" :mod:`正規表現操作 ` は :class:`str` と :class:`bytes` の両方のデータ型に対して使うことができます:" + +#: ../../builtins/stdtypes.rst:5913 +msgid "" +"If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will" +" both be of type :class:`str`. We can represent this kind of object in type " +"annotations with the ``GenericAlias`` ``re.Match[str]``." +msgstr "" +"``x = re.search('foo', 'foo')`` とした場合、 ``x`` は :ref:`re.Match ` オブジェクトとなり、 ``x.group(0)`` と ``x[0]`` の戻り値はどちらも :class:`str` " +"となります。このようなオブジェクトは、 ``GenericAlias`` を使った型アノテーション ``re.Match[str]`` " +"で表現することができます。" + +#: ../../builtins/stdtypes.rst:5919 +msgid "" +"If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " +"``y`` will also be an instance of ``re.Match``, but the return values of " +"``y.group(0)`` and ``y[0]`` will both be of type :class:`bytes`. In type " +"annotations, we would represent this variety of :ref:`re.Match ` objects with ``re.Match[bytes]``." +msgstr "" +"``y = re.search(b'bar', b'bar')`` (ここで ``b`` は :class:`bytes` 型をあらわします) " +"とした場合、``y`` もまた ``re.Match`` のインスタンスとなりますが、 ``y.group(0)`` と ``y[0]`` " +"の戻り値はどちらも :class:`bytes` 型になります。型アノテーションでは、このような :ref:`re.Match ` オブジェクトは ``re.Match[bytes]`` と表現することになるでしょう。" + +#: ../../builtins/stdtypes.rst:5925 +msgid "" +"``GenericAlias`` objects are instances of the class " +":class:`types.GenericAlias`, which can also be used to create " +"``GenericAlias`` objects directly. Specializations of user-defined " +":ref:`generic classes ` may not be instances of " +":class:`types.GenericAlias`, but they provide similar functionality." +msgstr "" + +#: ../../builtins/stdtypes.rst:5932 +msgid "" +"Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " +"*X*, *Y*, and more depending on the ``T`` used. For example, a function " +"expecting a :class:`list` containing :class:`float` elements::" +msgstr "" +"型 \"X\", \"Y\", またはさらに多くの引数でパラメータ化される型 ``T`` を表現する ``GenericAlias`` " +"を生成します。引数の数は ``T`` の使われ方によって決まります。たとえば、 :class:`float` 型の要素を含む :class:`list`" +" を引数にとる関数の型アノテーションは次のようになります::" + +#: ../../builtins/stdtypes.rst:5937 +msgid "" +"def average(values: list[float]) -> float:\n" +" return sum(values) / len(values)" +msgstr "" + +#: ../../builtins/stdtypes.rst:5940 +msgid "" +"Another example for :term:`mapping` objects, using a :class:`dict`, which is" +" a generic type expecting two type parameters representing the key type and " +"the value type. In this example, the function expects a ``dict`` with keys " +"of type :class:`str` and values of type :class:`int`::" +msgstr "" +"もうひとつの例として :term:`mapping` オブジェクトの場合を示します。ここではキーと値の2つの型をパラメータとするジェネリック型である " +":class:`dict` を使っています。この例では、関数はキーが :class:`str` 型、値が :class:`int` 型であるような " +"``dict`` を引数にとります::" + +#: ../../builtins/stdtypes.rst:5945 +msgid "" +"def send_post_request(url: str, body: dict[str, int]) -> None:\n" +" ..." +msgstr "" + +#: ../../builtins/stdtypes.rst:5948 +msgid "" +"The builtin functions :func:`isinstance` and :func:`issubclass` do not " +"accept ``GenericAlias`` types for their second argument::" +msgstr "" +"組み込み関数 :func:`isinstance` と :func:`issubclass` は第二引数として ``GenericAlias`` " +"型を指定することはできません::" + +#: ../../builtins/stdtypes.rst:5951 +msgid "" +">>> isinstance([1, 2], list[str])\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: isinstance() argument 2 cannot be a parameterized generic" +msgstr "" + +#: ../../builtins/stdtypes.rst:5956 +msgid "" +"The Python runtime does not enforce :term:`type annotations `. " +"This extends to generic types and their type parameters. When creating a " +"container object from a ``GenericAlias``, the elements in the container are " +"not checked against their type. For example, the following code is " +"discouraged, but will run without errors::" +msgstr "" +"Python 実行時には :term:`型アノテーション ` " +"は強制されません。この性質はジェネリック型とその型パラメータにもおよびます。 ``GenericAlias`` " +"からコンテナオブジェクトを生成した場合、コンテナ内の要素は型のチェックを受けません。たとえば、以下のコードは推奨されませんが、エラーになることなく実行できます::" + +#: ../../builtins/stdtypes.rst:5962 +msgid "" +">>> t = list[str]\n" +">>> t([1, 2, 3])\n" +"[1, 2, 3]" +msgstr "" + +#: ../../builtins/stdtypes.rst:5966 +msgid "" +"Furthermore, parameterized generics erase type parameters during object " +"creation::" +msgstr "しかも、パラメータ付きジェネリック型は、オブジェクト生成時にパラメータの型情報を削除します::" + +#: ../../builtins/stdtypes.rst:5969 +msgid "" +">>> t = list[str]\n" +">>> type(t)\n" +"\n" +"\n" +">>> l = t()\n" +">>> type(l)\n" +"" +msgstr "" + +#: ../../builtins/stdtypes.rst:5978 +msgid "" +"Instances of ``GenericAlias`` are not classes at runtime, even though they " +"behave like classes (they can be instantiated and subclassed)::" +msgstr "" + +#: ../../builtins/stdtypes.rst:5980 +msgid "" +">>> import inspect\n" +">>> inspect.isclass(list[int])\n" +"False" +msgstr "" + +#: ../../builtins/stdtypes.rst:5984 +msgid "" +"This is true for :ref:`user-defined generics ` also." +msgstr "" + +#: ../../builtins/stdtypes.rst:5986 +msgid "" +"Calling :func:`repr` or :func:`str` on a generic shows the parameterized " +"type::" +msgstr ":func:`repr` や :func:`str` のジェネリック型に対する呼び出しは、パラメータ型を表示します::" + +#: ../../builtins/stdtypes.rst:5988 +msgid "" +">>> repr(list[int])\n" +"'list[int]'\n" +"\n" +">>> str(list[int])\n" +"'list[int]'" +msgstr "" + +#: ../../builtins/stdtypes.rst:5994 +msgid "" +"The :meth:`~object.__getitem__` method of generic containers will raise an " +"exception to disallow mistakes like ``dict[str][str]``::" +msgstr "" +"ジェネリックコンテナ型の :meth:`~object.__getitem__` メソッドは、 ``dict[str][str]`` " +"のようなミスを許さないように、例外を送出します::" + +#: ../../builtins/stdtypes.rst:5997 +msgid "" +">>> dict[str][str]\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: dict[str] is not a generic class" +msgstr "" + +#: ../../builtins/stdtypes.rst:6002 +msgid "" +"However, such expressions are valid when :ref:`type variables ` " +"are used. The index must have as many elements as there are type variable " +"items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" +msgstr "" +"一方で、同様の式は :ref:`型変数 ` が使われた場合は有効です。添字の数は``GenericAlias`` オブジェクトの " +":attr:`~genericalias.__args__` 属性における型変数の数と同じでなければなりません::" + +#: ../../builtins/stdtypes.rst:6006 +msgid "" +">>> from typing import TypeVar\n" +">>> Y = TypeVar('Y')\n" +">>> dict[str, Y][int]\n" +"dict[str, int]" +msgstr "" + +#: ../../builtins/stdtypes.rst:6013 +msgid "Standard Generic Classes" +msgstr "標準ジェネリッククラス" + +#: ../../builtins/stdtypes.rst:6015 +msgid "" +"The following standard library classes support parameterized generics. This " +"list is non-exhaustive." +msgstr "以下の標準ライブラリクラスは、パラメータ付きジェネリック型をサポートします。このリストは完全に網羅されていない可能性があります。" + +#: ../../builtins/stdtypes.rst:6018 +msgid ":class:`tuple`" +msgstr ":class:`tuple`" + +#: ../../builtins/stdtypes.rst:6019 +msgid ":class:`list`" +msgstr ":class:`list`" + +#: ../../builtins/stdtypes.rst:6020 +msgid ":class:`dict`" +msgstr ":class:`dict`" + +#: ../../builtins/stdtypes.rst:6021 +msgid ":class:`set`" +msgstr ":class:`set`" + +#: ../../builtins/stdtypes.rst:6022 +msgid ":class:`frozendict`" +msgstr "" + +#: ../../builtins/stdtypes.rst:6023 +msgid ":class:`frozenset`" +msgstr ":class:`frozenset`" + +#: ../../builtins/stdtypes.rst:6024 +msgid ":class:`type`" +msgstr ":class:`type`" + +#: ../../builtins/stdtypes.rst:6025 +msgid ":class:`asyncio.Future`" +msgstr "" + +#: ../../builtins/stdtypes.rst:6026 +msgid ":class:`asyncio.Task`" +msgstr "" + +#: ../../builtins/stdtypes.rst:6027 +msgid ":class:`collections.deque`" +msgstr ":class:`collections.deque`" + +#: ../../builtins/stdtypes.rst:6028 +msgid ":class:`collections.defaultdict`" +msgstr ":class:`collections.defaultdict`" + +#: ../../builtins/stdtypes.rst:6029 +msgid ":class:`collections.OrderedDict`" +msgstr ":class:`collections.OrderedDict`" + +#: ../../builtins/stdtypes.rst:6030 +msgid ":class:`collections.Counter`" +msgstr ":class:`collections.Counter`" + +#: ../../builtins/stdtypes.rst:6031 +msgid ":class:`collections.ChainMap`" +msgstr ":class:`collections.ChainMap`" + +#: ../../builtins/stdtypes.rst:6032 +msgid ":class:`collections.abc.Awaitable`" +msgstr "’’:class:`collections.abc.Awaitable`" + +#: ../../builtins/stdtypes.rst:6033 +msgid ":class:`collections.abc.Coroutine`" +msgstr ":class:`collections.abc.Coroutine`" + +#: ../../builtins/stdtypes.rst:6034 +msgid ":class:`collections.abc.AsyncIterable`" +msgstr ":class:`collections.abc.AsyncIterable`" + +#: ../../builtins/stdtypes.rst:6035 +msgid ":class:`collections.abc.AsyncIterator`" +msgstr ":class:`collections.abc.AsyncIterator`" + +#: ../../builtins/stdtypes.rst:6036 +msgid ":class:`collections.abc.AsyncGenerator`" +msgstr ":class:`collections.abc.AsyncGenerator`" + +#: ../../builtins/stdtypes.rst:6037 +msgid ":class:`collections.abc.Iterable`" +msgstr ":class:`collections.abc.Iterable`" + +#: ../../builtins/stdtypes.rst:6038 +msgid ":class:`collections.abc.Iterator`" +msgstr ":class:`collections.abc.Iterator`" + +#: ../../builtins/stdtypes.rst:6039 +msgid ":class:`collections.abc.Generator`" +msgstr ":class:`collections.abc.Generator`" + +#: ../../builtins/stdtypes.rst:6040 +msgid ":class:`collections.abc.Reversible`" +msgstr ":class:`collections.abc.Reversible`" + +#: ../../builtins/stdtypes.rst:6041 +msgid ":class:`collections.abc.Container`" +msgstr ":class:`collections.abc.Container`" + +#: ../../builtins/stdtypes.rst:6042 +msgid ":class:`collections.abc.Collection`" +msgstr ":class:`collections.abc.Collection`" + +#: ../../builtins/stdtypes.rst:6043 +msgid ":class:`collections.abc.Callable`" +msgstr ":class:`collections.abc.Callable`" + +#: ../../builtins/stdtypes.rst:6044 +msgid ":class:`collections.abc.Set`" +msgstr ":class:`collections.abc.Set`" + +#: ../../builtins/stdtypes.rst:6045 +msgid ":class:`collections.abc.MutableSet`" +msgstr ":class:`collections.abc.MutableSet`" + +#: ../../builtins/stdtypes.rst:6046 +msgid ":class:`collections.abc.Mapping`" +msgstr ":class:`collections.abc.Mapping`" + +#: ../../builtins/stdtypes.rst:6047 +msgid ":class:`collections.abc.MutableMapping`" +msgstr ":class:`collections.abc.MutableMapping`" + +#: ../../builtins/stdtypes.rst:6048 +msgid ":class:`collections.abc.Sequence`" +msgstr ":class:`collections.abc.Sequence`" + +#: ../../builtins/stdtypes.rst:6049 +msgid ":class:`collections.abc.MutableSequence`" +msgstr ":class:`collections.abc.MutableSequence`" + +#: ../../builtins/stdtypes.rst:6050 +msgid ":class:`collections.abc.ByteString`" +msgstr ":class:`collections.abc.ByteString`" + +#: ../../builtins/stdtypes.rst:6051 +msgid ":class:`collections.abc.MappingView`" +msgstr ":class:`collections.abc.MappingView`" + +#: ../../builtins/stdtypes.rst:6052 +msgid ":class:`collections.abc.KeysView`" +msgstr ":class:`collections.abc.KeysView`" + +#: ../../builtins/stdtypes.rst:6053 +msgid ":class:`collections.abc.ItemsView`" +msgstr ":class:`collections.abc.ItemsView`" + +#: ../../builtins/stdtypes.rst:6054 +msgid ":class:`collections.abc.ValuesView`" +msgstr ":class:`collections.abc.ValuesView`" + +#: ../../builtins/stdtypes.rst:6055 +msgid ":class:`contextlib.AbstractContextManager`" +msgstr ":class:`contextlib.AbstractContextManager`" + +#: ../../builtins/stdtypes.rst:6056 +msgid ":class:`contextlib.AbstractAsyncContextManager`" +msgstr ":class:`contextlib.AbstractAsyncContextManager`" + +#: ../../builtins/stdtypes.rst:6057 +msgid ":class:`dataclasses.Field`" +msgstr ":class:`dataclasses.Field`" + +#: ../../builtins/stdtypes.rst:6058 +msgid ":class:`functools.cached_property`" +msgstr ":class:`functools.cached_property`" + +#: ../../builtins/stdtypes.rst:6059 +msgid ":class:`functools.partialmethod`" +msgstr ":class:`functools.partialmethod`" + +#: ../../builtins/stdtypes.rst:6060 +msgid ":class:`os.PathLike`" +msgstr ":class:`os.PathLike`" + +#: ../../builtins/stdtypes.rst:6061 +msgid ":class:`queue.LifoQueue`" +msgstr ":class:`queue.LifoQueue`" + +#: ../../builtins/stdtypes.rst:6062 +msgid ":class:`queue.Queue`" +msgstr ":class:`queue.Queue`" + +#: ../../builtins/stdtypes.rst:6063 +msgid ":class:`queue.PriorityQueue`" +msgstr ":class:`queue.PriorityQueue`" + +#: ../../builtins/stdtypes.rst:6064 +msgid ":class:`queue.SimpleQueue`" +msgstr ":class:`queue.SimpleQueue`" + +#: ../../builtins/stdtypes.rst:6065 +msgid ":ref:`re.Pattern `" +msgstr ":ref:`re.Pattern `" + +#: ../../builtins/stdtypes.rst:6066 +msgid ":ref:`re.Match `" +msgstr ":ref:`re.Match `" + +#: ../../builtins/stdtypes.rst:6067 +msgid ":class:`shelve.BsdDbShelf`" +msgstr ":class:`shelve.BsdDbShelf`" + +#: ../../builtins/stdtypes.rst:6068 +msgid ":class:`shelve.DbfilenameShelf`" +msgstr ":class:`shelve.DbfilenameShelf`" + +#: ../../builtins/stdtypes.rst:6069 +msgid ":class:`shelve.Shelf`" +msgstr ":class:`shelve.Shelf`" + +#: ../../builtins/stdtypes.rst:6070 +msgid ":class:`types.MappingProxyType`" +msgstr ":class:`types.MappingProxyType`" + +#: ../../builtins/stdtypes.rst:6071 +msgid ":class:`weakref.WeakKeyDictionary`" +msgstr ":class:`weakref.WeakKeyDictionary`" + +#: ../../builtins/stdtypes.rst:6072 +msgid ":class:`weakref.WeakMethod`" +msgstr ":class:`weakref.WeakMethod`" + +#: ../../builtins/stdtypes.rst:6073 +msgid ":class:`weakref.WeakSet`" +msgstr ":class:`weakref.WeakSet`" + +#: ../../builtins/stdtypes.rst:6074 +msgid ":class:`weakref.WeakValueDictionary`" +msgstr ":class:`weakref.WeakValueDictionary`" + +#: ../../builtins/stdtypes.rst:6079 +msgid "Special Attributes of ``GenericAlias`` objects" +msgstr "``GenericAlias`` オブジェクトの特別な属性" + +#: ../../builtins/stdtypes.rst:6081 +msgid "All parameterized generics implement special read-only attributes." +msgstr "全てのパラメータ付きジェネリック型は、下記に示す読み出し専用の属性を実装しています。" + +#: ../../builtins/stdtypes.rst:6085 +msgid "This attribute points at the non-parameterized generic class::" +msgstr "この属性は、対応するパラメータ付きでないジェネリッククラスを指します::" + +#: ../../builtins/stdtypes.rst:6087 +msgid "" +">>> list[int].__origin__\n" +"" +msgstr "" + +#: ../../builtins/stdtypes.rst:6093 +msgid "" +"This attribute is a :class:`tuple` (possibly of length 1) of generic types " +"passed to the original :meth:`~object.__class_getitem__` of the generic " +"class::" +msgstr "" +"この属性は、ジェネリッククラスの元の :meth:`~object.__class_getitem__` に渡された :class:`tuple` です" +" (長さが1の場合もあります)::" + +#: ../../builtins/stdtypes.rst:6097 +msgid "" +">>> dict[str, list[int]].__args__\n" +"(, list[int])" +msgstr "" + +#: ../../builtins/stdtypes.rst:6103 +msgid "" +"This attribute is a lazily computed tuple (possibly empty) of unique type " +"variables found in ``__args__``::" +msgstr "この属性は、 ``__args__`` にある固有の型変数のタプルで、必要に応じて遅延計算されます (空の可能性もあります)::" + +#: ../../builtins/stdtypes.rst:6106 +msgid "" +">>> from typing import TypeVar\n" +"\n" +">>> T = TypeVar('T')\n" +">>> list[T].__parameters__\n" +"(~T,)" +msgstr "" + +#: ../../builtins/stdtypes.rst:6114 +msgid "" +"A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " +"have correct ``__parameters__`` after substitution because " +":class:`typing.ParamSpec` is intended primarily for static type checking." +msgstr "" +":class:`typing.ParamSpec` パラメータを含む ``GenericAlias`` オブジェクトは、代入後に正しい " +"``__parameters__`` を持たない可能性があります。これは :class:`typing.ParamSpec` " +"が主に静的な型チェックを目的としているためです。" + +#: ../../builtins/stdtypes.rst:6121 +msgid "" +"A boolean that is true if the alias has been unpacked using the ``*`` " +"operator (see :data:`~typing.TypeVarTuple`)." +msgstr "" +"これは、型エイリアスが ``*`` 演算子を使って取り出された場合に真となる真偽値です (:data:`~typing.TypeVarTuple` " +"を参照してください)。" + +#: ../../builtins/stdtypes.rst:6129 +msgid ":pep:`484` - Type Hints" +msgstr ":pep:`484` - 型ヒント" + +#: ../../builtins/stdtypes.rst:6130 +msgid "Introducing Python's framework for type annotations." +msgstr "型アノテーションのための Python のフレームワークへの導入です。" + +#: ../../builtins/stdtypes.rst:6132 +msgid ":pep:`585` - Type Hinting Generics In Standard Collections" +msgstr ":pep:`585` - 標準コレクション型の型ヒントにおける総称型 (generics) の使用" + +#: ../../builtins/stdtypes.rst:6133 +msgid "" +"Introducing the ability to natively parameterize standard-library classes, " +"provided they implement the special class method " +":meth:`~object.__class_getitem__`." +msgstr "" +"特殊なクラスメソッド :meth:`~object.__class_getitem__` " +"を実装している場合に、標準ライブラリのクラスに対してネイティブにパラメータ表記を可能にする機能への導入です。" + +#: ../../builtins/stdtypes.rst:6137 +msgid "" +":ref:`Generics`, :ref:`user-defined generics ` and " +":class:`typing.Generic`" +msgstr "" +":ref:`Generics`, :ref:`ユーザー定義のジェネリック型 `, および " +":class:`typing.Generic`" + +#: ../../builtins/stdtypes.rst:6138 +msgid "" +"Documentation on how to implement generic classes that can be parameterized " +"at runtime and understood by static type-checkers." +msgstr "実行時にパラメータ設定が可能であり、かつ静的な型チェッカーが理解できるジェネリッククラスを実装する方法のドキュメントです。" + +#: ../../builtins/stdtypes.rst:6147 +msgid "Union Type" +msgstr "Union 型" + +#: ../../builtins/stdtypes.rst:6153 +msgid "" +"A union object holds the value of the ``|`` (bitwise or) operation on " +"multiple :ref:`type objects `. These types are intended" +" primarily for :term:`type annotations `. The union type " +"expression enables cleaner type hinting syntax compared to subscripting " +":class:`typing.Union`." +msgstr "" + +#: ../../builtins/stdtypes.rst:6160 +msgid "" +"Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " +"means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " +"example, the following function expects an argument of type :class:`int` or " +":class:`float`::" +msgstr "" +"*X* と *Y* などの型を保持するUnionオブジェクトを定義すします。``X | Y`` はXとYのいずれかを意味します。これは " +"``typing.Union[X, Y]`` と等価です。たとえば、以下の関数は引数として :class:`int` 型または " +":class:`float` 型を想定しています。::" + +#: ../../builtins/stdtypes.rst:6165 +msgid "" +"def square(number: int | float) -> int | float:\n" +" return number ** 2" +msgstr "" + +#: ../../builtins/stdtypes.rst:6170 +msgid "" +"The ``|`` operator cannot be used at runtime to define unions where one or " +"more members is a forward reference. For example, ``int | \"Foo\"``, where " +"``\"Foo\"`` is a reference to a class not yet defined, will fail at runtime." +" For unions which include forward references, present the whole expression " +"as a string, e.g. ``\"int | Foo\"``." +msgstr "" + +#: ../../builtins/stdtypes.rst:6178 +msgid "" +"Union objects can be tested for equality with other union objects. Details:" +msgstr "Unionオブジェクトは他のUnionオブジェクトとの等価性をテストできます。以下は詳細です:" + +#: ../../builtins/stdtypes.rst:6180 +msgid "Unions of unions are flattened::" +msgstr "ユニオン型のユニオン型は平滑化されます::" + +#: ../../builtins/stdtypes.rst:6182 +msgid "(int | str) | float == int | str | float" +msgstr "" + +#: ../../builtins/stdtypes.rst:6184 +msgid "Redundant types are removed::" +msgstr "余分な型は削除されます::" + +#: ../../builtins/stdtypes.rst:6186 +msgid "int | str | int == int | str" +msgstr "" + +#: ../../builtins/stdtypes.rst:6188 +msgid "When comparing unions, the order is ignored::" +msgstr "ユニオン型を比較すると順序は無視されます::" + +#: ../../builtins/stdtypes.rst:6190 +msgid "int | str == str | int" +msgstr "" + +#: ../../builtins/stdtypes.rst:6192 +msgid "It creates instances of :class:`typing.Union`::" +msgstr "" + +#: ../../builtins/stdtypes.rst:6194 +msgid "" +"int | str == typing.Union[int, str]\n" +"type(int | str) is typing.Union" +msgstr "" + +#: ../../builtins/stdtypes.rst:6197 +msgid "Optional types can be spelled as a union with ``None``::" +msgstr "Optional型は ``None`` とのUnion型で記述できます::" + +#: ../../builtins/stdtypes.rst:6199 +msgid "str | None == typing.Optional[str]" +msgstr "" + +#: ../../builtins/stdtypes.rst:6204 +msgid "" +"Calls to :func:`isinstance` and :func:`issubclass` are also supported with a" +" union object::" +msgstr "" +":func:`isinstance` と :func:`issubclass` の呼び出しはどちらもUnionオブジェクトをサポートしています。 " + +#: ../../builtins/stdtypes.rst:6207 +msgid "" +">>> isinstance(\"\", int | str)\n" +"True" +msgstr "" + +#: ../../builtins/stdtypes.rst:6210 +msgid "" +"However, :ref:`parameterized generics ` in union objects" +" cannot be checked::" +msgstr "" +"しかし、Unionオブジェクトの中の :ref:`parameterized generics ` " +"はチェックできません::" + +#: ../../builtins/stdtypes.rst:6213 +msgid "" +">>> isinstance(1, int | list[int]) # short-circuit evaluation\n" +"True\n" +">>> isinstance([1], int | list[int])\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: isinstance() argument 2 cannot be a parameterized generic" +msgstr "" + +#: ../../builtins/stdtypes.rst:6220 +msgid "" +"The user-exposed type for the union object can be accessed from " +":class:`typing.Union` and used for :func:`isinstance` checks::" +msgstr "" + +#: ../../builtins/stdtypes.rst:6223 +msgid "" +">>> import typing\n" +">>> isinstance(int | str, typing.Union)\n" +"True\n" +">>> typing.Union()\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: cannot create 'typing.Union' instances" +msgstr "" + +#: ../../builtins/stdtypes.rst:6232 +msgid "" +"The :meth:`!__or__` method for type objects was added to support the syntax " +"``X | Y``. If a metaclass implements :meth:`!__or__`, the Union may " +"override it:" +msgstr "" +"``X | Y`` 構文をサポートするために、型オブジェクトに :meth:`!__or__` メソッドが追加されました。メタクラスで " +":meth:`!__or__` を実装するとUnionをオーバーライドする場合があります::" + +#: ../../builtins/stdtypes.rst:6236 +msgid "" +">>> class M(type):\n" +"... def __or__(self, other):\n" +"... return \"Hello\"\n" +"...\n" +">>> class C(metaclass=M):\n" +"... pass\n" +"...\n" +">>> C | int\n" +"'Hello'\n" +">>> int | C\n" +"int | C" +msgstr "" + +#: ../../builtins/stdtypes.rst:6252 +msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." +msgstr ":pep:`604` -- ``X | Y`` 構文とUnion型を提案しているPEP" + +#: ../../builtins/stdtypes.rst:6258 +msgid "" +"Union objects are now instances of :class:`typing.Union`. Previously, they " +"were instances of :class:`types.UnionType`, which remains an alias for " +":class:`typing.Union`." +msgstr "" + +#: ../../builtins/stdtypes.rst:6265 +msgid "Other Built-in Types" +msgstr "その他の組み込み型" + +#: ../../builtins/stdtypes.rst:6267 +msgid "" +"The interpreter supports several other kinds of objects. Most of these " +"support only one or two operations." +msgstr "" +"インタプリタは、その他いくつかの種類のオブジェクトをサポートしています。これらのほとんどは 1 つまたは 2 つの演算だけをサポートしています。" + +#: ../../builtins/stdtypes.rst:6274 +msgid "Modules" +msgstr "モジュール" + +#: ../../builtins/stdtypes.rst:6276 +msgid "" +"The only special operation on a module is attribute access: ``m.name``, " +"where *m* is a module and *name* accesses a name defined in *m*'s symbol " +"table. Module attributes can be assigned to. (Note that the " +":keyword:`import` statement is not, strictly speaking, an operation on a " +"module object; ``import foo`` does not require a module object named *foo* " +"to exist, rather it requires an (external) *definition* for a module named " +"*foo* somewhere.)" +msgstr "" +"モジュールに対する唯一の特殊な演算は属性アクセス: ``m.name`` です。ここで *m* はモジュールで、 *name* は *m* " +"のシンボルテーブル上に定義された名前にアクセスします。モジュール属性に代入することもできます。 (なお、:keyword:`import` " +"文は、厳密にいえば、モジュールオブジェクトに対する演算ではありません; ``import foo`` は *foo* " +"と名づけられたモジュールオブジェクトの存在を必要とはせず、*foo* と名づけられたモジュールの (外部の) *定義* を必要とします。)" + +#: ../../builtins/stdtypes.rst:6283 +msgid "" +"A special attribute of every module is :attr:`~object.__dict__`. This is the" +" dictionary containing the module's symbol table. Modifying this dictionary " +"will actually change the module's symbol table, but direct assignment to the" +" :attr:`~object.__dict__` attribute is not possible (you can write " +"``m.__dict__['a'] = 1``, which defines ``m.a`` to be ``1``, but you can't " +"write ``m.__dict__ = {}``). Modifying :attr:`~object.__dict__` directly is " +"not recommended." +msgstr "" +"全てのモジュールにある特殊属性が :attr:`~object.__dict__` " +"です。これはモジュールのシンボルテーブルを含む辞書です。この辞書を書き換えると実際にモジュールのシンボルテーブルを変更することができますが、:attr:`~object.__dict__`" +" 属性を直接代入することはできません (``m.__dict__['a'] = 1`` と書いて ``m.a`` を ``1`` " +"に定義することはできますが、``m.__dict__ = {}`` と書くことはできません)。 :attr:`~object.__dict__` " +"を直接書き換えることは推奨されません。" + +#: ../../builtins/stdtypes.rst:6291 +msgid "" +"Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." +msgstr "" +"インタプリタ内に組み込まれたモジュールは、 ```` " +"のように書かれます。ファイルから読み出された場合、 ```` と書かれます。" + +#: ../../builtins/stdtypes.rst:6299 +msgid "Classes and Class Instances" +msgstr "クラスおよびクラスインスタンス" + +#: ../../builtins/stdtypes.rst:6301 +msgid "See :ref:`objects` and :ref:`class` for these." +msgstr "これらについては :ref:`objects` および :ref:`class` を参照してください。" + +#: ../../builtins/stdtypes.rst:6307 +msgid "Functions" +msgstr "関数" + +#: ../../builtins/stdtypes.rst:6309 +msgid "" +"Function objects are created by function definitions. The only operation on" +" a function object is to call it: ``func(argument-list)``." +msgstr "" +"関数オブジェクトは関数定義によって生成されます。関数オブジェクトに対する唯一の操作は、それを呼び出すことです: ``func(argument-" +"list)`` 。" + +#: ../../builtins/stdtypes.rst:6312 +msgid "" +"There are really two flavors of function objects: built-in functions and " +"user-defined functions. Both support the same operation (to call the " +"function), but the implementation is different, hence the different object " +"types." +msgstr "" +"関数オブジェクトには実際には二種類あります: 組み込み関数とユーザ定義関数です。どちらも同じ操作 (関数の呼び出し) " +"をサポートしますが、実装は異なるので、オブジェクトの型も異なります。" + +#: ../../builtins/stdtypes.rst:6316 +msgid "See :ref:`function` for more information." +msgstr "詳細は、 :ref:`function` を参照してください。" + +#: ../../builtins/stdtypes.rst:6322 +msgid "Methods" +msgstr "メソッド" + +#: ../../builtins/stdtypes.rst:6326 +msgid "" +"Methods are functions that are called using the attribute notation. There " +"are two flavors: :ref:`built-in methods ` (such as " +":meth:`~list.append` on lists) and :ref:`class instance methods `. Built-in methods are described with the types that support them." +msgstr "" + +#: ../../builtins/stdtypes.rst:6332 +msgid "" +"If you access a method (a function defined in a class namespace) through an " +"instance, you get a special object: a :dfn:`bound method` (also called " +":ref:`instance method `) object. When called, it will add " +"the ``self`` argument to the argument list. Bound methods have two special " +"read-only attributes: :attr:`m.__self__ ` is the object on " +"which the method operates, and :attr:`m.__func__ ` is the " +"function implementing the method. Calling ``m(arg-1, arg-2, ..., arg-n)`` " +"is completely equivalent to calling ``m.__func__(m.__self__, arg-1, arg-2, " +"..., arg-n)``." +msgstr "" +"インスタンスを通してメソッド (クラスの名前空間内で定義された関数) にアクセスすると、特殊なオブジェクトが得られます。それは束縛メソッド " +"(:dfn:`bound method`) オブジェクトで、インスタンスメソッド (:ref:`instance method `) とも呼ばれます。呼び出された時、引数リストに ``self`` 引数が追加されます。束縛メソッドには 2 " +"つの特殊読み出し専用属性があります。 :attr:`m.__self__ ` " +"はそのメソッドが操作するオブジェクトで、:attr:`m.__func__ ` はそのメソッドを実装している関数です。" +" ``m(arg-1, arg-2, ..., arg-n)`` の呼び出しは、 ``m.__func__(m.__self__, arg-1, " +"arg-2, ..., arg-n)`` の呼び出しと完全に等価です。" + +#: ../../builtins/stdtypes.rst:6343 +msgid "" +"Like :ref:`function objects `, bound method objects " +"support getting arbitrary attributes. However, since method attributes are " +"actually stored on the underlying function object (:attr:`method.__func__`)," +" setting method attributes on bound methods is disallowed. Attempting to " +"set an attribute on a method results in an :exc:`AttributeError` being " +"raised. In order to set a method attribute, you need to explicitly set it " +"on the underlying function object:" +msgstr "" +":ref:`function objects ` " +"と同様に、メソッドオブジェクトは任意の属性の取得をサポートしています。しかし、メソッド属性は実際には下層の関数オブジェクト " +"(:attr:`method.__func__`) " +"に記憶されているので、バインドされるメソッドにメソッド属性を設定することは許されていません。メソッドに属性を設定しようとすると " +":exc:`AttributeError` " +"が送出されます。メソッドの属性を設定するためには、次のようにその下層の関数オブジェクトに明示的に設定する必要があります::" + +#: ../../builtins/stdtypes.rst:6351 +msgid "" +">>> class C:\n" +"... def method(self):\n" +"... pass\n" +"...\n" +">>> c = C()\n" +">>> c.method.whoami = 'my name is method' # can't set on the method\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"AttributeError: 'method' object has no attribute 'whoami'\n" +">>> c.method.__func__.whoami = 'my name is method'\n" +">>> c.method.whoami\n" +"'my name is method'" +msgstr "" + +#: ../../builtins/stdtypes.rst:6366 +msgid "See :ref:`instance-methods` for more information." +msgstr "詳細は :ref:`instance-methods` を参照してください。" + +#: ../../builtins/stdtypes.rst:6374 +msgid "Code Objects" +msgstr "コードオブジェクト" + +#: ../../builtins/stdtypes.rst:6380 +msgid "" +"Code objects are used by the implementation to represent \"pseudo-compiled\"" +" executable Python code such as a function body. They differ from function " +"objects because they don't contain a reference to their global execution " +"environment. Code objects are returned by the built-in :func:`compile` " +"function and can be extracted from function objects through their " +":attr:`~function.__code__` attribute. See also the :mod:`code` module." +msgstr "" +"コードオブジェクトは、関数本体のような \"擬似コンパイルされた\" Python " +"の実行可能コードを表すために実装系によって使われます。コードオブジェクトはグローバルな実行環境への参照を持たない点で関数オブジェクトとは異なります。コードオブジェクトは組み込み関数" +" :func:`compile` によって返され、また関数オブジェクトの :attr:`~function.__code__` 属性として取り出せます。" +" :mod:`code` モジュールも参照してください。" + +#: ../../builtins/stdtypes.rst:6387 +msgid "" +"Accessing :attr:`~function.__code__` raises an :ref:`auditing event " +"` ``object.__getattr__`` with arguments ``obj`` and " +"``\"__code__\"``." +msgstr "" +":attr:`~function.__code__` へのアクセスは ``object.__getattr__`` に ``obj`` と " +"``\"__code__\"`` を渡して行いますが、 :ref:`監査イベント ` を送出します。" + +#: ../../builtins/stdtypes.rst:6394 +msgid "" +"A code object can be executed or evaluated by passing it (instead of a " +"source string) to the :func:`exec` or :func:`eval` built-in functions." +msgstr "" +"コードオブジェクトは、組み込み関数 :func:`exec` や :func:`eval` に (ソース文字列の代わりに) " +"渡すことで、実行や評価できます。" + +#: ../../builtins/stdtypes.rst:6397 +msgid "See :ref:`types` for more information." +msgstr "詳細は、 :ref:`types` を参照してください。" + +#: ../../builtins/stdtypes.rst:6403 +msgid "Type Objects" +msgstr "型オブジェクト" + +#: ../../builtins/stdtypes.rst:6409 +msgid "" +"Type objects represent the various object types. An object's type is " +"accessed by the built-in function :func:`type`. There are no special " +"operations on types. The standard module :mod:`types` defines names for all" +" standard built-in types." +msgstr "" +"型オブジェクトは様々なオブジェクト型を表します。オブジェクトの型は組み込み関数 :func:`type` " +"でアクセスされます。型オブジェクトには特有の操作はありません。標準モジュール :mod:`types` には全ての組み込み型名が定義されています。" + +#: ../../builtins/stdtypes.rst:6414 +msgid "Types are written like this: ````." +msgstr "型はこのように書き表されます: ```` 。" + +#: ../../builtins/stdtypes.rst:6420 +msgid "The Null Object" +msgstr "ヌルオブジェクト" + +#: ../../builtins/stdtypes.rst:6422 +msgid "" +"This object is returned by functions that don't explicitly return a value. " +"It supports no special operations. There is exactly one null object, named " +"``None`` (a built-in name). ``type(None)()`` produces the same singleton." +msgstr "" +"このオブジェクトは明示的に値を返さない関数によって返されます。このオブジェクトには特有の操作はありません。ヌルオブジェクトは一つだけで、 " +"``None`` (組み込み名) と名づけられています。 ``type(None)()`` は同じシングルトンを作成します。" + +#: ../../builtins/stdtypes.rst:6426 +msgid "It is written as ``None``." +msgstr "``None`` と書き表されます。" + +#: ../../builtins/stdtypes.rst:6433 +msgid "The Ellipsis Object" +msgstr "Ellipsis オブジェクト" + +#: ../../builtins/stdtypes.rst:6435 +msgid "" +"This object is commonly used to indicate that something is omitted. It " +"supports no special operations. There is exactly one ellipsis object, named" +" :const:`Ellipsis` (a built-in name). ``type(Ellipsis)()`` produces the " +":const:`Ellipsis` singleton." +msgstr "" + +#: ../../builtins/stdtypes.rst:6440 +msgid "It is written as ``Ellipsis`` or ``...``." +msgstr "``Ellipsis`` または ``...`` と書き表されます。" + +#: ../../builtins/stdtypes.rst:6442 +msgid "" +"In typical use, ``...`` as the ``Ellipsis`` object appears in a few " +"different places, for instance:" +msgstr "" + +#: ../../builtins/stdtypes.rst:6445 +msgid "" +"In type annotations, such as :ref:`callable arguments ` or :ref:`tuple elements `." +msgstr "" + +#: ../../builtins/stdtypes.rst:6448 +msgid "" +"As the body of a function instead of a :ref:`pass statement `." +msgstr "" + +#: ../../builtins/stdtypes.rst:6450 +msgid "" +"In third-party libraries, such as `Numpy's slicing and striding " +"`_." +msgstr "" + +#: ../../builtins/stdtypes.rst:6453 +msgid "" +"Python also uses three dots in ways that are not ``Ellipsis`` objects, for " +"instance:" +msgstr "" + +#: ../../builtins/stdtypes.rst:6455 +msgid "" +"Doctest's :const:`ELLIPSIS `, as a pattern for missing " +"content." +msgstr "" + +#: ../../builtins/stdtypes.rst:6457 +msgid "" +"The default Python prompt of the :term:`interactive` shell when partial " +"input is incomplete." +msgstr "" + +#: ../../builtins/stdtypes.rst:6459 +msgid "" +"Lastly, the Python documentation often uses three dots in conventional " +"English usage to mean omitted content, even in code examples that also use " +"them as the ``Ellipsis``." +msgstr "" + +#: ../../builtins/stdtypes.rst:6467 +msgid "The NotImplemented Object" +msgstr "NotImplemented オブジェクト" + +#: ../../builtins/stdtypes.rst:6469 +msgid "" +"This object is returned from comparisons and binary operations when they are" +" asked to operate on types they don't support. See :ref:`comparisons` for " +"more information. There is exactly one :data:`NotImplemented` object. " +":code:`type(NotImplemented)()` produces the singleton instance." +msgstr "" +"このオブジェクトは、対応していない型に対して比較演算や二項演算が求められたとき、それらの演算から返されます。詳細は :ref:`comparisons`" +" を参照してください。 :data:`NotImplemented` オブジェクトは一つだけです。 " +":code:`type(NotImplemented)()` はこの単一のインスタンスを作成します。" + +#: ../../builtins/stdtypes.rst:6474 +msgid "It is written as :code:`NotImplemented`." +msgstr ":code:`NotImplemented` と書き表されます。" + +#: ../../builtins/stdtypes.rst:6480 +msgid "Internal Objects" +msgstr "内部オブジェクト" + +#: ../../builtins/stdtypes.rst:6482 +msgid "" +"See :ref:`types` for this information. It describes :ref:`stack frame " +"objects `, :ref:`traceback objects `, and " +"slice objects." +msgstr "" +"この情報は :ref:`types` を参照してください。:ref:`stack frame objects `、:ref:`traceback objects `、スライスオブジェクトについて記述されています。" + +#: ../../builtins/stdtypes.rst:6490 +msgid "Special Attributes" +msgstr "特殊属性" + +#: ../../builtins/stdtypes.rst:6492 +msgid "" +"The implementation adds a few special read-only attributes to several object" +" types, where they are relevant. Some of these are not reported by the " +":func:`dir` built-in function." +msgstr "" +"実装は、いくつかのオブジェクト型に対して、適切な場合には特殊な読み出し専用の属性を追加します。そのうちいくつかは :func:`dir` " +"組込み関数で報告されません。" + +#: ../../builtins/stdtypes.rst:6499 +msgid "" +"The name of the class, function, method, descriptor, or generator instance." +msgstr "クラス、関数、メソッド、デスクリプタ、ジェネレータインスタンスの名前です。" + +#: ../../builtins/stdtypes.rst:6505 +msgid "" +"The :term:`qualified name` of the class, function, method, descriptor, or " +"generator instance." +msgstr "クラス、関数、メソッド、デスクリプタ、ジェネレータインスタンスの :term:`修飾名 ` です。" + +#: ../../builtins/stdtypes.rst:6513 +msgid "The name of the module in which a class or function was defined." +msgstr "" + +#: ../../builtins/stdtypes.rst:6518 +msgid "" +"The documentation string of a class or function, or ``None`` if undefined." +msgstr "" + +#: ../../builtins/stdtypes.rst:6523 +msgid "" +"The :ref:`type parameters ` of generic classes, functions, and " +":ref:`type aliases `. For classes and functions that are not " +"generic, this will be an empty tuple." +msgstr "" + +#: ../../builtins/stdtypes.rst:6533 +msgid "Integer string conversion length limitation" +msgstr "整数と文字列の変換での長さ制限" + +#: ../../builtins/stdtypes.rst:6535 +msgid "" +"CPython has a global limit for converting between :class:`int` and " +":class:`str` to mitigate denial of service attacks. This limit *only* " +"applies to decimal or other non-power-of-two number bases. Hexadecimal, " +"octal, and binary conversions are unlimited. The limit can be configured." +msgstr "" +"CPythonはDoS(サービス妨害攻撃)を軽減するために :class:`int` と :class:`str` " +"の間の変換に全体的な制限を設けました。この制限は10進数や2のべき乗以外の基数に *のみ* " +"適用されます。16進数、8進数と2進数は制限がありません。上限値は設定できます。" + +#: ../../builtins/stdtypes.rst:6540 +msgid "" +"The :class:`int` type in CPython is an arbitrary length number stored in " +"binary form (commonly known as a \"bignum\"). There exists no algorithm that" +" can convert a string to a binary integer or a binary integer to a string in" +" linear time, *unless* the base is a power of 2. Even the best known " +"algorithms for base 10 have sub-quadratic complexity. Converting a large " +"value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." +msgstr "" +"CPython の :class:`int` 型は、任意の長さの数をバイナリ形式で保存したものです (一般に \"bignum\" " +"または多倍長整数として知られています)。基数が2のべき乗でない限り、線形の時間で文字列をバイナリ整数に、あるいはバイナリ整数を文字列に変換できるアルゴリズムは存在しません。10進数に対するアルゴリズムでは、最もよく知られているものでさえ、2次に近い" +" (sub-quadratic) 複雑さになります。高速な CPU でも、 ``int('1' * 500_000)`` " +"のような大きな数の変換は1秒以上かかる可能性があります。" + +#: ../../builtins/stdtypes.rst:6547 +msgid "" +"Limiting conversion size offers a practical way to avoid :cve:`2020-10735`." +msgstr "変換するサイズを制限することは、 :cve:`2020-10735` を回避する実践的な方法を提供します。" + +#: ../../builtins/stdtypes.rst:6549 +msgid "" +"The limit is applied to the number of digit characters in the input or " +"output string when a non-linear conversion algorithm would be involved. " +"Underscores and the sign are not counted towards the limit." +msgstr "" +"制限は、非線形な変換アルゴリズムが必要とされる場合に、入力または出力文字列の桁数に対して適用されます。アンダースコアや正負の符号はカウントされません。" + +#: ../../builtins/stdtypes.rst:6553 +msgid "" +"When an operation would exceed the limit, a :exc:`ValueError` is raised:" +msgstr "演算の結果が制限を超えると、:exc:`ValueError` が送出されます:" + +#: ../../builtins/stdtypes.rst:6555 +msgid "" +">>> import sys\n" +">>> sys.set_int_max_str_digits(4300) # Illustrative, this is the default.\n" +">>> _ = int('2' * 5432)\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: Exceeds the limit (4300 digits) for integer string conversion: value has 5432 digits; use sys.set_int_max_str_digits() to increase the limit\n" +">>> i = int('2' * 4300)\n" +">>> len(str(i))\n" +"4300\n" +">>> i_squared = i*i\n" +">>> len(str(i_squared))\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: Exceeds the limit (4300 digits) for integer string conversion; use sys.set_int_max_str_digits() to increase the limit\n" +">>> len(hex(i_squared))\n" +"7144\n" +">>> assert int(hex(i_squared), base=16) == i*i # Hexadecimal is unlimited." +msgstr "" + +#: ../../builtins/stdtypes.rst:6575 +msgid "" +"The default limit is 4300 digits as provided in " +":data:`sys.int_info.default_max_str_digits `. The lowest limit" +" that can be configured is 640 digits as provided in " +":data:`sys.int_info.str_digits_check_threshold `." +msgstr "" +"デフォルトの上限値は4,300桁で、:data:`sys.int_info.default_max_str_digits `" +" で定義されています。設定可能な最小の上限値は 640 桁で、 " +":data:`sys.int_info.str_digits_check_threshold ` で定義されています。" + +#: ../../builtins/stdtypes.rst:6580 +msgid "Verification:" +msgstr "確認:" + +#: ../../builtins/stdtypes.rst:6582 +msgid "" +">>> import sys\n" +">>> assert sys.int_info.default_max_str_digits == 4300, sys.int_info\n" +">>> assert sys.int_info.str_digits_check_threshold == 640, sys.int_info\n" +">>> msg = int('578966293710682886880994035146873798396722250538762761564'\n" +"... '9252925514383915483333812743580549779436104706260696366600'\n" +"... '571186405732').to_bytes(53, 'big')\n" +"..." +msgstr "" + +#: ../../builtins/stdtypes.rst:6595 +msgid "Affected APIs" +msgstr "影響のあるAPI" + +#: ../../builtins/stdtypes.rst:6597 +msgid "" +"The limitation only applies to potentially slow conversions between " +":class:`int` and :class:`str` or :class:`bytes`:" +msgstr "" +"制限は :class:`int` と :class:`str` または :class:`bytes` " +"の間での変換で時間がかかる可能性があると適用されます:" + +#: ../../builtins/stdtypes.rst:6600 +msgid "``int(string)`` with default base 10." +msgstr "``int(string)`` でデフォルトの基数10。" + +#: ../../builtins/stdtypes.rst:6601 +msgid "``int(string, base)`` for all bases that are not a power of 2." +msgstr "``int(string, base)`` で2のべき乗以外のすべての基数。" + +#: ../../builtins/stdtypes.rst:6602 +msgid "``str(integer)``." +msgstr "``str(integer)``" + +#: ../../builtins/stdtypes.rst:6603 +msgid "``repr(integer)``." +msgstr "``repr(integer)``" + +#: ../../builtins/stdtypes.rst:6604 +msgid "" +"any other string conversion to base 10, for example ``f\"{integer}\"``, " +"``\"{}\".format(integer)``, or ``b\"%d\" % integer``." +msgstr "" +"他の10進数での文字列変換。たとえば ``f\"{integer}\"``、``\"{}\".format(integer)`` や ``b\"%d\"" +" % integer``。 " + +#: ../../builtins/stdtypes.rst:6607 +msgid "The limitations do not apply to functions with a linear algorithm:" +msgstr "制限は、線形アルゴリズムの関数では適用されません。" + +#: ../../builtins/stdtypes.rst:6609 +msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." +msgstr "``int(string, base)`` で基数が2、4、8、16または32。" + +#: ../../builtins/stdtypes.rst:6610 +msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." +msgstr ":func:`int.from_bytes` と :func:`int.to_bytes` 。" + +#: ../../builtins/stdtypes.rst:6611 +msgid ":func:`hex`, :func:`oct`, :func:`bin`." +msgstr ":func:`hex`, :func:`oct`, :func:`bin`." + +#: ../../builtins/stdtypes.rst:6612 +msgid ":ref:`formatspec` for hex, octal, and binary numbers." +msgstr ":ref:`formatspec` での16進数、8進数、2進数での表現。" + +#: ../../builtins/stdtypes.rst:6613 +msgid ":class:`str` to :class:`float`." +msgstr ":class:`str` から :class:`float`。" + +#: ../../builtins/stdtypes.rst:6614 +msgid ":class:`str` to :class:`decimal.Decimal`." +msgstr ":class:`str` から :class:`decimal.Decimal`。" + +#: ../../builtins/stdtypes.rst:6617 +msgid "Configuring the limit" +msgstr "上限値を設定する" + +#: ../../builtins/stdtypes.rst:6619 +msgid "" +"Before Python starts up you can use an environment variable or an " +"interpreter command line flag to configure the limit:" +msgstr "Pythonを起動する前に環境変数またはインタープリタのコマンドラインのフラグで上限値を設定できます。" + +#: ../../builtins/stdtypes.rst:6622 +msgid "" +":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` " +"to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable " +"the limitation." +msgstr "" +":envvar:`PYTHONINTMAXSTRDIGITS`、たとえば ``PYTHONINTMAXSTRDIGITS=640 python3`` " +"は上限値を640に設定し、``PYTHONINTMAXSTRDIGITS=0 python3`` は制限を無効化します。" + +#: ../../builtins/stdtypes.rst:6625 +msgid "" +":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " +"int_max_str_digits=640``" +msgstr "" +":option:`-X int_max_str_digits <-X>`、たとえば ``python3 -X " +"int_max_str_digits=640``" + +#: ../../builtins/stdtypes.rst:6627 +msgid "" +":data:`sys.flags.int_max_str_digits` contains the value of " +":envvar:`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If " +"both the env var and the ``-X`` option are set, the ``-X`` option takes " +"precedence. A value of *-1* indicates that both were unset, thus a value of " +":data:`sys.int_info.default_max_str_digits` was used during initialization." +msgstr "" +":data:`sys.flags.int_max_str_digits` には :envvar:`PYTHONINTMAXSTRDIGITS` または " +":option:`-X int_max_str_digits <-X>` の値が設定されます。環境変数と ``-X`` " +"オプションの両方が指定された場合は ``-X`` オプションが優先されます。 *-1* という値はどちらも未設定であることを表し、その場合は " +":data:`sys.int_info.default_max_str_digits` の値が初期化時に使用されます。" + +#: ../../builtins/stdtypes.rst:6633 +msgid "" +"From code, you can inspect the current limit and set a new one using these " +":mod:`sys` APIs:" +msgstr "コードでは、以下の :mod:`sys` APIを使用して現在の上限値を調べ、新しい値を設定できます。" + +#: ../../builtins/stdtypes.rst:6636 +msgid "" +":func:`sys.get_int_max_str_digits` and :func:`sys.set_int_max_str_digits` " +"are a getter and setter for the interpreter-wide limit. Subinterpreters have" +" their own limit." +msgstr "" +":func:`sys.get_int_max_str_digits` と :func:`sys.set_int_max_str_digits` " +"はインタープリタ全体での上限値を取得、設定できます。サブインタープリタはそれぞれの上限値を持ちます。" + +#: ../../builtins/stdtypes.rst:6640 +msgid "" +"Information about the default and minimum can be found in " +":data:`sys.int_info`:" +msgstr "デフォルト値と最小値に関する情報は :data:`sys.int_info` で参照できます:" + +#: ../../builtins/stdtypes.rst:6642 +msgid "" +":data:`sys.int_info.default_max_str_digits ` is the compiled-" +"in default limit." +msgstr "" +":data:`sys.int_info.default_max_str_digits ` " +"はコンパイル時のデフォルト上限値です。" + +#: ../../builtins/stdtypes.rst:6644 +msgid "" +":data:`sys.int_info.str_digits_check_threshold ` is the lowest" +" accepted value for the limit (other than 0 which disables it)." +msgstr "" +":data:`sys.int_info.str_digits_check_threshold ` " +"は上限値として指定できる最低の値です(0の場合は無効になります)。" + +#: ../../builtins/stdtypes.rst:6651 +msgid "" +"Setting a low limit *can* lead to problems. While rare, code exists that " +"contains integer constants in decimal in their source that exceed the " +"minimum threshold. A consequence of setting the limit is that Python source " +"code containing decimal integer literals longer than the limit will " +"encounter an error during parsing, usually at startup time or import time or" +" even at installation time - anytime an up to date ``.pyc`` does not already" +" exist for the code. A workaround for source that contains such large " +"constants is to convert them to ``0x`` hexadecimal form as it has no limit." +msgstr "" +"小さな上限値を設定することで、問題が起きる *可能性があります* " +"。まれではありますが、ソースコード内で閾値を超える定数が10進数の整数として存在するコードが存在します。値に制限をつけることの帰結は、10進数の整数リテラルで制限を超える長さを持つ定数を含むコードのパース時、すなわち通常は起動時、モジュールのインポート時、またはインストール時など、そのコードのための" +" ``.pyc`` ファイルが作られるまでのどこかの時点でのエラーです。大きな定数を含むソースコードに対する回避策は、その定数を、 ``0x`` " +"を使って値の制限を持たない16進数の値に変換することです。" + +#: ../../builtins/stdtypes.rst:6660 +msgid "" +"Test your application thoroughly if you use a low limit. Ensure your tests " +"run with the limit set early via the environment or flag so that it applies " +"during startup and even during any installation step that may invoke Python " +"to precompile ``.py`` sources to ``.pyc`` files." +msgstr "" +"小さな上限値を使う場合、アプリケーションを徹底的にテストしてください。環境変数やフラグを使って、制限が起動時や、さらにはインストールの段階で " +"Python が ``.py`` ファイルを事前にコンパイルして ``.pyc`` " +"ファイルを作成する際にも適用されるようにした状態で、確実にテストが実行されるようにしてください。" + +#: ../../builtins/stdtypes.rst:6666 +msgid "Recommended configuration" +msgstr "推奨設定" + +#: ../../builtins/stdtypes.rst:6668 +msgid "" +"The default :data:`sys.int_info.default_max_str_digits` is expected to be " +"reasonable for most applications. If your application requires a different " +"limit, set it from your main entry point using Python version agnostic code " +"as these APIs were added in security patch releases in versions before 3.12." +msgstr "" +"デフォルトの :data:`sys.int_info.default_max_str_digits` " +"は、ほとんどのアプリケーションで適切な値であると期待されます。もしあなたのアプリケーションが異なる制限値を必要とする場合は、メインのエントリーポイントから、" +" Python バージョンに依存しないコードを使って制限値を設定してください。こうしなければならない理由は、これらの API が 3.12 " +"以前のセキュリテイパッチリリースで追加されたためです。" + +#: ../../builtins/stdtypes.rst:6673 +msgid "Example::" +msgstr "以下はプログラム例です::" + +#: ../../builtins/stdtypes.rst:6675 +msgid "" +">>> import sys\n" +">>> if hasattr(sys, \"set_int_max_str_digits\"):\n" +"... upper_bound = 68000\n" +"... lower_bound = 4004\n" +"... current_limit = sys.get_int_max_str_digits()\n" +"... if current_limit == 0 or current_limit > upper_bound:\n" +"... sys.set_int_max_str_digits(upper_bound)\n" +"... elif current_limit < lower_bound:\n" +"... sys.set_int_max_str_digits(lower_bound)" +msgstr "" + +#: ../../builtins/stdtypes.rst:6685 +msgid "If you need to disable it entirely, set it to ``0``." +msgstr "完全に無効にするには、``0`` に設定します。" + +#: ../../builtins/stdtypes.rst:6689 +msgid "Footnotes" +msgstr "脚注" + +#: ../../builtins/stdtypes.rst:6690 +msgid "" +"Additional information on these special methods may be found in the Python " +"Reference Manual (:ref:`customization`)." +msgstr "" +"これらの特殊なメソッドのさらなる情報については、 Python リファレンスマニュアル (:ref:`customization`) " +"を参照してください。" + +#: ../../builtins/stdtypes.rst:6693 +msgid "" +"As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``," +" and similarly for tuples." +msgstr "この結果として、リスト ``[1, 2]`` は ``[1.0, 2.0]`` と等しいと見なされます。タプルの場合も同様です。" + +#: ../../builtins/stdtypes.rst:6696 +msgid "They must have since the parser can't tell the type of the operands." +msgstr "パーザが演算対象の型を識別できるようにするために、このような優先順位でなければならないのです。" + +#: ../../builtins/stdtypes.rst:6698 +msgid "" +"Cased characters are those with general category property being one of " +"\"Lu\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " +"titlecase)." +msgstr "" +"大小文字の区別のある文字とは、一般カテゴリプロパティが \"Lu\" (Letter, uppercase (大文字))、 \"Ll\" " +"(Letter, lowercase (小文字))、 \"Lt\" (Letter、titlecase (先頭が大文字)) のいずれかであるものです。" + +#: ../../builtins/stdtypes.rst:6701 +msgid "" +"To format only a tuple you should therefore provide a singleton tuple whose " +"only element is the tuple to be formatted." +msgstr "" +"従って、一個のタプルだけをフォーマット出力したい場合には出力したいタプルを唯一の要素とする単一のタプルを *values* に与えなくてはなりません。" + +#: ../../builtins/stdtypes.rst:13 +msgid "built-in" +msgstr "組み込み" + +#: ../../builtins/stdtypes.rst:13 ../../builtins/stdtypes.rst:332 +#: ../../builtins/stdtypes.rst:409 ../../builtins/stdtypes.rst:1005 +#: ../../builtins/stdtypes.rst:1197 ../../builtins/stdtypes.rst:1219 +#: ../../builtins/stdtypes.rst:1234 ../../builtins/stdtypes.rst:5342 +#: ../../builtins/stdtypes.rst:6405 +msgid "types" +msgstr "types" + +#: ../../builtins/stdtypes.rst:34 ../../builtins/stdtypes.rst:1234 +#: ../../builtins/stdtypes.rst:5342 +msgid "statement" +msgstr "statement" + +#: ../../builtins/stdtypes.rst:34 +msgid "if" +msgstr "if" + +#: ../../builtins/stdtypes.rst:34 +msgid "while" +msgstr "while" + +#: ../../builtins/stdtypes.rst:34 +msgid "truth" +msgstr "真理値" + +#: ../../builtins/stdtypes.rst:34 +msgid "value" +msgstr "value" + +#: ../../builtins/stdtypes.rst:34 ../../builtins/stdtypes.rst:83 +#: ../../builtins/stdtypes.rst:210 ../../builtins/stdtypes.rst:869 +msgid "Boolean" +msgstr "Boolean" + +#: ../../builtins/stdtypes.rst:34 ../../builtins/stdtypes.rst:83 +#: ../../builtins/stdtypes.rst:409 +msgid "operations" +msgstr "操作" + +#: ../../builtins/stdtypes.rst:34 +msgid "false" +msgstr "false" + +#: ../../builtins/stdtypes.rst:44 +msgid "true" +msgstr "true" + +#: ../../builtins/stdtypes.rst:54 +msgid "None (Built-in object)" +msgstr "None (組み込みオブジェクト)" + +#: ../../builtins/stdtypes.rst:54 +msgid "False (Built-in object)" +msgstr "False (組み込みオブジェクト)" + +#: ../../builtins/stdtypes.rst:66 ../../builtins/stdtypes.rst:100 +#: ../../builtins/stdtypes.rst:125 ../../builtins/stdtypes.rst:197 +#: ../../builtins/stdtypes.rst:251 ../../builtins/stdtypes.rst:409 +#: ../../builtins/stdtypes.rst:1005 +msgid "operator" +msgstr "operator" + +#: ../../builtins/stdtypes.rst:66 ../../builtins/stdtypes.rst:100 +msgid "or" +msgstr "or" + +#: ../../builtins/stdtypes.rst:66 ../../builtins/stdtypes.rst:100 +msgid "and" +msgstr "and" + +#: ../../builtins/stdtypes.rst:66 ../../builtins/stdtypes.rst:869 +msgid "False" +msgstr "False" + +#: ../../builtins/stdtypes.rst:66 ../../builtins/stdtypes.rst:869 +msgid "True" +msgstr "True" + +#: ../../builtins/stdtypes.rst:100 +msgid "not" +msgstr "not" + +#: ../../builtins/stdtypes.rst:125 +msgid "chaining" +msgstr "連鎖" + +#: ../../builtins/stdtypes.rst:125 +msgid "comparisons" +msgstr "比較" + +#: ../../builtins/stdtypes.rst:125 +msgid "comparison" +msgstr "比較" + +#: ../../builtins/stdtypes.rst:125 +msgid "==" +msgstr "==" + +#: ../../builtins/stdtypes.rst:125 +msgid "< (less)" +msgstr "< (小さい)" + +#: ../../builtins/stdtypes.rst:125 +msgid "<=" +msgstr "<=" + +#: ../../builtins/stdtypes.rst:125 +msgid "> (greater)" +msgstr "> (大きい)" + +#: ../../builtins/stdtypes.rst:125 +msgid ">=" +msgstr ">=" + +#: ../../builtins/stdtypes.rst:125 +msgid "!=" +msgstr "!=" + +#: ../../builtins/stdtypes.rst:125 +msgid "is" +msgstr "is" + +#: ../../builtins/stdtypes.rst:125 +msgid "is not" +msgstr "is not" + +#: ../../builtins/stdtypes.rst:165 ../../builtins/stdtypes.rst:210 +#: ../../builtins/stdtypes.rst:986 ../../builtins/stdtypes.rst:1197 +#: ../../builtins/stdtypes.rst:1219 ../../builtins/stdtypes.rst:1384 +#: ../../builtins/stdtypes.rst:1470 ../../builtins/stdtypes.rst:1518 +#: ../../builtins/stdtypes.rst:1639 ../../builtins/stdtypes.rst:1773 +#: ../../builtins/stdtypes.rst:3311 ../../builtins/stdtypes.rst:3330 +#: ../../builtins/stdtypes.rst:3443 ../../builtins/stdtypes.rst:5123 +#: ../../builtins/stdtypes.rst:5342 ../../builtins/stdtypes.rst:5881 +#: ../../builtins/stdtypes.rst:6149 ../../builtins/stdtypes.rst:6324 +#: ../../builtins/stdtypes.rst:6369 +msgid "object" +msgstr "object" + +#: ../../builtins/stdtypes.rst:165 ../../builtins/stdtypes.rst:210 +#: ../../builtins/stdtypes.rst:231 ../../builtins/stdtypes.rst:332 +#: ../../builtins/stdtypes.rst:351 +msgid "numeric" +msgstr "数値" + +#: ../../builtins/stdtypes.rst:165 +msgid "objects" +msgstr "オブジェクト" + +#: ../../builtins/stdtypes.rst:165 +msgid "comparing" +msgstr "比較する" + +#: ../../builtins/stdtypes.rst:175 +msgid "__eq__() (instance method)" +msgstr "__eq__() (インスタンスメソッド)" + +#: ../../builtins/stdtypes.rst:175 +msgid "__ne__() (instance method)" +msgstr "__ne__() (インスタンスメソッド)" + +#: ../../builtins/stdtypes.rst:175 +msgid "__lt__() (instance method)" +msgstr "__lt__() (インスタンスメソッド)" + +#: ../../builtins/stdtypes.rst:175 +msgid "__le__() (instance method)" +msgstr "__le__() (インスタンスメソッド)" + +#: ../../builtins/stdtypes.rst:175 +msgid "__gt__() (instance method)" +msgstr "__gt__() (インスタンスメソッド)" + +#: ../../builtins/stdtypes.rst:175 +msgid "__ge__() (instance method)" +msgstr "__ge__() (インスタンスメソッド)" + +#: ../../builtins/stdtypes.rst:197 ../../builtins/stdtypes.rst:1005 +msgid "in" +msgstr "in" + +#: ../../builtins/stdtypes.rst:197 ../../builtins/stdtypes.rst:1005 +msgid "not in" +msgstr "not in" + +#: ../../builtins/stdtypes.rst:210 ../../builtins/stdtypes.rst:231 +#: ../../builtins/stdtypes.rst:409 +msgid "integer" +msgstr "整数" + +#: ../../builtins/stdtypes.rst:210 ../../builtins/stdtypes.rst:231 +msgid "floating-point" +msgstr "浮動小数点" + +#: ../../builtins/stdtypes.rst:210 ../../builtins/stdtypes.rst:231 +msgid "complex number" +msgstr "complex number" + +#: ../../builtins/stdtypes.rst:210 +msgid "C" +msgstr "C" + +#: ../../builtins/stdtypes.rst:210 +msgid "language" +msgstr "言語" + +#: ../../builtins/stdtypes.rst:231 +msgid "literals" +msgstr "リテラル" + +#: ../../builtins/stdtypes.rst:231 +msgid "hexadecimal" +msgstr "16進数" + +#: ../../builtins/stdtypes.rst:231 +msgid "octal" +msgstr "8進数" + +#: ../../builtins/stdtypes.rst:231 +msgid "binary" +msgstr "2進数" + +#: ../../builtins/stdtypes.rst:251 +msgid "arithmetic" +msgstr "算術" + +#: ../../builtins/stdtypes.rst:251 ../../builtins/stdtypes.rst:1005 +#: ../../builtins/stdtypes.rst:1197 ../../builtins/stdtypes.rst:5342 +#: ../../builtins/stdtypes.rst:6376 ../../builtins/stdtypes.rst:6390 +#: ../../builtins/stdtypes.rst:6405 +msgid "built-in function" +msgstr "組み込み関数" + +#: ../../builtins/stdtypes.rst:251 +msgid "int" +msgstr "int" + +#: ../../builtins/stdtypes.rst:251 +msgid "float" +msgstr "浮動小数点数" + +#: ../../builtins/stdtypes.rst:251 +msgid "complex" +msgstr "複素数" + +#: ../../builtins/stdtypes.rst:251 ../../builtins/stdtypes.rst:3183 +#: ../../builtins/stdtypes.rst:4485 +msgid "+ (plus)" +msgstr "+ (プラス記号)" + +#: ../../builtins/stdtypes.rst:251 +msgid "unary operator" +msgstr "単項演算子" + +#: ../../builtins/stdtypes.rst:251 +msgid "binary operator" +msgstr "二項演算子" + +#: ../../builtins/stdtypes.rst:251 ../../builtins/stdtypes.rst:3183 +#: ../../builtins/stdtypes.rst:4485 +msgid "- (minus)" +msgstr "- (負符号)" + +#: ../../builtins/stdtypes.rst:251 ../../builtins/stdtypes.rst:3140 +#: ../../builtins/stdtypes.rst:4442 +msgid "* (asterisk)" +msgstr "* (アスタリスク)" + +#: ../../builtins/stdtypes.rst:251 +msgid "/ (slash)" +msgstr "/ (スラッシュ)" + +#: ../../builtins/stdtypes.rst:251 +msgid "//" +msgstr "//" + +#: ../../builtins/stdtypes.rst:251 ../../builtins/stdtypes.rst:3103 +#: ../../builtins/stdtypes.rst:4410 +msgid "% (percent)" +msgstr "% (パーセント)" + +#: ../../builtins/stdtypes.rst:251 +msgid "**" +msgstr "**" + +#: ../../builtins/stdtypes.rst:332 ../../builtins/stdtypes.rst:409 +#: ../../builtins/stdtypes.rst:1005 ../../builtins/stdtypes.rst:1234 +#: ../../builtins/stdtypes.rst:5342 +msgid "operations on" +msgstr "演算" + +#: ../../builtins/stdtypes.rst:332 +msgid "conjugate() (complex number method)" +msgstr "conjugate() (複素数のメソッド)" + +#: ../../builtins/stdtypes.rst:351 ../../builtins/stdtypes.rst:1841 +#: ../../builtins/stdtypes.rst:3311 ../../builtins/stdtypes.rst:6405 +msgid "module" +msgstr "module" + +#: ../../builtins/stdtypes.rst:351 +msgid "math" +msgstr "math" + +#: ../../builtins/stdtypes.rst:351 +msgid "floor() (in module math)" +msgstr "floor() (math モジュール)" + +#: ../../builtins/stdtypes.rst:351 +msgid "ceil() (in module math)" +msgstr "ceil() (math モジュール)" + +#: ../../builtins/stdtypes.rst:351 +msgid "trunc() (in module math)" +msgstr "trunc() (math モジュール)" + +#: ../../builtins/stdtypes.rst:351 +msgid "conversions" +msgstr "変換" + +#: ../../builtins/stdtypes.rst:409 +msgid "bitwise" +msgstr "ビット単位" + +#: ../../builtins/stdtypes.rst:409 +msgid "shifting" +msgstr "シフト" + +#: ../../builtins/stdtypes.rst:409 +msgid "masking" +msgstr "ビットマスク" + +#: ../../builtins/stdtypes.rst:409 +msgid "| (vertical bar)" +msgstr "| (縦棒)" + +#: ../../builtins/stdtypes.rst:409 +msgid "^ (caret)" +msgstr "^ (キャレット)" + +#: ../../builtins/stdtypes.rst:409 +msgid "& (ampersand)" +msgstr "& (アンパサンド)" + +#: ../../builtins/stdtypes.rst:409 +msgid "<<" +msgstr "<<" + +#: ../../builtins/stdtypes.rst:409 +msgid ">>" +msgstr ">>" + +#: ../../builtins/stdtypes.rst:409 +msgid "~ (tilde)" +msgstr "~ (チルダ)" + +#: ../../builtins/stdtypes.rst:869 +msgid "values" +msgstr "``values``" + +#: ../../builtins/stdtypes.rst:899 +msgid "iterator protocol" +msgstr "イテレータプロトコル" + +#: ../../builtins/stdtypes.rst:899 ../../builtins/stdtypes.rst:5794 +msgid "protocol" +msgstr "プロトコル" + +#: ../../builtins/stdtypes.rst:899 +msgid "iterator" +msgstr "iterator" + +#: ../../builtins/stdtypes.rst:899 ../../builtins/stdtypes.rst:986 +#: ../../builtins/stdtypes.rst:1005 ../../builtins/stdtypes.rst:1197 +#: ../../builtins/stdtypes.rst:1219 ../../builtins/stdtypes.rst:1234 +msgid "sequence" +msgstr "sequence" + +#: ../../builtins/stdtypes.rst:899 +msgid "iteration" +msgstr "反復処理" + +#: ../../builtins/stdtypes.rst:899 +msgid "container" +msgstr "コンテナ" + +#: ../../builtins/stdtypes.rst:899 +msgid "iteration over" +msgstr "での反復" + +#: ../../builtins/stdtypes.rst:1005 ../../builtins/stdtypes.rst:5342 +msgid "len" +msgstr "len" + +#: ../../builtins/stdtypes.rst:1005 +msgid "min" +msgstr "min" + +#: ../../builtins/stdtypes.rst:1005 +msgid "max" +msgstr "max" + +#: ../../builtins/stdtypes.rst:1005 +msgid "concatenation" +msgstr "結合" + +#: ../../builtins/stdtypes.rst:1005 +msgid "operation" +msgstr "演算" + +#: ../../builtins/stdtypes.rst:1005 +msgid "repetition" +msgstr "繰り返し" + +#: ../../builtins/stdtypes.rst:1005 ../../builtins/stdtypes.rst:1234 +msgid "subscript" +msgstr "添字" + +#: ../../builtins/stdtypes.rst:1005 ../../builtins/stdtypes.rst:1234 +msgid "slice" +msgstr "slice" + +#: ../../builtins/stdtypes.rst:1052 +msgid "loop" +msgstr "loop" + +#: ../../builtins/stdtypes.rst:1052 +msgid "over mutable sequence" +msgstr "over mutable sequence" + +#: ../../builtins/stdtypes.rst:1052 +msgid "mutable sequence" +msgstr "変更可能なシーケンス" + +#: ../../builtins/stdtypes.rst:1052 +msgid "loop over" +msgstr "loop over" + +#: ../../builtins/stdtypes.rst:1197 +msgid "immutable" +msgstr "immutable" + +#: ../../builtins/stdtypes.rst:1197 ../../builtins/stdtypes.rst:1470 +msgid "tuple" +msgstr "tuple" + +#: ../../builtins/stdtypes.rst:1197 +msgid "hash" +msgstr "hash" + +#: ../../builtins/stdtypes.rst:1219 +msgid "mutable" +msgstr "mutable" + +#: ../../builtins/stdtypes.rst:1219 ../../builtins/stdtypes.rst:1234 +#: ../../builtins/stdtypes.rst:1384 +msgid "list" +msgstr "list" + +#: ../../builtins/stdtypes.rst:1219 ../../builtins/stdtypes.rst:3311 +#: ../../builtins/stdtypes.rst:3443 ../../builtins/stdtypes.rst:3582 +#: ../../builtins/stdtypes.rst:4410 +msgid "bytearray" +msgstr "bytearray" + +#: ../../builtins/stdtypes.rst:1234 ../../builtins/stdtypes.rst:5342 +#: ../../builtins/stdtypes.rst:6149 ../../builtins/stdtypes.rst:6405 +msgid "type" +msgstr "type" + +#: ../../builtins/stdtypes.rst:1234 +msgid "assignment" +msgstr "代入" + +#: ../../builtins/stdtypes.rst:1234 ../../builtins/stdtypes.rst:5342 +msgid "del" +msgstr "del" + +#: ../../builtins/stdtypes.rst:1518 +msgid "range" +msgstr "range" + +#: ../../builtins/stdtypes.rst:1639 ../../builtins/stdtypes.rst:1786 +#: ../../builtins/stdtypes.rst:1833 ../../builtins/stdtypes.rst:2931 +#: ../../builtins/stdtypes.rst:3103 +msgid "string" +msgstr "string" + +#: ../../builtins/stdtypes.rst:1639 +msgid "text sequence type" +msgstr "テキストシーケンス型" + +#: ../../builtins/stdtypes.rst:1639 ../../builtins/stdtypes.rst:1786 +#: ../../builtins/stdtypes.rst:1806 +msgid "str (built-in class)" +msgstr "str (組み込みクラス)" + +#: ../../builtins/stdtypes.rst:1639 +msgid "(see also string)" +msgstr "(string も参照のこと)" + +#: ../../builtins/stdtypes.rst:1773 +msgid "io.StringIO" +msgstr "io.StringIO" + +#: ../../builtins/stdtypes.rst:1806 ../../builtins/stdtypes.rst:3303 +msgid "buffer protocol" +msgstr "buffer protocol" + +#: ../../builtins/stdtypes.rst:1806 ../../builtins/stdtypes.rst:3311 +#: ../../builtins/stdtypes.rst:3330 ../../builtins/stdtypes.rst:3582 +#: ../../builtins/stdtypes.rst:4410 +msgid "bytes" +msgstr "bytes" + +#: ../../builtins/stdtypes.rst:1833 ../../builtins/stdtypes.rst:3582 +msgid "methods" +msgstr "メソッド" + +#: ../../builtins/stdtypes.rst:1841 +msgid "re" +msgstr "re" + +#: ../../builtins/stdtypes.rst:2693 ../../builtins/stdtypes.rst:4264 +msgid "universal newlines" +msgstr "universal newlines" + +#: ../../builtins/stdtypes.rst:2693 +msgid "str.splitlines method" +msgstr "str.splitlines メソッド" + +#: ../../builtins/stdtypes.rst:2931 +msgid "! formatted string literal" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "formatted string literals" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "! f-string" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "f-strings" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "fstring" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "interpolated string literal" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "formatted literal" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "interpolated literal" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "{} (curly brackets)" +msgstr "{} (波括弧)" + +#: ../../builtins/stdtypes.rst:2931 +msgid "in formatted string literal" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid "! (exclamation mark)" +msgstr "" + +#: ../../builtins/stdtypes.rst:2931 +msgid ": (colon)" +msgstr ": (コロン)" + +#: ../../builtins/stdtypes.rst:2931 +msgid "= (equals)" +msgstr "= (等号)" + +#: ../../builtins/stdtypes.rst:2931 +msgid "for help in debugging using string literals" +msgstr "" + +#: ../../builtins/stdtypes.rst:3103 +msgid "formatting, string (%)" +msgstr "書式化, 文字列 (%)" + +#: ../../builtins/stdtypes.rst:3103 +msgid "interpolation, string (%)" +msgstr "補間, 文字列 (%)" + +#: ../../builtins/stdtypes.rst:3103 +msgid "formatting, printf" +msgstr "formatting, printf" + +#: ../../builtins/stdtypes.rst:3103 +msgid "interpolation, printf" +msgstr "interpolation, printf" + +#: ../../builtins/stdtypes.rst:3103 ../../builtins/stdtypes.rst:4410 +msgid "printf-style formatting" +msgstr "printf 形式の書式化" + +#: ../../builtins/stdtypes.rst:3103 ../../builtins/stdtypes.rst:4410 +msgid "sprintf-style formatting" +msgstr "sprintf 形式の書式化" + +#: ../../builtins/stdtypes.rst:3140 ../../builtins/stdtypes.rst:4442 +msgid "() (parentheses)" +msgstr "() (丸括弧)" + +#: ../../builtins/stdtypes.rst:3140 ../../builtins/stdtypes.rst:3183 +#: ../../builtins/stdtypes.rst:4442 ../../builtins/stdtypes.rst:4485 +msgid "in printf-style formatting" +msgstr "in printf-style formatting" + +#: ../../builtins/stdtypes.rst:3140 ../../builtins/stdtypes.rst:4442 +msgid ". (dot)" +msgstr ". (ドット)" + +#: ../../builtins/stdtypes.rst:3183 ../../builtins/stdtypes.rst:4485 +msgid "# (hash)" +msgstr "# (hash)" + +#: ../../builtins/stdtypes.rst:3183 ../../builtins/stdtypes.rst:4485 +msgid "space" +msgstr "空白" + +#: ../../builtins/stdtypes.rst:3303 +msgid "binary sequence types" +msgstr "バイナリシーケンス型" + +#: ../../builtins/stdtypes.rst:3311 +msgid "memoryview" +msgstr "memoryview" + +#: ../../builtins/stdtypes.rst:3311 +msgid "array" +msgstr "array" + +#: ../../builtins/stdtypes.rst:4264 +msgid "bytes.splitlines method" +msgstr "bytes.splitlines メソッド" + +#: ../../builtins/stdtypes.rst:4264 +msgid "bytearray.splitlines method" +msgstr "bytearray.splitlines メソッド" + +#: ../../builtins/stdtypes.rst:4410 +msgid "formatting" +msgstr "書式化" + +#: ../../builtins/stdtypes.rst:4410 +msgid "bytes (%)" +msgstr "bytes (%)" + +#: ../../builtins/stdtypes.rst:4410 +msgid "bytearray (%)" +msgstr "bytearray (%)" + +#: ../../builtins/stdtypes.rst:4410 +msgid "interpolation" +msgstr "補間" + +#: ../../builtins/stdtypes.rst:5123 +msgid "set" +msgstr "集合" + +#: ../../builtins/stdtypes.rst:5342 +msgid "mapping" +msgstr "mapping" + +#: ../../builtins/stdtypes.rst:5342 +msgid "dictionary" +msgstr "dictionary" + +#: ../../builtins/stdtypes.rst:5455 +msgid "__missing__()" +msgstr "__missing__()" + +#: ../../builtins/stdtypes.rst:5794 +msgid "context manager" +msgstr "context manager" + +#: ../../builtins/stdtypes.rst:5794 +msgid "context management protocol" +msgstr "コンテキスト管理プロトコル" + +#: ../../builtins/stdtypes.rst:5794 +msgid "context management" +msgstr "コンテキスト管理" + +#: ../../builtins/stdtypes.rst:5869 +msgid "annotation" +msgstr "注釈" + +#: ../../builtins/stdtypes.rst:5869 +msgid "type annotation; type hint" +msgstr "type annotation; type hint" + +#: ../../builtins/stdtypes.rst:5881 +msgid "GenericAlias" +msgstr "GenericAlias" + +#: ../../builtins/stdtypes.rst:5881 +msgid "Generic" +msgstr "Generic" + +#: ../../builtins/stdtypes.rst:5881 +msgid "Alias" +msgstr "Alias" + +#: ../../builtins/stdtypes.rst:6149 +msgid "Union" +msgstr "Union" + +#: ../../builtins/stdtypes.rst:6149 +msgid "union" +msgstr "union" + +#: ../../builtins/stdtypes.rst:6324 +msgid "method" +msgstr "メソッド" + +#: ../../builtins/stdtypes.rst:6369 +msgid "code" +msgstr "コード" + +#: ../../builtins/stdtypes.rst:6369 +msgid "code object" +msgstr "コードオブジェクト" + +#: ../../builtins/stdtypes.rst:6376 +msgid "compile" +msgstr "コンパイル" + +#: ../../builtins/stdtypes.rst:6376 +msgid "__code__ (function object attribute)" +msgstr "__code__ (関数オブジェクトの属性)" + +#: ../../builtins/stdtypes.rst:6390 +msgid "exec" +msgstr "exec" + +#: ../../builtins/stdtypes.rst:6390 +msgid "eval" +msgstr "eval" + +#: ../../builtins/stdtypes.rst:6429 +msgid "..." +msgstr "..." + +#: ../../builtins/stdtypes.rst:6429 +msgid "ellipsis literal" +msgstr "ellipsisリテラル" diff --git a/builtins/threadsafety.po b/builtins/threadsafety.po new file mode 100644 index 000000000..f8a6ad38f --- /dev/null +++ b/builtins/threadsafety.po @@ -0,0 +1,826 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" +"PO-Revision-Date: 2026-09-13 17:09+0000\n" +"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../../builtins/threadsafety.rst:5 +msgid "Thread Safety Guarantees" +msgstr "" + +#: ../../builtins/threadsafety.rst:7 +msgid "" +"This page documents thread-safety guarantees for built-in types in Python's " +"free-threaded build. The guarantees described here apply when using Python " +"with the :term:`GIL` disabled (free-threaded mode). When the GIL is enabled," +" most operations are implicitly serialized." +msgstr "" + +#: ../../builtins/threadsafety.rst:12 +msgid "" +"For general guidance on writing thread-safe code in free-threaded Python, " +"see :ref:`freethreading-python-howto`." +msgstr "" + +#: ../../builtins/threadsafety.rst:19 +msgid "Thread safety levels" +msgstr "" + +#: ../../builtins/threadsafety.rst:21 +msgid "" +"The C API documentation uses the following levels to describe the thread " +"safety guarantees of each function. The levels are listed from least to most" +" safe." +msgstr "" + +#: ../../builtins/threadsafety.rst:28 +msgid "Incompatible" +msgstr "" + +#: ../../builtins/threadsafety.rst:30 +msgid "" +"A function or operation that cannot be made safe for concurrent use even " +"with external synchronization. Incompatible code typically accesses global " +"state in an unsynchronized way and must only be called from a single thread " +"throughout the program's lifetime." +msgstr "" + +#: ../../builtins/threadsafety.rst:35 +msgid "" +"Example: a function that modifies process-wide state such as signal handlers" +" or environment variables, where concurrent calls from any threads, even " +"with external locking, can conflict with the runtime or other libraries." +msgstr "" + +#: ../../builtins/threadsafety.rst:42 +msgid "Compatible" +msgstr "" + +#: ../../builtins/threadsafety.rst:44 +msgid "" +"A function or operation that is safe to call from multiple threads " +"*provided* the caller supplies appropriate external synchronization, for " +"example by holding a :term:`lock` for the duration of each call. Without " +"such synchronization, concurrent calls may produce :term:`race conditions " +"` or :term:`data races `." +msgstr "" + +#: ../../builtins/threadsafety.rst:50 +msgid "" +"Example: a function that reads from or writes to an object whose internal " +"state is not protected by a lock. Callers must ensure that no two threads " +"access the same object at the same time." +msgstr "" + +#: ../../builtins/threadsafety.rst:57 +msgid "Safe on distinct objects" +msgstr "" + +#: ../../builtins/threadsafety.rst:59 +msgid "" +"A function or operation that is safe to call from multiple threads without " +"external synchronization, as long as each thread operates on a **different**" +" object. Two threads may call the function at the same time, but they must " +"not pass the same object (or objects that share underlying state) as " +"arguments." +msgstr "" + +#: ../../builtins/threadsafety.rst:65 +msgid "" +"Example: a function that modifies fields of a struct using non-atomic " +"writes. Two threads can each call the function on their own struct instance " +"safely, but concurrent calls on the *same* instance require external " +"synchronization." +msgstr "" + +#: ../../builtins/threadsafety.rst:73 +msgid "Safe on shared objects" +msgstr "" + +#: ../../builtins/threadsafety.rst:75 +msgid "" +"A function or operation that is safe for concurrent use on the **same** " +"object. The implementation uses internal synchronization (such as " +":term:`per-object locks ` or :ref:`critical sections " +"`) to protect shared mutable state, so callers " +"do not need to supply their own locking." +msgstr "" + +#: ../../builtins/threadsafety.rst:81 +msgid "" +"Example: :c:func:`PyList_GetItemRef` can be called from multiple threads on " +"the same :c:type:`PyListObject` - it uses internal synchronization to " +"serialize access." +msgstr "" + +#: ../../builtins/threadsafety.rst:88 +msgid "Atomic" +msgstr "" + +#: ../../builtins/threadsafety.rst:90 +msgid "" +"A function or operation that appears :term:`atomic ` with " +"respect to other threads - it executes instantaneously from the perspective " +"of other threads. This is the strongest form of thread safety." +msgstr "" + +#: ../../builtins/threadsafety.rst:94 +msgid "" +"Example: :c:func:`PyMutex_IsLocked` performs an atomic read of the mutex " +"state and can be called from any thread at any time." +msgstr "" + +#: ../../builtins/threadsafety.rst:101 +msgid "Thread safety for list objects" +msgstr "" + +#: ../../builtins/threadsafety.rst:103 +msgid "" +"Reading a single element from a :class:`list` is :term:`atomic `:" +msgstr "" + +#: ../../builtins/threadsafety.rst:106 +msgid "lst[i] # list.__getitem__" +msgstr "" + +#: ../../builtins/threadsafety.rst:111 +msgid "" +"The following methods traverse the list and use :term:`atomic ` reads of each item to perform their function. That means that " +"they may return results affected by concurrent modifications:" +msgstr "" + +#: ../../builtins/threadsafety.rst:115 +msgid "" +"item in lst\n" +"lst.index(item)\n" +"lst.count(item)" +msgstr "" + +#: ../../builtins/threadsafety.rst:122 +msgid "" +"All of the above operations avoid acquiring :term:`per-object locks `. They do not block concurrent modifications. Other operations " +"that hold a lock will not block these from observing intermediate states." +msgstr "" + +#: ../../builtins/threadsafety.rst:127 +msgid "" +"All other operations from here on block using the :term:`per-object lock`." +msgstr "" + +#: ../../builtins/threadsafety.rst:129 +msgid "" +"Writing a single item via ``lst[i] = x`` is safe to call from multiple " +"threads and will not corrupt the list." +msgstr "" + +#: ../../builtins/threadsafety.rst:132 +msgid "" +"The following operations return new objects and appear :term:`atomic ` to other threads:" +msgstr "" + +#: ../../builtins/threadsafety.rst:135 +msgid "" +"lst1 + lst2 # concatenates two lists into a new list\n" +"x * lst # repeats lst x times into a new list\n" +"lst.copy() # returns a shallow copy of the list" +msgstr "" + +#: ../../builtins/threadsafety.rst:142 +msgid "" +"The following methods that only operate on a single element with no shifting" +" required are :term:`atomic `:" +msgstr "" + +#: ../../builtins/threadsafety.rst:145 +msgid "" +"lst.append(x) # append to the end of the list, no shifting required\n" +"lst.pop() # pop element from the end of the list, no shifting required" +msgstr "" + +#: ../../builtins/threadsafety.rst:151 +msgid "" +"The :meth:`~list.clear` method is also :term:`atomic `. " +"Other threads cannot observe elements being removed." +msgstr "" + +#: ../../builtins/threadsafety.rst:154 +msgid "" +"The :meth:`~list.sort` method is not :term:`atomic `. " +"Other threads cannot observe intermediate states during sorting, but the " +"list appears empty for the duration of the sort." +msgstr "" + +#: ../../builtins/threadsafety.rst:158 +msgid "" +"The following operations may allow :term:`lock-free` operations to observe " +"intermediate states since they modify multiple elements in place:" +msgstr "" + +#: ../../builtins/threadsafety.rst:161 +msgid "" +"lst.insert(idx, item) # shifts elements\n" +"lst.pop(idx) # idx not at the end of the list, shifts elements\n" +"lst *= x # copies elements in place" +msgstr "" + +#: ../../builtins/threadsafety.rst:168 +msgid "" +"The :meth:`~list.remove` method may allow concurrent modifications since " +"element comparison may execute arbitrary Python code (via " +":meth:`~object.__eq__`)." +msgstr "" + +#: ../../builtins/threadsafety.rst:172 +msgid "" +":meth:`~list.extend` is safe to call from multiple threads. However, its " +"guarantees depend on the iterable passed to it. If it is a :class:`list`, a " +":class:`tuple`, a :class:`set`, a :class:`frozenset`, a :class:`dict` or a " +":ref:`dictionary view object ` (but not their subclasses), the " +"``extend`` operation is safe from concurrent modifications to the iterable. " +"Otherwise, an iterator is created which can be concurrently modified by " +"another thread. The same applies to inplace concatenation of a list with " +"other iterables when using ``lst += iterable``." +msgstr "" + +#: ../../builtins/threadsafety.rst:181 +msgid "" +"Similarly, assigning to a list slice with ``lst[i:j] = iterable`` is safe to" +" call from multiple threads, but ``iterable`` is only locked when it is also" +" a :class:`list` (but not its subclasses)." +msgstr "" + +#: ../../builtins/threadsafety.rst:185 +msgid "" +"Operations that involve multiple accesses, as well as iteration, are never " +"atomic. For example:" +msgstr "" + +#: ../../builtins/threadsafety.rst:188 +msgid "" +"# NOT atomic: read-modify-write\n" +"lst[i] = lst[i] + 1\n" +"\n" +"# NOT atomic: check-then-act\n" +"if lst:\n" +" item = lst.pop()\n" +"\n" +"# NOT thread-safe: iteration while modifying\n" +"for item in lst:\n" +" process(item) # another thread may modify lst" +msgstr "" + +#: ../../builtins/threadsafety.rst:202 +msgid "" +"Consider external synchronization when sharing :class:`list` instances " +"across threads." +msgstr "" + +#: ../../builtins/threadsafety.rst:209 +msgid "Thread safety for dict objects" +msgstr "" + +#: ../../builtins/threadsafety.rst:211 +msgid "" +"Creating a dictionary with the :class:`dict` constructor is atomic when the " +"argument to it is a :class:`dict` or a :class:`tuple`. When using the " +":meth:`dict.fromkeys` method, dictionary creation is atomic when the " +"argument is a :class:`dict`, :class:`tuple`, :class:`set` or " +":class:`frozenset`." +msgstr "" + +#: ../../builtins/threadsafety.rst:217 +msgid "" +"The following operations and functions are :term:`lock-free` and " +":term:`atomic `." +msgstr "" + +#: ../../builtins/threadsafety.rst:220 +msgid "" +"d[key] # dict.__getitem__\n" +"d.get(key) # dict.get\n" +"key in d # dict.__contains__\n" +"len(d) # dict.__len__" +msgstr "" + +#: ../../builtins/threadsafety.rst:228 +msgid "All other operations from here on hold the :term:`per-object lock`." +msgstr "" + +#: ../../builtins/threadsafety.rst:230 +msgid "" +"Writing or removing a single item is safe to call from multiple threads and " +"will not corrupt the dictionary:" +msgstr "" + +#: ../../builtins/threadsafety.rst:233 +msgid "" +"d[key] = value # write\n" +"del d[key] # delete\n" +"d.pop(key) # remove and return\n" +"d.popitem() # remove and return last item\n" +"d.setdefault(key, v) # insert if missing" +msgstr "" + +#: ../../builtins/threadsafety.rst:242 +msgid "" +"These operations may compare keys using :meth:`~object.__eq__`, which can " +"execute arbitrary Python code. During such comparisons, the dictionary may " +"be modified by another thread. For built-in types like :class:`str`, " +":class:`int`, and :class:`float`, that implement :meth:`~object.__eq__` in " +"C, the underlying lock is not released during comparisons and this is not a " +"concern." +msgstr "" + +#: ../../builtins/threadsafety.rst:249 +msgid "" +"The following operations return new objects and hold the :term:`per-object " +"lock` for the duration of the operation:" +msgstr "" + +#: ../../builtins/threadsafety.rst:252 +msgid "" +"d.copy() # returns a shallow copy of the dictionary\n" +"d | other # merges two dicts into a new dict\n" +"d.keys() # returns a new dict_keys view object\n" +"d.values() # returns a new dict_values view object\n" +"d.items() # returns a new dict_items view object" +msgstr "" + +#: ../../builtins/threadsafety.rst:261 +msgid "" +"The :meth:`~dict.clear` method holds the lock for its duration. Other " +"threads cannot observe elements being removed." +msgstr "" + +#: ../../builtins/threadsafety.rst:264 +msgid "" +"The following operations lock both dictionaries. For :meth:`~dict.update` " +"and ``|=``, this applies only when the other operand is a :class:`dict` that" +" uses the standard dict iterator (but not subclasses that override " +"iteration). For equality comparison, this applies to :class:`dict` and its " +"subclasses:" +msgstr "" + +#: ../../builtins/threadsafety.rst:270 +msgid "" +"d.update(other_dict) # both locked when other_dict is a dict\n" +"d |= other_dict # both locked when other_dict is a dict\n" +"d == other_dict # both locked for dict and subclasses" +msgstr "" + +#: ../../builtins/threadsafety.rst:277 +msgid "" +"All comparison operations also compare values using :meth:`~object.__eq__`, " +"so for non-built-in types the lock may be released during comparison." +msgstr "" + +#: ../../builtins/threadsafety.rst:280 +msgid "" +":meth:`~dict.fromkeys` locks both the new dictionary and the iterable when " +"the iterable is exactly a :class:`dict`, :class:`set`, or :class:`frozenset`" +" (not subclasses):" +msgstr "" + +#: ../../builtins/threadsafety.rst:284 +msgid "" +"dict.fromkeys(a_dict) # locks both\n" +"dict.fromkeys(a_set) # locks both\n" +"dict.fromkeys(a_frozenset) # locks both" +msgstr "" + +#: ../../builtins/threadsafety.rst:291 +msgid "" +"When updating from a non-dict iterable, only the target dictionary is " +"locked. The iterable may be concurrently modified by another thread:" +msgstr "" + +#: ../../builtins/threadsafety.rst:294 +msgid "" +"d.update(iterable) # iterable is not a dict: only d locked\n" +"d |= iterable # iterable is not a dict: only d locked\n" +"dict.fromkeys(iterable) # iterable is not a dict/set/frozenset: only result locked" +msgstr "" + +#: ../../builtins/threadsafety.rst:301 ../../builtins/threadsafety.rst:434 +#: ../../builtins/threadsafety.rst:525 +msgid "" +"Operations that involve multiple accesses, as well as iteration, are never " +"atomic:" +msgstr "" + +#: ../../builtins/threadsafety.rst:304 +msgid "" +"# NOT atomic: read-modify-write\n" +"d[key] = d[key] + 1\n" +"\n" +"# NOT atomic: check-then-act (TOCTOU)\n" +"if key in d:\n" +" del d[key]\n" +"\n" +"# NOT thread-safe: iteration while modifying\n" +"for key, value in d.items():\n" +" process(key) # another thread may modify d" +msgstr "" + +#: ../../builtins/threadsafety.rst:318 +msgid "" +"To avoid time-of-check to time-of-use (TOCTOU) issues, use atomic operations" +" or handle exceptions:" +msgstr "" + +#: ../../builtins/threadsafety.rst:321 +msgid "" +"# Use pop() with default instead of check-then-delete\n" +"d.pop(key, None)\n" +"\n" +"# Or handle the exception\n" +"try:\n" +" del d[key]\n" +"except KeyError:\n" +" pass" +msgstr "" + +#: ../../builtins/threadsafety.rst:333 +msgid "" +"To safely iterate over a dictionary that may be modified by another thread, " +"iterate over a copy:" +msgstr "" + +#: ../../builtins/threadsafety.rst:336 +msgid "" +"# Make a copy to iterate safely\n" +"for key, value in d.copy().items():\n" +" process(key)" +msgstr "" + +#: ../../builtins/threadsafety.rst:343 +msgid "" +"Consider external synchronization when sharing :class:`dict` instances " +"across threads." +msgstr "" + +#: ../../builtins/threadsafety.rst:350 +msgid "Thread safety for set objects" +msgstr "" + +#: ../../builtins/threadsafety.rst:352 ../../builtins/threadsafety.rst:457 +msgid "" +"The :func:`len` function is lock-free and :term:`atomic `." +msgstr "" + +#: ../../builtins/threadsafety.rst:354 +msgid "" +"The following read operation is lock-free. It does not block concurrent " +"modifications and may observe intermediate states from operations that hold " +"the per-object lock:" +msgstr "" + +#: ../../builtins/threadsafety.rst:358 +msgid "elem in s # set.__contains__" +msgstr "" + +#: ../../builtins/threadsafety.rst:363 +msgid "" +"This operation may compare elements using :meth:`~object.__eq__`, which can " +"execute arbitrary Python code. During such comparisons, the set may be " +"modified by another thread. For built-in types like :class:`str`, " +":class:`int`, and :class:`float`, :meth:`!__eq__` does not release the " +"underlying lock during comparisons and this is not a concern." +msgstr "" + +#: ../../builtins/threadsafety.rst:369 ../../builtins/threadsafety.rst:470 +msgid "All other operations from here on hold the per-object lock." +msgstr "" + +#: ../../builtins/threadsafety.rst:371 +msgid "" +"Adding or removing a single element is safe to call from multiple threads " +"and will not corrupt the set:" +msgstr "" + +#: ../../builtins/threadsafety.rst:374 +msgid "" +"s.add(elem) # add element\n" +"s.remove(elem) # remove element, raise if missing\n" +"s.discard(elem) # remove element if present\n" +"s.pop() # remove and return arbitrary element" +msgstr "" + +#: ../../builtins/threadsafety.rst:382 +msgid "" +"These operations also compare elements, so the same :meth:`~object.__eq__` " +"considerations as above apply." +msgstr "" + +#: ../../builtins/threadsafety.rst:385 +msgid "" +"The :meth:`~set.copy` method returns a new object and holds the per-object " +"lock for the duration so that it is always atomic." +msgstr "" + +#: ../../builtins/threadsafety.rst:388 +msgid "" +"The :meth:`~set.clear` method holds the lock for its duration. Other threads" +" cannot observe elements being removed." +msgstr "" + +#: ../../builtins/threadsafety.rst:391 +msgid "" +"The following operations only accept :class:`set` or :class:`frozenset` as " +"operands and always lock both objects:" +msgstr "" + +#: ../../builtins/threadsafety.rst:394 +msgid "" +"s |= other # other must be set/frozenset\n" +"s &= other # other must be set/frozenset\n" +"s -= other # other must be set/frozenset\n" +"s ^= other # other must be set/frozenset\n" +"s & other # other must be set/frozenset\n" +"s | other # other must be set/frozenset\n" +"s - other # other must be set/frozenset\n" +"s ^ other # other must be set/frozenset" +msgstr "" + +#: ../../builtins/threadsafety.rst:406 +msgid "" +":meth:`set.update`, :meth:`set.union`, :meth:`set.intersection` and " +":meth:`set.difference` can take multiple iterables as arguments. They all " +"iterate through all the passed iterables and do the following:" +msgstr "" + +#: ../../builtins/threadsafety.rst:410 +msgid ":meth:`set.update` and :meth:`set.union` lock both objects only when" +msgstr "" + +#: ../../builtins/threadsafety.rst:411 +msgid "" +"the other operand is a :class:`set`, :class:`frozenset`, or :class:`dict`." +msgstr "" + +#: ../../builtins/threadsafety.rst:412 +msgid ":meth:`set.intersection` and :meth:`set.difference` always try to lock" +msgstr "" + +#: ../../builtins/threadsafety.rst:413 +msgid "all objects." +msgstr "" + +#: ../../builtins/threadsafety.rst:415 +msgid ":meth:`set.symmetric_difference` tries to lock both objects." +msgstr "" + +#: ../../builtins/threadsafety.rst:417 +msgid "" +"The update variants of the above methods also have some differences between " +"them:" +msgstr "" + +#: ../../builtins/threadsafety.rst:420 +msgid ":meth:`set.difference_update` and :meth:`set.intersection_update` try" +msgstr "" + +#: ../../builtins/threadsafety.rst:421 +msgid "to lock all objects one-by-one." +msgstr "" + +#: ../../builtins/threadsafety.rst:422 +msgid "" +":meth:`set.symmetric_difference_update` only locks the arguments if it is" +msgstr "" + +#: ../../builtins/threadsafety.rst:423 +msgid "of type :class:`set`, :class:`frozenset`, or :class:`dict`." +msgstr "" + +#: ../../builtins/threadsafety.rst:425 +msgid "The following methods always try to lock both objects:" +msgstr "" + +#: ../../builtins/threadsafety.rst:427 +msgid "" +"s.isdisjoint(other) # both locked\n" +"s.issubset(other) # both locked\n" +"s.issuperset(other) # both locked" +msgstr "" + +#: ../../builtins/threadsafety.rst:437 +msgid "" +"# NOT atomic: check-then-act\n" +"if elem in s:\n" +" s.remove(elem)\n" +"\n" +"# NOT thread-safe: iteration while modifying\n" +"for elem in s:\n" +" process(elem) # another thread may modify s" +msgstr "" + +#: ../../builtins/threadsafety.rst:448 +msgid "" +"Consider external synchronization when sharing :class:`set` instances across" +" threads. See :ref:`freethreading-python-howto` for more information." +msgstr "" + +#: ../../builtins/threadsafety.rst:455 +msgid "Thread safety for bytearray objects" +msgstr "" + +#: ../../builtins/threadsafety.rst:459 +msgid "" +"Concatenation and comparisons use the buffer protocol, which prevents " +"resizing but does not hold the per-object lock. These operations may observe" +" intermediate states from concurrent modifications:" +msgstr "" + +#: ../../builtins/threadsafety.rst:463 +msgid "" +"ba + other # may observe concurrent writes\n" +"ba == other # may observe concurrent writes\n" +"ba < other # may observe concurrent writes" +msgstr "" + +#: ../../builtins/threadsafety.rst:472 +msgid "" +"Reading a single element or slice is safe to call from multiple threads:" +msgstr "" + +#: ../../builtins/threadsafety.rst:474 +msgid "" +"ba[i] # bytearray.__getitem__\n" +"ba[i:j] # slice" +msgstr "" + +#: ../../builtins/threadsafety.rst:480 +msgid "" +"The following operations are safe to call from multiple threads and will not" +" corrupt the bytearray:" +msgstr "" + +#: ../../builtins/threadsafety.rst:483 +msgid "" +"ba[i] = x # write single byte\n" +"ba[i:j] = values # write slice\n" +"ba.append(x) # append single byte\n" +"ba.extend(other) # extend with iterable\n" +"ba.insert(i, x) # insert single byte\n" +"ba.pop() # remove and return last byte\n" +"ba.pop(i) # remove and return byte at index\n" +"ba.remove(x) # remove first occurrence\n" +"ba.reverse() # reverse in place\n" +"ba.clear() # remove all bytes" +msgstr "" + +#: ../../builtins/threadsafety.rst:497 +msgid "" +"Slice assignment locks both objects when *values* is a :class:`bytearray`:" +msgstr "" + +#: ../../builtins/threadsafety.rst:499 +msgid "ba[i:j] = other_bytearray # both locked" +msgstr "" + +#: ../../builtins/threadsafety.rst:504 +msgid "" +"The following operations return new objects and hold the per-object lock for" +" the duration:" +msgstr "" + +#: ../../builtins/threadsafety.rst:507 +msgid "" +"ba.copy() # returns a shallow copy\n" +"ba * n # repeat into new bytearray" +msgstr "" + +#: ../../builtins/threadsafety.rst:513 +msgid "The membership test holds the lock for its duration:" +msgstr "" + +#: ../../builtins/threadsafety.rst:515 +msgid "x in ba # bytearray.__contains__" +msgstr "" + +#: ../../builtins/threadsafety.rst:520 +msgid "" +"All other bytearray methods (such as :meth:`~bytearray.find`, " +":meth:`~bytearray.replace`, :meth:`~bytearray.split`, " +":meth:`~bytearray.decode`, etc.) hold the per-object lock for their " +"duration." +msgstr "" + +#: ../../builtins/threadsafety.rst:528 +msgid "" +"# NOT atomic: check-then-act\n" +"if x in ba:\n" +" ba.remove(x)\n" +"\n" +"# NOT thread-safe: iteration while modifying\n" +"for byte in ba:\n" +" process(byte) # another thread may modify ba" +msgstr "" + +#: ../../builtins/threadsafety.rst:539 +msgid "" +"To safely iterate over a bytearray that may be modified by another thread, " +"iterate over a copy:" +msgstr "" + +#: ../../builtins/threadsafety.rst:542 +msgid "" +"# Make a copy to iterate safely\n" +"for byte in ba.copy():\n" +" process(byte)" +msgstr "" + +#: ../../builtins/threadsafety.rst:549 +msgid "" +"Consider external synchronization when sharing :class:`bytearray` instances " +"across threads. See :ref:`freethreading-python-howto` for more information." +msgstr "" + +#: ../../builtins/threadsafety.rst:556 +msgid "Thread safety for memoryview objects" +msgstr "" + +#: ../../builtins/threadsafety.rst:558 +msgid "" +":class:`memoryview` objects provide access to the internal data of an " +"underlying object without copying. Thread safety depends on both the " +"memoryview itself and the underlying buffer exporter." +msgstr "" + +#: ../../builtins/threadsafety.rst:562 +msgid "" +"The memoryview implementation uses atomic operations to track its own " +"exports in the :term:`free-threaded build`. Creating and releasing a " +"memoryview are thread-safe. Attribute access (e.g., " +":attr:`~memoryview.shape`, :attr:`~memoryview.format`) reads fields that are" +" immutable for the lifetime of the memoryview, so concurrent reads are safe " +"as long as the memoryview has not been released." +msgstr "" + +#: ../../builtins/threadsafety.rst:569 +msgid "" +"However, the actual data accessed through the memoryview is owned by the " +"underlying object. Concurrent access to this data is only safe if the " +"underlying object supports it:" +msgstr "" + +#: ../../builtins/threadsafety.rst:573 +msgid "" +"For immutable objects like :class:`bytes`, concurrent reads through multiple" +" memoryviews are safe." +msgstr "" + +#: ../../builtins/threadsafety.rst:576 +msgid "" +"For mutable objects like :class:`bytearray`, reading and writing the same " +"memory region from multiple threads without external synchronization is not " +"safe and may result in data corruption. Note that even read-only memoryviews" +" of mutable objects do not prevent data races if the underlying object is " +"modified from another thread." +msgstr "" + +#: ../../builtins/threadsafety.rst:583 +msgid "" +"# NOT safe: concurrent writes to the same buffer\n" +"data = bytearray(1000)\n" +"view = memoryview(data)\n" +"# Thread 1: view[0:500] = b'x' * 500\n" +"# Thread 2: view[0:500] = b'y' * 500" +msgstr "" + +#: ../../builtins/threadsafety.rst:592 +msgid "" +"# Safe: use a lock for concurrent access\n" +"import threading\n" +"lock = threading.Lock()\n" +"data = bytearray(1000)\n" +"view = memoryview(data)\n" +"\n" +"with lock:\n" +" view[0:500] = b'x' * 500" +msgstr "" + +#: ../../builtins/threadsafety.rst:604 +msgid "" +"Resizing or reallocating the underlying object (such as calling " +":meth:`bytearray.resize`) while a memoryview is exported raises " +":exc:`BufferError`. This is enforced regardless of threading." +msgstr "" diff --git a/builtins/time-complexity.po b/builtins/time-complexity.po new file mode 100644 index 000000000..e4f910a31 --- /dev/null +++ b/builtins/time-complexity.po @@ -0,0 +1,660 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" +"PO-Revision-Date: 2026-09-13 17:09+0000\n" +"Last-Translator: python-doc bot, 2026\n" +"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../../builtins/time-complexity.rst:5 +msgid "Time complexity of operations on built-in types" +msgstr "" + +#: ../../builtins/time-complexity.rst:7 +msgid "" +"This page documents the time complexity of various operations on built-in " +"types in CPython. Other Python implementations may have different " +"performance characteristics. Additionally, the listed costs assume exact " +"built-in types, as instances of subclasses may have different costs." +msgstr "" + +#: ../../builtins/time-complexity.rst:12 +msgid "" +"We use |big O notation|_ to describe how the running time of an operation " +"grows with the size of its inputs. Unless stated otherwise, *n* denotes the " +"number of elements currently in the container, and *k* is the value of a " +"numeric parameter, such as an index or a repeat count." +msgstr "" + +#: ../../builtins/time-complexity.rst:22 +msgid ":class:`!list`" +msgstr "" + +#: ../../builtins/time-complexity.rst:24 +msgid "" +"Lists are mutable sequences; for more detail on the implementation see " +":ref:`how-are-lists-implemented`. The largest costs come from growing beyond" +" the current allocation size (because everything must move), or from " +"inserting or deleting somewhere near the beginning (because everything after" +" that must move). If you need to add or remove at both ends, consider using " +"a :class:`collections.deque` instead." +msgstr "" + +#: ../../builtins/time-complexity.rst:34 ../../builtins/time-complexity.rst:85 +#: ../../builtins/time-complexity.rst:124 +#: ../../builtins/time-complexity.rst:159 +#: ../../builtins/time-complexity.rst:202 +#: ../../builtins/time-complexity.rst:235 +#: ../../builtins/time-complexity.rst:262 +msgid "Operation" +msgstr "演算" + +#: ../../builtins/time-complexity.rst:35 ../../builtins/time-complexity.rst:86 +#: ../../builtins/time-complexity.rst:125 +#: ../../builtins/time-complexity.rst:160 +#: ../../builtins/time-complexity.rst:203 +#: ../../builtins/time-complexity.rst:236 +#: ../../builtins/time-complexity.rst:263 +msgid "Complexity" +msgstr "" + +#: ../../builtins/time-complexity.rst:36 +msgid "Copy (``l.copy()``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:37 ../../builtins/time-complexity.rst:51 +#: ../../builtins/time-complexity.rst:68 ../../builtins/time-complexity.rst:70 +#: ../../builtins/time-complexity.rst:98 +#: ../../builtins/time-complexity.rst:100 +#: ../../builtins/time-complexity.rst:102 +#: ../../builtins/time-complexity.rst:129 +#: ../../builtins/time-complexity.rst:139 +#: ../../builtins/time-complexity.rst:164 +#: ../../builtins/time-complexity.rst:213 +#: ../../builtins/time-complexity.rst:217 +#: ../../builtins/time-complexity.rst:219 +#: ../../builtins/time-complexity.rst:244 +#: ../../builtins/time-complexity.rst:246 +#: ../../builtins/time-complexity.rst:248 +#: ../../builtins/time-complexity.rst:273 +#: ../../builtins/time-complexity.rst:275 +msgid "*O*\\ (*n*)" +msgstr "" + +#: ../../builtins/time-complexity.rst:38 +msgid "Append (``l.append(x)``) [1]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:39 ../../builtins/time-complexity.rst:45 +#: ../../builtins/time-complexity.rst:47 ../../builtins/time-complexity.rst:72 +#: ../../builtins/time-complexity.rst:88 ../../builtins/time-complexity.rst:90 +#: ../../builtins/time-complexity.rst:104 +#: ../../builtins/time-complexity.rst:127 +#: ../../builtins/time-complexity.rst:131 +#: ../../builtins/time-complexity.rst:133 +#: ../../builtins/time-complexity.rst:135 +#: ../../builtins/time-complexity.rst:141 +#: ../../builtins/time-complexity.rst:162 +#: ../../builtins/time-complexity.rst:166 +#: ../../builtins/time-complexity.rst:168 +#: ../../builtins/time-complexity.rst:186 +#: ../../builtins/time-complexity.rst:205 +#: ../../builtins/time-complexity.rst:221 +#: ../../builtins/time-complexity.rst:238 +#: ../../builtins/time-complexity.rst:240 +#: ../../builtins/time-complexity.rst:242 +#: ../../builtins/time-complexity.rst:250 +#: ../../builtins/time-complexity.rst:265 +#: ../../builtins/time-complexity.rst:267 +#: ../../builtins/time-complexity.rst:269 +#: ../../builtins/time-complexity.rst:271 +#: ../../builtins/time-complexity.rst:277 +msgid "*O*\\ (1)" +msgstr "" + +#: ../../builtins/time-complexity.rst:40 +msgid "Pop (``l.pop(k)``) [1]_ [2]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:41 ../../builtins/time-complexity.rst:43 +#: ../../builtins/time-complexity.rst:49 +msgid "*O*\\ (*n* - *k*)" +msgstr "" + +#: ../../builtins/time-complexity.rst:42 +msgid "Insert (``l.insert(k, x)``) [1]_ [2]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:44 +msgid "Get item (``l[k]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:46 +msgid "Set item (``l[k] = x``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:48 +msgid "Delete item (``del l[k]``) [2]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:50 ../../builtins/time-complexity.rst:97 +#: ../../builtins/time-complexity.rst:218 +#: ../../builtins/time-complexity.rst:272 +msgid "Iteration" +msgstr "イテレーション" + +#: ../../builtins/time-complexity.rst:52 +msgid "Get slice (``l[i:j]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:53 ../../builtins/time-complexity.rst:92 +#: ../../builtins/time-complexity.rst:207 +msgid "*O*\\ (*j* - *i*)" +msgstr "" + +#: ../../builtins/time-complexity.rst:54 +msgid "Set slice (``l[i:j] = t``) [1]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:55 +msgid "" +"*O*\\ (*j* - *i*) if len(*t*) == *j* - *i*, otherwise *O*\\ (*n* - *i* + " +"len(*t*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:57 +msgid "Delete slice (``del l[i:j]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:58 +msgid "*O*\\ (*n* - *i*)" +msgstr "" + +#: ../../builtins/time-complexity.rst:59 +msgid "Extend (``l.extend(t)``) [1]_ [3]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:60 +#: ../../builtins/time-complexity.rst:137 +msgid "*O*\\ (len(*t*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:61 +msgid "Sort (``l.sort()``) [4]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:62 +msgid "*O*\\ (*n* log *n*)" +msgstr "" + +#: ../../builtins/time-complexity.rst:63 +msgid "Concatenate (``l1 + l2``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:64 +msgid "*O*\\ (len(*l1*) + len(*l2*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:65 +msgid "Multiply (``l * k``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:66 ../../builtins/time-complexity.rst:96 +#: ../../builtins/time-complexity.rst:211 +msgid "*O*\\ (*nk*)" +msgstr "" + +#: ../../builtins/time-complexity.rst:67 +msgid "``x in l``" +msgstr "" + +#: ../../builtins/time-complexity.rst:69 +msgid "``min(l)``, ``max(l)``" +msgstr "" + +#: ../../builtins/time-complexity.rst:71 +msgid "Get length (``len(l)``) [5]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:76 +msgid ":class:`!tuple`" +msgstr "" + +#: ../../builtins/time-complexity.rst:78 +msgid "" +"A :class:`tuple` is an :term:`immutable` sequence. Because a tuple can never" +" change, there are no insertion or deletion costs, and making a copy simply " +"returns the same object, so is constant time (*O*\\ (1))." +msgstr "" + +#: ../../builtins/time-complexity.rst:87 +msgid "Copy (``tuple(t)``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:89 +msgid "Get item (``t[k]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:91 +msgid "Get slice (``t[i:j]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:93 +msgid "Concatenate (``t1 + t2``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:94 +msgid "*O*\\ (len(*t1*) + len(*t2*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:95 +msgid "Multiply (``t * k``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:99 +msgid "``x in t``" +msgstr "" + +#: ../../builtins/time-complexity.rst:101 +msgid "``min(t)``, ``max(t)``" +msgstr "" + +#: ../../builtins/time-complexity.rst:103 +msgid "Get length (``len(t)``) [5]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:108 +msgid ":class:`!dict`, :class:`!frozendict`" +msgstr "" + +#: ../../builtins/time-complexity.rst:110 +msgid "" +"The times listed for dict objects are average-case times, as they assume the" +" hash function for the objects is sufficiently robust to make collisions " +"uncommon. They also assume the keys are well-distributed among the set of " +"possible keys. In the worst case, when every key hashes to the same value, " +"each of the *O*\\ (1) operations below instead takes *O*\\ (*n*) time. They " +"also assume that hashing and comparing a key is *O*\\ (1). For more detail " +"on the implementation, see :ref:`how-are-dictionaries-implemented`." +msgstr "" + +#: ../../builtins/time-complexity.rst:118 +msgid "" +"A :class:`frozendict` is immutable, so it does not support setting, " +"deleting, or updating items. The other operations below apply to it at the " +"same costs." +msgstr "" + +#: ../../builtins/time-complexity.rst:126 +msgid "``key in d``" +msgstr "" + +#: ../../builtins/time-complexity.rst:128 +msgid "Copy (``d.copy()``) [6]_ [7]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:130 +msgid "Get item (``d[key]``, ``d.get(key)``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:132 +msgid "Set item (``d[key] = value``) [1]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:134 +msgid "Delete item (``del d[key]``, ``d.pop(key)``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:136 +msgid "Update (``d.update(t)``, ``d |= t``) [1]_ [3]_ [7]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:138 +msgid "Iteration [7]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:140 +msgid "Get length (``len(d)``) [5]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:145 +msgid ":class:`!set`, :class:`!frozenset`" +msgstr "" + +#: ../../builtins/time-complexity.rst:147 +msgid "" +"See :class:`dict` as the :class:`set` and :class:`frozenset` implementations" +" are similar, and the same caveats apply. In the worst case, *O*\\ (1) " +"operations instead take *O*\\ (*n*) time, and operations that look up every " +"element degrade accordingly." +msgstr "" + +#: ../../builtins/time-complexity.rst:152 +msgid "" +"A :class:`frozenset` is :term:`immutable`, so it does not support adding, " +"discarding, or the in-place update operations. The others below apply to it " +"at the same costs." +msgstr "" + +#: ../../builtins/time-complexity.rst:161 +msgid "``x in s``" +msgstr "``x in s``" + +#: ../../builtins/time-complexity.rst:163 +msgid "Copy (``s.copy()``) [6]_ [7]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:165 +msgid "Add (``s.add(x)``) [1]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:167 +msgid "Discard (``s.discard(x)``, ``s.remove(x)``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:169 +msgid "Union (``s1 | s2``, ``s1.union(s2)``) [7]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:170 +#: ../../builtins/time-complexity.rst:182 +msgid "*O*\\ (len(*s1*) + len(*s2*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:171 +msgid "Update (``s1 |= s2``, ``s1.update(s2)``) [1]_ [7]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:172 +#: ../../builtins/time-complexity.rst:184 +msgid "*O*\\ (len(*s2*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:173 +msgid "Intersection (``s1 & s2``, ``s1.intersection(s2)``) [7]_ [8]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:174 +#: ../../builtins/time-complexity.rst:176 +#: ../../builtins/time-complexity.rst:180 +msgid "*O*\\ (min(len(*s1*), len(*s2*)))" +msgstr "" + +#: ../../builtins/time-complexity.rst:175 +msgid "" +"Intersection update (``s1 &= s2``, ``s1.intersection_update(s2)``) [1]_ [7]_" +" [8]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:177 +msgid "Difference (``s1 - s2``, ``s1.difference(s2)``) [7]_ [9]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:178 +msgid "*O*\\ (len(*s1*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:179 +msgid "" +"Difference update (``s1 -= s2``, ``s1.difference_update(s2)``) [1]_ [7]_ " +"[8]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:181 +msgid "" +"Symmetric difference (``s1 ^ s2``, ``s1.symmetric_difference(s2)``) [7]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:183 +msgid "" +"Symmetric difference update (``s1 ^= s2``, " +"``s1.symmetric_difference_update(s2)``) [1]_ [7]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:185 +#: ../../builtins/time-complexity.rst:220 +msgid "Get length (``len(s)``) [5]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:190 +msgid ":class:`!str`, :class:`!bytes`, :class:`!bytearray`" +msgstr "" + +#: ../../builtins/time-complexity.rst:192 +msgid "" +":class:`str` and :class:`bytes` objects are immutable sequences of " +"characters and bytes, respectively. As with tuples, copying one returns the " +"original object. A :class:`bytearray` is mutable, and additionally supports " +"the mutating operations of :class:`list` (except :meth:`!sort`), at the same" +" costs. However, deleting at the front with ``del`` (``del b[0]``, ``del " +"b[:k]``) only advances the start of the buffer instead of moving the " +"remaining bytes, and is amortized *O*\\ (1)." +msgstr "" + +#: ../../builtins/time-complexity.rst:204 +msgid "Get item (``s[k]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:206 +msgid "Get slice (``s[i:j]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:208 +msgid "Concatenate (``s + t``) [10]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:209 +msgid "*O*\\ (len(*s*) + len(*t*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:210 +msgid "Multiply (``s * k``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:212 +msgid "Substring search (``x in s``, ``s.find(x)``, ``s.index(x)``) [11]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:214 +msgid "Reverse substring search (``s.rfind(x)``, ``s.rindex(x)``) [11]_ [12]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:215 +msgid "*O*\\ (*n* × len(*x*))" +msgstr "" + +#: ../../builtins/time-complexity.rst:216 +msgid "Encode or decode [13]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:225 +msgid ":class:`!memoryview`" +msgstr "" + +#: ../../builtins/time-complexity.rst:227 +msgid "" +":class:`memoryview` objects allow Python code to access the internal data of" +" an object that supports the :ref:`buffer protocol ` without " +"copying. In particular, slicing a memory view returns a new view onto the " +"same buffer." +msgstr "" + +#: ../../builtins/time-complexity.rst:237 +msgid "Create (``memoryview(obj)``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:239 +msgid "Get item (``v[k]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:241 +msgid "Get slice (``v[i:j]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:243 +msgid "Index (``v.index(x)``) [11]_ [14]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:245 +msgid "Count (``v.count(x)``) [14]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:247 +msgid "Convert to bytes (``v.tobytes()``, ``bytes(v)``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:249 +msgid "Get length (``len(v)``) [5]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:254 +msgid ":class:`!range`" +msgstr "" + +#: ../../builtins/time-complexity.rst:256 +msgid "" +"A :class:`range` object computes its items on demand from its *start*, " +"*stop* and *step* values, so most operations do not depend on the length of " +"the range." +msgstr "" + +#: ../../builtins/time-complexity.rst:264 +msgid "Get item (``r[k]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:266 +msgid "Get slice (``r[i:j]``)" +msgstr "" + +#: ../../builtins/time-complexity.rst:268 +msgid "``x in r`` [15]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:270 +msgid "Index and count (``r.index(x)``, ``r.count(x)``) [15]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:274 +msgid "``min(r)``, ``max(r)``" +msgstr "" + +#: ../../builtins/time-complexity.rst:276 +msgid "Get length (``len(r)``) [5]_" +msgstr "" + +#: ../../builtins/time-complexity.rst:281 +msgid "Notes" +msgstr "注釈" + +#: ../../builtins/time-complexity.rst:283 +msgid "" +"Amortized. An individual operation may occasionally be *O*\\ (*n*) when the " +"underlying storage is resized, but this cost is spread over many operations," +" depending on the history of the container." +msgstr "" + +#: ../../builtins/time-complexity.rst:287 +msgid "" +"Popping or deleting the element at index *k* of a list of size *n* shifts " +"all elements after *k* one slot to the left, moving *n* - *k* - 1 elements; " +"inserting at index *k* shifts the elements from *k* onwards one slot to the " +"right, moving *n* - *k* elements. The worst case is index 0, where the whole" +" rest of the list has to be moved; the average case, an index in the middle " +"of the list, takes *O*\\ (*n*/2) = *O*\\ (*n*) operations; and operating at " +"the end of the list moves nothing and is *O*\\ (1)." +msgstr "" + +#: ../../builtins/time-complexity.rst:296 +msgid "" +"Plus the cost of iterating over *t*, which may be expensive for an arbitrary" +" iterable." +msgstr "" + +#: ../../builtins/time-complexity.rst:299 +msgid "" +"This is the worst case scenario. Sorting is adaptive and input that is " +"already sorted or reverse-sorted takes only *O*\\ (*n*) comparisons. See " +":source:`Objects/listsort.txt` for more information." +msgstr "" + +#: ../../builtins/time-complexity.rst:303 +msgid "" +"The number of elements is stored in the object, so ``len()`` does not need " +"to count them." +msgstr "" + +#: ../../builtins/time-complexity.rst:306 +msgid "" +"Copying a :class:`frozendict` or a :class:`frozenset` is *O*\\ (1) as it " +"returns the original object." +msgstr "" + +#: ../../builtins/time-complexity.rst:309 +msgid "" +"These operations scan the container's internal hash table, which is not " +"shrunk when elements are removed. After removing most elements, they still " +"take time proportional to the container's former size, until a later " +"insertion triggers a resize." +msgstr "" + +#: ../../builtins/time-complexity.rst:314 +msgid "*O*\\ (len(*t*)) if *t* is not a set." +msgstr "" + +#: ../../builtins/time-complexity.rst:316 +msgid "*O*\\ (len(*s*) + len(*t*)) if *t* is not a set." +msgstr "" + +#: ../../builtins/time-complexity.rst:318 +msgid "" +"Each concatenation builds a new object, so building a string by " +"concatenating many pieces in a loop is quadratic in the total length. See " +"the :ref:`note on concatenating immutable sequences ` for alternatives." +msgstr "" + +#: ../../builtins/time-complexity.rst:323 +msgid "" +"With *start* and *end* arguments, *n* is the length of the region searched " +"rather than of *s*, and unlike slicing nothing is copied." +msgstr "" + +#: ../../builtins/time-complexity.rst:326 +msgid "" +"This is the worst case. Reverse searches are *O*\\ (*n*) on typical input. " +"Forward searches instead use a more elaborate algorithm with a linear worst " +"case, described in " +":source:`Objects/stringlib/stringlib_find_two_way_notes.txt`." +msgstr "" + +#: ../../builtins/time-complexity.rst:331 +msgid "" +"This assumes a codec that does a constant amount of work per character." +msgstr "" + +#: ../../builtins/time-complexity.rst:333 +msgid "" +"These unpack and compare each element individually, so they are much slower " +"than the equivalent :class:`bytes` methods." +msgstr "" + +#: ../../builtins/time-complexity.rst:336 +msgid "" +"Assuming :class:`int` or :class:`bool` arguments. For other types, the range" +" is searched like any other sequence in *O*\\ (*n*) time." +msgstr "" diff --git a/c-api/abstract.po b/c-api/abstract.po index 6c1a317c3..7b5020b32 100644 --- a/c-api/abstract.po +++ b/c-api/abstract.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/allocation.po b/c-api/allocation.po index ff9bf832c..da35562dc 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 8815d7943..74dbc3c23 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/arg.po b/c-api/arg.po index 31c485386..313787595 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -6,16 +6,16 @@ # Translators: # python-doc bot, 2025 # W. H. Wang , 2025 -# Maciej Olko , 2026 +# Maciej Olko, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-29 17:28+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" -"Last-Translator: Maciej Olko , 2026\n" +"Last-Translator: Maciej Olko, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "MIME-Version: 1.0\n" @@ -248,7 +248,7 @@ msgstr "" "あります。Unicodeオブジェクトは、C文字列に変換されます ``'utf-8'`` エンコー" "ド。" -#: ../../c-api/arg.rst:113 ../../c-api/arg.rst:643 +#: ../../c-api/arg.rst:113 ../../c-api/arg.rst:648 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "``z`` (:class:`str` または ``None``) [const char \\*]" @@ -597,7 +597,7 @@ msgid "" "a C :c:expr:`unsigned char`." msgstr "" -#: ../../c-api/arg.rst:250 ../../c-api/arg.rst:677 +#: ../../c-api/arg.rst:250 ../../c-api/arg.rst:682 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [unsigned char]" @@ -608,7 +608,7 @@ msgid "" "`unsigned char`." msgstr "" -#: ../../c-api/arg.rst:255 ../../c-api/arg.rst:671 +#: ../../c-api/arg.rst:255 ../../c-api/arg.rst:676 msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [short int]" @@ -616,7 +616,7 @@ msgstr "``h`` (:class:`int`) [short int]" msgid "Convert a Python integer to a C :c:expr:`short int`." msgstr "Python の整数を、 C の :c:expr:`short int` 型に変換します。" -#: ../../c-api/arg.rst:258 ../../c-api/arg.rst:680 +#: ../../c-api/arg.rst:258 ../../c-api/arg.rst:685 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [unsigned short int]" @@ -624,7 +624,7 @@ msgstr "``H`` (:class:`int`) [unsigned short int]" msgid "Convert a Python integer to a C :c:expr:`unsigned short int`." msgstr "" -#: ../../c-api/arg.rst:261 ../../c-api/arg.rst:665 +#: ../../c-api/arg.rst:261 ../../c-api/arg.rst:670 msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [int]" @@ -632,7 +632,7 @@ msgstr "``i`` (:class:`int`) [int]" msgid "Convert a Python integer to a plain C :c:expr:`int`." msgstr "Python の整数を、 C の :c:expr:`int` 型に変換します。" -#: ../../c-api/arg.rst:264 ../../c-api/arg.rst:683 +#: ../../c-api/arg.rst:264 ../../c-api/arg.rst:688 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [unsigned int]" @@ -640,7 +640,7 @@ msgstr "``I`` (:class:`int`) [unsigned int]" msgid "Convert a Python integer to a C :c:expr:`unsigned int`." msgstr "" -#: ../../c-api/arg.rst:267 ../../c-api/arg.rst:674 +#: ../../c-api/arg.rst:267 ../../c-api/arg.rst:679 msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [long int]" @@ -648,7 +648,7 @@ msgstr "``l`` (:class:`int`) [long int]" msgid "Convert a Python integer to a C :c:expr:`long int`." msgstr "Python の整数を、 C の :c:expr:`long int` 型に変換します。" -#: ../../c-api/arg.rst:270 ../../c-api/arg.rst:686 +#: ../../c-api/arg.rst:270 ../../c-api/arg.rst:691 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [unsigned long]" @@ -660,7 +660,7 @@ msgstr "" msgid "Use :meth:`~object.__index__` if available." msgstr "可能であれば :meth:`~object.__index__` を使うようになりました。" -#: ../../c-api/arg.rst:276 ../../c-api/arg.rst:689 +#: ../../c-api/arg.rst:276 ../../c-api/arg.rst:694 msgid "``L`` (:class:`int`) [long long]" msgstr "``L`` (:class:`int`) [long long]" @@ -668,7 +668,7 @@ msgstr "``L`` (:class:`int`) [long long]" msgid "Convert a Python integer to a C :c:expr:`long long`." msgstr "Python の整数を、 C の :c:expr:`long long` 型に変換します。" -#: ../../c-api/arg.rst:279 ../../c-api/arg.rst:694 +#: ../../c-api/arg.rst:279 ../../c-api/arg.rst:699 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [unsigned long long]" @@ -676,7 +676,7 @@ msgstr "``K`` (:class:`int`) [unsigned long long]" msgid "Convert a Python integer to a C :c:expr:`unsigned long long`." msgstr "" -#: ../../c-api/arg.rst:285 ../../c-api/arg.rst:697 +#: ../../c-api/arg.rst:285 ../../c-api/arg.rst:702 msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" @@ -700,7 +700,7 @@ msgstr "" msgid "Allow :class:`bytearray` objects." msgstr ":class:`bytearray` を受け付けるようになりました。" -#: ../../c-api/arg.rst:295 ../../c-api/arg.rst:715 +#: ../../c-api/arg.rst:295 ../../c-api/arg.rst:720 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "``C`` (長さ 1 の :class:`str`) [int]" @@ -712,7 +712,7 @@ msgstr "" "長さ 1 の :class:`str` オブジェクトとして表現されている Python キャラクタを " "C の :c:expr:`int` 型に変換します。" -#: ../../c-api/arg.rst:299 ../../c-api/arg.rst:722 +#: ../../c-api/arg.rst:299 ../../c-api/arg.rst:727 msgid "``f`` (:class:`float`) [float]" msgstr "``f`` (:class:`float`) [float]" @@ -720,7 +720,7 @@ msgstr "``f`` (:class:`float`) [float]" msgid "Convert a Python floating-point number to a C :c:expr:`float`." msgstr "" -#: ../../c-api/arg.rst:302 ../../c-api/arg.rst:719 +#: ../../c-api/arg.rst:302 ../../c-api/arg.rst:724 msgid "``d`` (:class:`float`) [double]" msgstr "``d`` (:class:`float`) [double]" @@ -748,7 +748,7 @@ msgstr "" msgid "Other objects" msgstr "その他のオブジェクト" -#: ../../c-api/arg.rst:319 ../../c-api/arg.rst:728 +#: ../../c-api/arg.rst:319 ../../c-api/arg.rst:733 msgid "``O`` (object) [PyObject \\*]" msgstr "``O`` (object) [PyObject \\*]" @@ -836,7 +836,7 @@ msgstr "" msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." msgstr "" -#: ../../c-api/arg.rst:364 ../../c-api/arg.rst:700 +#: ../../c-api/arg.rst:364 ../../c-api/arg.rst:705 msgid "``p`` (:class:`bool`) [int]" msgstr "``p`` (:class:`bool`) [int]" @@ -905,34 +905,29 @@ msgid "" "optional. The C variables corresponding to optional arguments should be " "initialized to their default value --- when an optional argument is not " "specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the " -"corresponding C variable(s)." +"corresponding C variable(s). For example, the format string ``\"OO|OO\"`` " +"corresponds to the Python signature ``f(a, b, c=None, d=None)``." msgstr "" -"Python 引数リスト中で、この文字以降の引数がオプションであることを示します。オ" -"プションの引数に対応する C の変数はデフォルトの値で初期化しておかなければなり" -"ません --- オプションの引数が省略された場合、 :c:func:`PyArg_ParseTuple` は対" -"応する C 変数の内容に手を加えません。" -#: ../../c-api/arg.rst:403 +#: ../../c-api/arg.rst:405 msgid "``$``" msgstr "``$``" -#: ../../c-api/arg.rst:404 +#: ../../c-api/arg.rst:406 msgid "" ":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " -"arguments in the Python argument list are keyword-only. Currently, all " -"keyword-only arguments must also be optional arguments, so ``|`` must always " -"be specified before ``$`` in the format string." +"arguments in the Python argument list are keyword-only. They are optional if " +"``|`` was specified before ``$``, and required otherwise. ``|`` cannot be " +"specified after ``$``. For example, the format string ``\"O|O$O\"`` " +"corresponds to the Python signature ``f(a, b=None, *, c=None)``, and the " +"format string ``\"OO$OO\"`` corresponds to ``f(a, b, *, c, d)``." msgstr "" -":c:func:`PyArg_ParseTupleAndKeywords` でのみ使用可能: 後続のPython引数がキー" -"ワード専用であることを示します。\n" -"現在、すべてのキーワード専用引数は任意の引数でなければならず、そのため フォー" -"マット文字列中の ``|`` は常に ``$`` より前に指定されなければなりません。" -#: ../../c-api/arg.rst:412 +#: ../../c-api/arg.rst:417 msgid "``:``" msgstr "``:``" -#: ../../c-api/arg.rst:413 +#: ../../c-api/arg.rst:418 msgid "" "The list of format units ends here; the string after the colon is used as " "the function name in error messages (the \"associated value\" of the " @@ -942,11 +937,11 @@ msgstr "" "ラーメッセージにおける関数名 (:c:func:`PyArg_ParseTuple` が送出する例外の " "\"付属値 (associated value)\") として使われます。" -#: ../../c-api/arg.rst:417 +#: ../../c-api/arg.rst:422 msgid "``;``" msgstr "``;``" -#: ../../c-api/arg.rst:418 +#: ../../c-api/arg.rst:423 msgid "" "The list of format units ends here; the string after the semicolon is used " "as the error message *instead* of the default error message. ``:`` and ``;" @@ -956,7 +951,7 @@ msgstr "" "は、デフォルトエラーメッセージを *置き換える* エラーメッセージとして使われま" "す。 ``:`` と ``;`` は相互に排他の文字です。" -#: ../../c-api/arg.rst:422 +#: ../../c-api/arg.rst:427 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not release them (i.e. do not decrement their " @@ -966,7 +961,7 @@ msgstr "" "す。これらを解放しないでください(つまり、参照カウントを減らさないでくださ" "い)!" -#: ../../c-api/arg.rst:426 +#: ../../c-api/arg.rst:431 msgid "" "Additional arguments passed to these functions must be addresses of " "variables whose type is determined by the format string; these are used to " @@ -981,7 +976,7 @@ msgstr "" "助引数を入力値として使う場合がいくつかあります; その場合、対応する書式単位の" "指定する形式に従うようにしなければなりません。" -#: ../../c-api/arg.rst:432 +#: ../../c-api/arg.rst:437 msgid "" "For the conversion to succeed, the *arg* object must match the format and " "the format must be exhausted. On success, the ``PyArg_Parse*`` functions " @@ -997,11 +992,11 @@ msgstr "" "敗した場合、失敗した書式単位に対応するアドレスとそれ以降のアドレスの内容は変" "更されません。" -#: ../../c-api/arg.rst:441 +#: ../../c-api/arg.rst:446 msgid "API Functions" msgstr "API 関数" -#: ../../c-api/arg.rst:445 +#: ../../c-api/arg.rst:450 msgid "" "Parse the parameters of a function that takes only positional parameters " "into local variables. Returns true on success; on failure, it returns false " @@ -1010,7 +1005,7 @@ msgstr "" "位置引数のみを引数にとる関数のパラメタを解釈して、ローカルな変数に変換しま" "す。成功すると真を返します;失敗すると偽を返し、適切な例外を送出します。" -#: ../../c-api/arg.rst:452 +#: ../../c-api/arg.rst:457 msgid "" "Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " "rather than a variable number of arguments." @@ -1018,7 +1013,7 @@ msgstr "" ":c:func:`PyArg_ParseTuple` と同じですが、可変長の引数ではなく *va_list* を引" "数にとります。" -#: ../../c-api/arg.rst:458 +#: ../../c-api/arg.rst:463 msgid "" "Parse the parameters of a function that takes both positional and keyword " "parameters into local variables. The *keywords* argument is a ``NULL``-" @@ -1028,27 +1023,27 @@ msgid "" "failure, it returns false and raises the appropriate exception." msgstr "" -#: ../../c-api/arg.rst:469 +#: ../../c-api/arg.rst:474 msgid "" "The *keywords* parameter declaration is :c:expr:`char * const *` in C and :c:" "expr:`const char * const *` in C++. This can be overridden with the :c:macro:" "`PY_CXX_CONST` macro." msgstr "" -#: ../../c-api/arg.rst:473 +#: ../../c-api/arg.rst:478 msgid "" "Added support for :ref:`positional-only parameters `." msgstr ":ref:`位置専用引数 ` を追加した。" -#: ../../c-api/arg.rst:477 +#: ../../c-api/arg.rst:482 msgid "" "The *keywords* parameter has now type :c:expr:`char * const *` in C and :c:" "expr:`const char * const *` in C++, instead of :c:expr:`char **`. Added " "support for non-ASCII keyword parameter names." msgstr "" -#: ../../c-api/arg.rst:486 +#: ../../c-api/arg.rst:491 msgid "" "Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " "va_list rather than a variable number of arguments." @@ -1056,7 +1051,7 @@ msgstr "" ":c:func:`PyArg_ParseTupleAndKeywords` と同じですが、可変長の引数ではなく " "*va_list* を引数にとります。" -#: ../../c-api/arg.rst:492 +#: ../../c-api/arg.rst:497 msgid "" "Ensure that the keys in the keywords argument dictionary are strings. This " "is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since " @@ -1066,18 +1061,18 @@ msgstr "" "は :c:func:`PyArg_ParseTupleAndKeywords` を使用しないときにのみ必要で、その理" "由は後者の関数は同様のチェックを実施するためです。" -#: ../../c-api/arg.rst:501 +#: ../../c-api/arg.rst:506 msgid "" "Parse the parameter of a function that takes a single positional parameter " "into a local variable. Returns true on success; on failure, it returns " "false and raises the appropriate exception." msgstr "" -#: ../../c-api/arg.rst:505 +#: ../../c-api/arg.rst:510 msgid "Example::" msgstr "以下はプログラム例です::" -#: ../../c-api/arg.rst:507 +#: ../../c-api/arg.rst:512 msgid "" "// Function using METH_O calling convention\n" "static PyObject*\n" @@ -1091,7 +1086,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/arg.rst:521 +#: ../../c-api/arg.rst:526 msgid "" "Parse the parameters of a function that takes only array parameters into " "local variables (that is, a function using the :c:macro:`METH_FASTCALL` " @@ -1099,7 +1094,7 @@ msgid "" "and raises the appropriate exception." msgstr "" -#: ../../c-api/arg.rst:532 +#: ../../c-api/arg.rst:537 msgid "" "Parse the parameters of a function that takes both array and keyword " "parameters into local variables (that is, a function using the :c:macro:" @@ -1108,7 +1103,7 @@ msgid "" "exception." msgstr "" -#: ../../c-api/arg.rst:543 +#: ../../c-api/arg.rst:548 msgid "" "A simpler form of parameter retrieval which does not use a format string to " "specify the types of the arguments. Functions which use this method to " @@ -1138,7 +1133,7 @@ msgstr "" "数 成功した場合にtrueを返し、*args*がタプルでない場合または要素の数が間違って" "いる場合にfalseを返します。失敗した場合、例外が設定されます。" -#: ../../c-api/arg.rst:558 +#: ../../c-api/arg.rst:563 msgid "" "This is an example of the use of this function, taken from the sources for " "the :mod:`!_weakref` helper module for weak references::" @@ -1146,7 +1141,7 @@ msgstr "" "これは、この関数の使用例で、ソースコードから抜粋したものです:mod:`!_weakref` " "弱参照用のヘルパーモジュール::" -#: ../../c-api/arg.rst:561 +#: ../../c-api/arg.rst:566 msgid "" "static PyObject *\n" "weakref_ref(PyObject *self, PyObject *args)\n" @@ -1162,7 +1157,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/arg.rst:574 +#: ../../c-api/arg.rst:579 msgid "" "The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " "equivalent to this call to :c:func:`PyArg_ParseTuple`::" @@ -1170,11 +1165,11 @@ msgstr "" "この例における :c:func:`PyArg_UnpackTuple` 呼び出しは、 :c:func:" "`PyArg_ParseTuple` を使った以下の呼び出しと全く等価です::" -#: ../../c-api/arg.rst:577 +#: ../../c-api/arg.rst:582 msgid "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)" msgstr "" -#: ../../c-api/arg.rst:581 +#: ../../c-api/arg.rst:586 msgid "" "The value to be inserted, if any, before :c:expr:`char * const *` in the " "*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` " @@ -1183,11 +1178,11 @@ msgid "" "to the desired value before including :file:`Python.h`." msgstr "" -#: ../../c-api/arg.rst:595 +#: ../../c-api/arg.rst:600 msgid "Building values" msgstr "値の構築" -#: ../../c-api/arg.rst:599 +#: ../../c-api/arg.rst:604 msgid "" "Create a new value based on a format string similar to those accepted by the " "``PyArg_Parse*`` family of functions and a sequence of values. Returns the " @@ -1198,7 +1193,7 @@ msgstr "" "基づいて、新たな値を生成します。生成した値を返します。エラーの場合には " "``NULL`` を返します; ``NULL`` を返す場合、例外を送出するでしょう。" -#: ../../c-api/arg.rst:604 +#: ../../c-api/arg.rst:609 msgid "" ":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple " "only if its format string contains two or more format units. If the format " @@ -1212,7 +1207,7 @@ msgstr "" "合、書式単位で指定されている何らかのオブジェクト単体を返します。サイズがゼロ" "や 1 のタプルを返すように強制するには、丸括弧で囲われた書式文字列を使います。" -#: ../../c-api/arg.rst:610 +#: ../../c-api/arg.rst:615 msgid "" "When memory buffers are passed as parameters to supply data to build " "objects, as for the ``s`` and ``s#`` formats, the required data is copied. " @@ -1230,7 +1225,7 @@ msgstr "" "ド内で :c:func:`Py_BuildValue` が返った後で :c:func:`free` を呼び出す責任があ" "るということです。" -#: ../../c-api/arg.rst:618 +#: ../../c-api/arg.rst:623 msgid "" "In the following description, the quoted form is the format unit; the entry " "in (round) parentheses is the Python object type that the format unit will " @@ -1241,7 +1236,7 @@ msgstr "" "単位が返す Python のオブジェクト型です; [角] 括弧は関数に渡す値の C 変数型で" "す。" -#: ../../c-api/arg.rst:622 +#: ../../c-api/arg.rst:627 msgid "" "The characters space, tab, colon and comma are ignored in format strings " "(but not within format units such as ``s#``). This can be used to make long " @@ -1251,11 +1246,11 @@ msgstr "" "よびコンマは無視されます。これらの文字を使うと、長い書式文字列をちょっとだけ" "読みやすくできます。" -#: ../../c-api/arg.rst:626 +#: ../../c-api/arg.rst:631 msgid "``s`` (:class:`str` or ``None``) [const char \\*]" msgstr "``s`` (:class:`str` または ``None``) [const char \\*]" -#: ../../c-api/arg.rst:627 +#: ../../c-api/arg.rst:632 msgid "" "Convert a null-terminated C string to a Python :class:`str` object using " "``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used." @@ -1264,13 +1259,13 @@ msgstr "" "class:`str` オブジェクトに変換します。もし C 文字列ポインタが ``NULL`` の場" "合、 ``None`` になります。" -#: ../../c-api/arg.rst:630 +#: ../../c-api/arg.rst:635 msgid "" "``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" -#: ../../c-api/arg.rst:631 +#: ../../c-api/arg.rst:636 msgid "" "Convert a C string and its length to a Python :class:`str` object using " "``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is " @@ -1280,11 +1275,11 @@ msgstr "" "`str` オブジェクトに変換します。C 文字列ポインタが ``NULL`` の場合、長さは無" "視され、 ``None`` になります。" -#: ../../c-api/arg.rst:635 +#: ../../c-api/arg.rst:640 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "``y`` (:class:`bytes`) [const char \\*]" -#: ../../c-api/arg.rst:636 +#: ../../c-api/arg.rst:641 msgid "" "This converts a C string to a Python :class:`bytes` object. If the C string " "pointer is ``NULL``, ``None`` is returned." @@ -1292,11 +1287,11 @@ msgstr "" "C 文字列をPython :class:`bytes` オブジェクトに変換します。もしC 文字列ポイン" "タが ``NULL`` だった場合、``None`` を返します。" -#: ../../c-api/arg.rst:639 +#: ../../c-api/arg.rst:644 msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" -#: ../../c-api/arg.rst:640 +#: ../../c-api/arg.rst:645 msgid "" "This converts a C string and its lengths to a Python object. If the C " "string pointer is ``NULL``, ``None`` is returned." @@ -1304,25 +1299,25 @@ msgstr "" "これは C 文字列とその長さから Python オブジェクトに変換します。C 文字列ポイン" "タが ``NULL`` の場合、長さは無視され ``None`` になります。" -#: ../../c-api/arg.rst:644 ../../c-api/arg.rst:660 +#: ../../c-api/arg.rst:649 ../../c-api/arg.rst:665 msgid "Same as ``s``." msgstr "``s`` と同じです。" -#: ../../c-api/arg.rst:646 +#: ../../c-api/arg.rst:651 msgid "" "``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``z#`` (:class:`str` または ``None``) [const char \\*, :c:type:`Py_ssize_t`]" -#: ../../c-api/arg.rst:647 ../../c-api/arg.rst:663 +#: ../../c-api/arg.rst:652 ../../c-api/arg.rst:668 msgid "Same as ``s#``." msgstr "``s#`` と同じです。" -#: ../../c-api/arg.rst:649 +#: ../../c-api/arg.rst:654 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "``u`` (:class:`str`) [const wchar_t \\*]" -#: ../../c-api/arg.rst:650 +#: ../../c-api/arg.rst:655 msgid "" "Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " "UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " @@ -1332,11 +1327,11 @@ msgstr "" "ファから Python Unicode オブジェクトに変換します。 Unicode バッファポインタ" "が ``NULL`` の場合、 ``None`` になります。" -#: ../../c-api/arg.rst:654 +#: ../../c-api/arg.rst:659 msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" msgstr "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" -#: ../../c-api/arg.rst:655 +#: ../../c-api/arg.rst:660 msgid "" "Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python " "Unicode object. If the Unicode buffer pointer is ``NULL``, the length is " @@ -1346,73 +1341,73 @@ msgstr "" "オブジェクトに変換します。 Unicode バッファポインタが ``NULL`` の場合、長さは" "無視され ``None`` になります。" -#: ../../c-api/arg.rst:659 +#: ../../c-api/arg.rst:664 msgid "``U`` (:class:`str` or ``None``) [const char \\*]" msgstr "``U`` (:class:`str` または ``None``) [const char \\*]" -#: ../../c-api/arg.rst:662 +#: ../../c-api/arg.rst:667 msgid "" "``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``U#`` (:class:`str` または ``None``) [const char \\*, :c:type:`Py_ssize_t`]" -#: ../../c-api/arg.rst:666 +#: ../../c-api/arg.rst:671 msgid "Convert a plain C :c:expr:`int` to a Python integer object." msgstr "通常の C の :c:expr:`int` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:668 +#: ../../c-api/arg.rst:673 msgid "``b`` (:class:`int`) [char]" msgstr "``b`` (:class:`int`) [char]" -#: ../../c-api/arg.rst:669 +#: ../../c-api/arg.rst:674 msgid "Convert a plain C :c:expr:`char` to a Python integer object." msgstr "通常のC の :c:expr:`char` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:672 +#: ../../c-api/arg.rst:677 msgid "Convert a plain C :c:expr:`short int` to a Python integer object." msgstr "" "通常のC の :c:expr:`short int` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:675 +#: ../../c-api/arg.rst:680 msgid "Convert a C :c:expr:`long int` to a Python integer object." msgstr "C の :c:expr:`long int` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:678 +#: ../../c-api/arg.rst:683 msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." msgstr "" "C の :c:expr:`unsigned char` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:681 +#: ../../c-api/arg.rst:686 msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." msgstr "" "C の :c:expr:`unsigned short int` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:684 +#: ../../c-api/arg.rst:689 msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." msgstr "C の :c:expr:`unsigned int` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:687 +#: ../../c-api/arg.rst:692 msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." msgstr "" "C の :c:expr:`unsigned long` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:690 +#: ../../c-api/arg.rst:695 msgid "Convert a C :c:expr:`long long` to a Python integer object." msgstr "C の :c:expr:`long long` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:695 +#: ../../c-api/arg.rst:700 msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." msgstr "C :c:expr:`unsigned long long` をPythonのintオブジェクトへ変換する。" -#: ../../c-api/arg.rst:698 +#: ../../c-api/arg.rst:703 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "C の :c:type:`Py_ssize_t` を Python の整数オブジェクトに変換します。" -#: ../../c-api/arg.rst:701 +#: ../../c-api/arg.rst:706 msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." msgstr "" -#: ../../c-api/arg.rst:703 +#: ../../c-api/arg.rst:708 msgid "" "Be aware that this format requires an ``int`` argument. Unlike most other " "contexts in C, variadic arguments are not coerced to a suitable type " @@ -1420,11 +1415,11 @@ msgid "" "float) to a suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``." msgstr "" -#: ../../c-api/arg.rst:711 +#: ../../c-api/arg.rst:716 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "``c`` (長さが 1 の :class:`bytes`) [char]" -#: ../../c-api/arg.rst:712 +#: ../../c-api/arg.rst:717 msgid "" "Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " "object of length 1." @@ -1432,7 +1427,7 @@ msgstr "" "バイトを表す通常の C の :c:expr:`int` を、長さ 1 の Python の :class:`bytes` " "オブジェクトに変換します。" -#: ../../c-api/arg.rst:716 +#: ../../c-api/arg.rst:721 msgid "" "Convert a C :c:expr:`int` representing a character to Python :class:`str` " "object of length 1." @@ -1440,23 +1435,23 @@ msgstr "" "文字を表す通常の C の :c:expr:`int` を、長さ 1 の Python の :class:`str` オブ" "ジェクトに変換します。" -#: ../../c-api/arg.rst:720 +#: ../../c-api/arg.rst:725 msgid "Convert a C :c:expr:`double` to a Python floating-point number." msgstr "" -#: ../../c-api/arg.rst:723 +#: ../../c-api/arg.rst:728 msgid "Convert a C :c:expr:`float` to a Python floating-point number." msgstr "" -#: ../../c-api/arg.rst:725 +#: ../../c-api/arg.rst:730 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "``D`` (:class:`complex`) [Py_complex \\*]" -#: ../../c-api/arg.rst:726 +#: ../../c-api/arg.rst:731 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "C の :c:type:`Py_complex` 構造体を Python の複素数型に変換します。" -#: ../../c-api/arg.rst:729 +#: ../../c-api/arg.rst:734 msgid "" "Pass a Python object untouched but create a new :term:`strong reference` to " "it (i.e. its reference count is incremented by one). If the object passed in " @@ -1472,19 +1467,19 @@ msgstr "" "戻ってきます ``NULL`` しかし、そうはならない 送出 例外。 例外がまだ発生してい" "ない場合、:exc:`SystemError` 設定されています。" -#: ../../c-api/arg.rst:738 +#: ../../c-api/arg.rst:743 msgid "``S`` (object) [PyObject \\*]" msgstr "``S`` (object) [PyObject \\*]" -#: ../../c-api/arg.rst:739 +#: ../../c-api/arg.rst:744 msgid "Same as ``O``." msgstr "``O`` と同じです。" -#: ../../c-api/arg.rst:741 +#: ../../c-api/arg.rst:746 msgid "``N`` (object) [PyObject \\*]" msgstr "``N`` (object) [PyObject \\*]" -#: ../../c-api/arg.rst:742 +#: ../../c-api/arg.rst:747 msgid "" "Same as ``O``, except it doesn't create a new :term:`strong reference`. " "Useful when the object is created by a call to an object constructor in the " @@ -1494,11 +1489,11 @@ msgstr "" "引数リスト内のオブジェクトコンストラクターの呼び出しによって作成される場合に" "便利です。" -#: ../../c-api/arg.rst:746 +#: ../../c-api/arg.rst:751 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "``O&`` (object) [*converter*, *anything*]" -#: ../../c-api/arg.rst:747 +#: ../../c-api/arg.rst:752 msgid "" "Convert *anything* to a Python object through a *converter* function. The " "function is called with *anything* (which should be compatible with :c:expr:" @@ -1510,31 +1505,31 @@ msgstr "" "て呼び出され、\"新たな\" オブジェクトを返すか、失敗した場合には ``NULL`` を返" "すようにしなければなりません。" -#: ../../c-api/arg.rst:752 +#: ../../c-api/arg.rst:757 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" -#: ../../c-api/arg.rst:753 +#: ../../c-api/arg.rst:758 msgid "" "Convert a sequence of C values to a Python tuple with the same number of " "items." msgstr "C の値からなる配列を、同じ要素数を持つ Python のタプルに変換します。" -#: ../../c-api/arg.rst:755 +#: ../../c-api/arg.rst:760 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "``[items]`` (:class:`list`) [*matching-items*]" -#: ../../c-api/arg.rst:756 +#: ../../c-api/arg.rst:761 msgid "" "Convert a sequence of C values to a Python list with the same number of " "items." msgstr "C の値からなる配列を、同じ要素数を持つ Python のリストに変換します。" -#: ../../c-api/arg.rst:758 +#: ../../c-api/arg.rst:763 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "``{items}`` (:class:`dict`) [*matching-items*]" -#: ../../c-api/arg.rst:759 +#: ../../c-api/arg.rst:764 msgid "" "Convert a sequence of C values to a Python dictionary. Each pair of " "consecutive C values adds one item to the dictionary, serving as key and " @@ -1543,7 +1538,7 @@ msgstr "" "C の値からなる配列を Python の辞書に変換します。一連のペアからなる C の値が、" "それぞれキーおよび値となって辞書に追加されます。" -#: ../../c-api/arg.rst:763 +#: ../../c-api/arg.rst:768 msgid "" "If there is an error in the format string, the :exc:`SystemError` exception " "is set and ``NULL`` returned." @@ -1551,7 +1546,7 @@ msgstr "" "書式文字列に関するエラーが生じると、 :exc:`SystemError` 例外をセットして " "``NULL`` を返します。" -#: ../../c-api/arg.rst:768 +#: ../../c-api/arg.rst:773 msgid "" "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " "rather than a variable number of arguments." diff --git a/c-api/bool.po b/c-api/bool.po index c5f64eaaf..d48835f1c 100644 --- a/c-api/bool.po +++ b/c-api/bool.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/buffer.po b/c-api/buffer.po index 17cddd8af..2289f69cc 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/bytearray.po b/c-api/bytearray.po index 920b50b8e..3b42042da 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/bytes.po b/c-api/bytes.po index 387287ecd..ebfe77414 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-19 16:29+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -368,60 +368,56 @@ msgstr "" #: ../../c-api/bytes.rst:186 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " -"appended to *bytes*; the caller will own the new reference. The reference " -"to the old value of *bytes* will be stolen. If the new object cannot be " -"created, the old reference to *bytes* will still be discarded and the value " -"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." +"appended to *bytes*; the caller will own the new reference. The reference to " +"the old value of *bytes* will be \":term:`stolen `\". If the new " +"object cannot be created, the old reference to *bytes* will still be " +"\"stolen\", the value of *\\*bytes* will be set to ``NULL``, and the " +"appropriate exception will be set." msgstr "" -"*newpart* の内容を *bytes* の後ろに連結した新しいバイトオブジェクトを " -"*\\*bytes* に生成します。呼び出し側は新しい参照を所有します。\n" -"*bytes* の古い値の参照は盗まれます。\n" -"もし新しいオブジェクトが生成できない場合、古い *bytes* の参照は放棄され、 " -"*\\*bytes* の値は ``NULL`` に設定されます; 適切な例外が設定されます。" -#: ../../c-api/bytes.rst:193 ../../c-api/bytes.rst:203 +#: ../../c-api/bytes.rst:194 ../../c-api/bytes.rst:204 msgid "" "If *newpart* implements the buffer protocol, then the buffer must not be " "mutated while the new bytes object is being created." msgstr "" -#: ../../c-api/bytes.rst:198 +#: ../../c-api/bytes.rst:199 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*. This version releases the :term:`strong reference` to " "*newpart* (i.e. decrements its reference count)." msgstr "" -#: ../../c-api/bytes.rst:209 +#: ../../c-api/bytes.rst:210 msgid "Similar to ``sep.join(iterable)`` in Python." msgstr "" -#: ../../c-api/bytes.rst:211 +#: ../../c-api/bytes.rst:212 msgid "" "*sep* must be Python :class:`bytes` object. (Note that :c:func:" "`PyUnicode_Join` accepts ``NULL`` separator and treats it as a space, " "whereas :c:func:`PyBytes_Join` doesn't accept ``NULL`` separator.)" msgstr "" -#: ../../c-api/bytes.rst:216 +#: ../../c-api/bytes.rst:217 msgid "" "*iterable* must be an iterable object yielding objects that implement the :" "ref:`buffer protocol `." msgstr "" -#: ../../c-api/bytes.rst:219 +#: ../../c-api/bytes.rst:220 msgid "" "On success, return a new :class:`bytes` object. On error, set an exception " "and return ``NULL``." msgstr "" -#: ../../c-api/bytes.rst:225 +#: ../../c-api/bytes.rst:226 msgid "" "If *iterable* objects implement the buffer protocol, then the buffers must " "not be mutated while the new bytes object is being created." msgstr "" -#: ../../c-api/bytes.rst:230 +#: ../../c-api/bytes.rst:231 msgid "" "Resize a bytes object. *newsize* will be the new length of the bytes object. " "You can think of it as creating a new bytes object and destroying the old " @@ -433,23 +429,23 @@ msgid "" "``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." msgstr "" -#: ../../c-api/bytes.rst:241 +#: ../../c-api/bytes.rst:242 msgid "Use the :c:type:`PyBytesWriter` API instead." msgstr "" -#: ../../c-api/bytes.rst:247 +#: ../../c-api/bytes.rst:248 msgid "" "Get the string representation of *bytes*. This function is currently used to " "implement :meth:`!bytes.__repr__` in Python." msgstr "" -#: ../../c-api/bytes.rst:250 +#: ../../c-api/bytes.rst:251 msgid "" "This function does not do type checking; it is undefined behavior to pass " "*bytes* as a non-bytes object or ``NULL``." msgstr "" -#: ../../c-api/bytes.rst:253 +#: ../../c-api/bytes.rst:254 msgid "" "If *smartquotes* is true, the representation will use a double-quoted string " "instead of single-quoted string when single-quotes are present in *bytes*. " @@ -458,244 +454,244 @@ msgid "" "is false." msgstr "" -#: ../../c-api/bytes.rst:259 +#: ../../c-api/bytes.rst:260 msgid "" "On success, this function returns a :term:`strong reference` to a :class:" "`str` object containing the representation. On failure, this returns " "``NULL`` with an exception set." msgstr "" -#: ../../c-api/bytes.rst:266 +#: ../../c-api/bytes.rst:267 msgid "" "Unescape a backslash-escaped string *s*. *s* must not be ``NULL``. *len* " "must be the size of *s*." msgstr "" -#: ../../c-api/bytes.rst:269 +#: ../../c-api/bytes.rst:270 msgid "" "*errors* must be one of ``\"strict\"``, ``\"replace\"``, or ``\"ignore\"``. " "If *errors* is ``NULL``, then ``\"strict\"`` is used by default." msgstr "" -#: ../../c-api/bytes.rst:272 +#: ../../c-api/bytes.rst:273 msgid "" "On success, this function returns a :term:`strong reference` to a Python :" "class:`bytes` object containing the unescaped string. On failure, this " "function returns ``NULL`` with an exception set." msgstr "" -#: ../../c-api/bytes.rst:276 +#: ../../c-api/bytes.rst:277 msgid "*unicode* and *recode_encoding* are now unused." msgstr "" -#: ../../c-api/bytes.rst:283 +#: ../../c-api/bytes.rst:284 msgid "PyBytesWriter" msgstr "" -#: ../../c-api/bytes.rst:285 +#: ../../c-api/bytes.rst:286 msgid "" "The :c:type:`PyBytesWriter` API can be used to create a Python :class:" "`bytes` object." msgstr "" -#: ../../c-api/bytes.rst:292 +#: ../../c-api/bytes.rst:293 msgid "A bytes writer instance." msgstr "" -#: ../../c-api/bytes.rst:294 +#: ../../c-api/bytes.rst:295 msgid "" "The API is **not thread safe**: a writer should only be used by a single " "thread at the same time." msgstr "" -#: ../../c-api/bytes.rst:297 +#: ../../c-api/bytes.rst:298 msgid "" "The instance must be destroyed by :c:func:`PyBytesWriter_Finish` on success, " "or :c:func:`PyBytesWriter_Discard` on error." msgstr "" -#: ../../c-api/bytes.rst:302 +#: ../../c-api/bytes.rst:303 msgid "Create, Finish, Discard" msgstr "" -#: ../../c-api/bytes.rst:306 +#: ../../c-api/bytes.rst:307 msgid "Create a :c:type:`PyBytesWriter` to write *size* bytes." msgstr "" -#: ../../c-api/bytes.rst:308 +#: ../../c-api/bytes.rst:309 msgid "" "If *size* is greater than zero, allocate *size* bytes, and set the writer " "size to *size*. The caller is responsible to write *size* bytes using :c:" "func:`PyBytesWriter_GetData`. This function does not overallocate." msgstr "" -#: ../../c-api/bytes.rst:313 ../../c-api/bytes.rst:442 +#: ../../c-api/bytes.rst:314 ../../c-api/bytes.rst:443 msgid "On error, set an exception and return ``NULL``." msgstr "" -#: ../../c-api/bytes.rst:315 ../../c-api/bytes.rst:418 +#: ../../c-api/bytes.rst:316 ../../c-api/bytes.rst:419 msgid "*size* must be positive or zero." msgstr "" -#: ../../c-api/bytes.rst:319 +#: ../../c-api/bytes.rst:320 msgid "" "Finish a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." msgstr "" -#: ../../c-api/bytes.rst:322 +#: ../../c-api/bytes.rst:323 msgid "" "On success, return a Python :class:`bytes` object. On error, set an " "exception and return ``NULL``." msgstr "" -#: ../../c-api/bytes.rst:325 +#: ../../c-api/bytes.rst:326 msgid "" "The writer instance is invalid after the call in any case. No API can be " "called on the writer after :c:func:`PyBytesWriter_Finish`." msgstr "" -#: ../../c-api/bytes.rst:330 +#: ../../c-api/bytes.rst:331 msgid "" "Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer to *size* " "bytes before creating the :class:`bytes` object." msgstr "" -#: ../../c-api/bytes.rst:335 +#: ../../c-api/bytes.rst:336 msgid "" "Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer using *buf* " "pointer before creating the :class:`bytes` object." msgstr "" -#: ../../c-api/bytes.rst:338 +#: ../../c-api/bytes.rst:339 msgid "" "Set an exception and return ``NULL`` if *buf* pointer is outside the " "internal buffer bounds." msgstr "" -#: ../../c-api/bytes.rst:341 ../../c-api/bytes.rst:446 +#: ../../c-api/bytes.rst:342 ../../c-api/bytes.rst:447 msgid "Function pseudo-code::" msgstr "" -#: ../../c-api/bytes.rst:343 +#: ../../c-api/bytes.rst:344 msgid "" "Py_ssize_t size = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" "return PyBytesWriter_FinishWithSize(writer, size);" msgstr "" -#: ../../c-api/bytes.rst:348 +#: ../../c-api/bytes.rst:349 msgid "" "Discard a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." msgstr "" -#: ../../c-api/bytes.rst:350 +#: ../../c-api/bytes.rst:351 msgid "Do nothing if *writer* is ``NULL``." msgstr "" -#: ../../c-api/bytes.rst:352 +#: ../../c-api/bytes.rst:353 msgid "" "The writer instance is invalid after the call. No API can be called on the " "writer after :c:func:`PyBytesWriter_Discard`." msgstr "" -#: ../../c-api/bytes.rst:356 +#: ../../c-api/bytes.rst:357 msgid "High-level API" msgstr "高レベルAPI" -#: ../../c-api/bytes.rst:360 +#: ../../c-api/bytes.rst:361 msgid "" "Grow the *writer* internal buffer by *size* bytes, write *size* bytes of " "*bytes* at the *writer* end, and add *size* to the *writer* size." msgstr "" -#: ../../c-api/bytes.rst:364 +#: ../../c-api/bytes.rst:365 msgid "" "If *size* is equal to ``-1``, call ``strlen(bytes)`` to get the string " "length." msgstr "" -#: ../../c-api/bytes.rst:367 ../../c-api/bytes.rst:376 -#: ../../c-api/bytes.rst:415 ../../c-api/bytes.rst:428 +#: ../../c-api/bytes.rst:368 ../../c-api/bytes.rst:377 +#: ../../c-api/bytes.rst:416 ../../c-api/bytes.rst:429 msgid "On success, return ``0``. On error, set an exception and return ``-1``." msgstr "" -#: ../../c-api/bytes.rst:372 +#: ../../c-api/bytes.rst:373 msgid "" "Similar to :c:func:`PyBytes_FromFormat`, but write the output directly at " "the writer end. Grow the writer internal buffer on demand. Then add the " "written size to the writer size." msgstr "" -#: ../../c-api/bytes.rst:381 +#: ../../c-api/bytes.rst:382 msgid "Getters" msgstr "" -#: ../../c-api/bytes.rst:385 +#: ../../c-api/bytes.rst:386 msgid "Get the writer size." msgstr "" -#: ../../c-api/bytes.rst:387 +#: ../../c-api/bytes.rst:388 msgid "" "The function does not invalidate pointers returned by :c:func:" "`PyBytesWriter_GetData`." msgstr "" -#: ../../c-api/bytes.rst:390 ../../c-api/bytes.rst:400 +#: ../../c-api/bytes.rst:391 ../../c-api/bytes.rst:401 msgid "The function cannot fail." msgstr "" -#: ../../c-api/bytes.rst:394 +#: ../../c-api/bytes.rst:395 msgid "Get the writer data: start of the internal buffer." msgstr "" -#: ../../c-api/bytes.rst:396 +#: ../../c-api/bytes.rst:397 msgid "" "The pointer remains valid until a :c:type:`PyBytesWriter` function other " "than :c:func:`PyBytesWriter_GetData` or :c:func:`PyBytesWriter_GetSize` is " "called on *writer*." msgstr "" -#: ../../c-api/bytes.rst:404 +#: ../../c-api/bytes.rst:405 msgid "Low-level API" msgstr "低レベルAPI" -#: ../../c-api/bytes.rst:408 +#: ../../c-api/bytes.rst:409 msgid "" "Resize the writer to *size* bytes. It can be used to enlarge or to shrink " "the writer. This function typically overallocates to achieve amortized " "performance when resizing multiple times." msgstr "" -#: ../../c-api/bytes.rst:413 ../../c-api/bytes.rst:426 +#: ../../c-api/bytes.rst:414 ../../c-api/bytes.rst:427 msgid "Newly allocated bytes are left uninitialized." msgstr "" -#: ../../c-api/bytes.rst:422 +#: ../../c-api/bytes.rst:423 msgid "" "Resize the writer by adding *grow* bytes to the current writer size. This " "function typically overallocates to achieve amortized performance when " "resizing multiple times." msgstr "" -#: ../../c-api/bytes.rst:431 +#: ../../c-api/bytes.rst:432 msgid "*size* can be negative to shrink the writer." msgstr "" -#: ../../c-api/bytes.rst:435 +#: ../../c-api/bytes.rst:436 msgid "" "Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer." msgstr "" -#: ../../c-api/bytes.rst:438 +#: ../../c-api/bytes.rst:439 msgid "" "The *buf* pointer is moved if the internal buffer is moved in memory. The " "*buf* relative position within the internal buffer is left unchanged." msgstr "" -#: ../../c-api/bytes.rst:444 +#: ../../c-api/bytes.rst:445 msgid "*buf* must not be ``NULL``." msgstr "" -#: ../../c-api/bytes.rst:448 +#: ../../c-api/bytes.rst:449 msgid "" "Py_ssize_t pos = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" "if (PyBytesWriter_Grow(writer, size) < 0) {\n" diff --git a/c-api/call.po b/c-api/call.po index c93a45a4c..19338de5c 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/capsule.po b/c-api/capsule.po index 2b0881f3b..f2b2632c4 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/cell.po b/c-api/cell.po index f9876d3cb..852870061 100644 --- a/c-api/cell.po +++ b/c-api/cell.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/code.po b/c-api/code.po index 72034ce34..869f01a7a 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/codec.po b/c-api/codec.po index 33e5c0460..97fa541f3 100644 --- a/c-api/codec.po +++ b/c-api/codec.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/complex.po b/c-api/complex.po index 69436306f..9561354e4 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-05 16:27+0000\n" +"POT-Creation-Date: 2026-08-25 14:37+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/concrete.po b/c-api/concrete.po index d2db75fe8..ced59d253 100644 --- a/c-api/concrete.po +++ b/c-api/concrete.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/contextvars.po b/c-api/contextvars.po index 426f44f0c..3dbe43212 100644 --- a/c-api/contextvars.po +++ b/c-api/contextvars.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/conversion.po b/c-api/conversion.po index 2f22c73ef..75102b713 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/coro.po b/c-api/coro.po index e1deab56e..c8e4965a6 100644 --- a/c-api/coro.po +++ b/c-api/coro.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/curses.po b/c-api/curses.po index 898fea013..8121d4848 100644 --- a/c-api/curses.po +++ b/c-api/curses.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-11-11 14:16+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/c-api/datetime.po b/c-api/datetime.po index 32a25cae5..1dce4509f 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/descriptor.po b/c-api/descriptor.po index 679115c58..0cbb5a9ea 100644 --- a/c-api/descriptor.po +++ b/c-api/descriptor.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/dict.po b/c-api/dict.po index 65afcf7d0..5d2f5b7c6 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -144,14 +144,9 @@ msgstr "*p* と同じキーと値のペアが入った新たな辞書を返し msgid "" "Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" "term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " -"on success or ``-1`` on failure. This function *does not* steal a reference " -"to *val*." -msgstr "" -"辞書 *p* に、 *key* をキーとして値 *val* を挿入します。\n" -"*key* はハッシュ可能(:term:`hashable`)でなければなりません。ハッシュ可能でな" -"い場合、 :exc:`TypeError` を送出します。\n" -"成功した場合には ``0`` を、失敗した場合には ``-1`` を返します。\n" -"この関数は *val* への参照を盗み取り *ません*。" +"on success or ``-1`` on failure. This function *does not* \":term:`steal`\" " +"a reference to *val*." +msgstr "" #: ../../c-api/dict.rst:121 msgid "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 8639a0b61..084e7007b 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -192,11 +192,32 @@ msgid "" "chained exceptions and notes." msgstr "" -#: ../../c-api/exceptions.rst:123 +#: ../../c-api/exceptions.rst:124 +msgid "Legacy variant of :c:func:`PyErr_DisplayException`." +msgstr "" + +#: ../../c-api/exceptions.rst:126 +msgid "" +"Print the exception *value* with its traceback to :data:`sys.stderr`. If " +"*value* has no traceback set, *tb* is used as its traceback. The first " +"argument is ignored." +msgstr "" + +#: ../../c-api/exceptions.rst:130 +msgid "" +"If :data:`sys.stderr` is ``None``, nothing is printed. If :data:`sys.stderr` " +"is not set, the exception is dumped to the C ``stderr`` stream instead." +msgstr "" + +#: ../../c-api/exceptions.rst:134 +msgid "Use :c:func:`PyErr_DisplayException` instead." +msgstr "" + +#: ../../c-api/exceptions.rst:138 msgid "Raising exceptions" msgstr "例外の送出" -#: ../../c-api/exceptions.rst:125 +#: ../../c-api/exceptions.rst:140 msgid "" "These functions help you set the current thread's error indicator. For " "convenience, some of these functions will always return a ``NULL`` pointer " @@ -206,7 +227,7 @@ msgstr "" "ため、これらの関数のいくつかは、 ``return`` 文で利用できるように常に " "``NULL`` ポインタを返します。" -#: ../../c-api/exceptions.rst:132 +#: ../../c-api/exceptions.rst:147 msgid "" "This is the most common way to set the error indicator. The first argument " "specifies the exception type; it is normally one of the standard exceptions, " @@ -215,7 +236,7 @@ msgid "" "error message; it is decoded from ``'utf-8'``." msgstr "" -#: ../../c-api/exceptions.rst:141 +#: ../../c-api/exceptions.rst:156 msgid "" "This function is similar to :c:func:`PyErr_SetString` but lets you specify " "an arbitrary Python object for the \"value\" of the exception." @@ -223,7 +244,7 @@ msgstr "" "この関数は :c:func:`PyErr_SetString` に似ていますが、例外の \"値(value)\" と" "して任意のPythonオブジェクトを指定することができます。" -#: ../../c-api/exceptions.rst:147 +#: ../../c-api/exceptions.rst:162 msgid "" "This function sets the error indicator and returns ``NULL``. *exception* " "should be a Python exception class. The *format* and subsequent parameters " @@ -235,7 +256,7 @@ msgstr "" "るためのもので, :c:func:`PyUnicode_FromFormat` の引数と同じ意味を持っていま" "す。 *format* は ASCII エンコードされた文字列です。" -#: ../../c-api/exceptions.rst:156 +#: ../../c-api/exceptions.rst:171 msgid "" "Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument " "rather than a variable number of arguments." @@ -243,11 +264,11 @@ msgstr "" ":c:func:`PyErr_Format` と同じですが、可変長引数の代わりに :c:type:`va_list` " "引数を受け取ります。" -#: ../../c-api/exceptions.rst:164 +#: ../../c-api/exceptions.rst:179 msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``." msgstr "これは ``PyErr_SetObject(type, Py_None)`` を省略したものです。" -#: ../../c-api/exceptions.rst:169 +#: ../../c-api/exceptions.rst:184 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where " "*message* indicates that a built-in operation was invoked with an illegal " @@ -257,7 +278,7 @@ msgstr "" "で *message* は組み込み操作が不正な引数で呼び出されたということを表していま" "す。主に内部で使用するためのものです。" -#: ../../c-api/exceptions.rst:176 +#: ../../c-api/exceptions.rst:191 msgid "" "This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns " "``NULL`` so an object allocation function can write ``return " @@ -267,7 +288,7 @@ msgstr "" "ます。したがって、メモリ不足になったとき、オブジェクト割り当て関数は " "``return PyErr_NoMemory();`` と書くことができます。" -#: ../../c-api/exceptions.rst:185 +#: ../../c-api/exceptions.rst:200 msgid "" "This is a convenience function to raise an exception when a C library " "function has returned an error and set the C variable :c:data:`errno`. It " @@ -281,7 +302,7 @@ msgid "" "``return PyErr_SetFromErrno(type);`` when the system call returns an error." msgstr "" -#: ../../c-api/exceptions.rst:199 +#: ../../c-api/exceptions.rst:214 msgid "" "Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that " "if *filenameObject* is not ``NULL``, it is passed to the constructor of " @@ -289,7 +310,7 @@ msgid "" "is used to define the :attr:`!filename` attribute of the exception instance." msgstr "" -#: ../../c-api/exceptions.rst:208 +#: ../../c-api/exceptions.rst:223 msgid "" "Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but takes a " "second filename object, for raising errors when a function that takes two " @@ -299,7 +320,7 @@ msgstr "" "取る関数が失敗したときに例外を送出するために、2つ目のファイル名オブジェクトを" "受け取ります。" -#: ../../c-api/exceptions.rst:217 +#: ../../c-api/exceptions.rst:232 msgid "" "Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename " "is given as a C string. *filename* is decoded from the :term:`filesystem " @@ -310,7 +331,7 @@ msgstr "" "*filename* は :term:`ファイルシステムのエンコーディングとエラーハンドラ " "` でデコードされます。" -#: ../../c-api/exceptions.rst:224 +#: ../../c-api/exceptions.rst:239 msgid "" "This is a convenience function to raise :exc:`OSError`. If called with " "*ierr* of ``0``, the error code returned by a call to :c:func:`!" @@ -324,13 +345,13 @@ msgid "" "``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:234 ../../c-api/exceptions.rst:242 -#: ../../c-api/exceptions.rst:253 ../../c-api/exceptions.rst:263 -#: ../../c-api/exceptions.rst:271 ../../c-api/exceptions.rst:281 +#: ../../c-api/exceptions.rst:249 ../../c-api/exceptions.rst:257 +#: ../../c-api/exceptions.rst:268 ../../c-api/exceptions.rst:278 +#: ../../c-api/exceptions.rst:286 ../../c-api/exceptions.rst:296 msgid "Availability" msgstr "" -#: ../../c-api/exceptions.rst:239 +#: ../../c-api/exceptions.rst:254 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter " "specifying the exception type to be raised." @@ -338,7 +359,7 @@ msgstr "" ":c:func:`PyErr_SetFromWindowsErr` に似ていますが、送出する例外の型を指定する" "引数が追加されています。" -#: ../../c-api/exceptions.rst:247 +#: ../../c-api/exceptions.rst:262 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior " "that if *filename* is not ``NULL``, it is decoded from the filesystem " @@ -347,7 +368,7 @@ msgid "" "attribute of the exception instance." msgstr "" -#: ../../c-api/exceptions.rst:258 +#: ../../c-api/exceptions.rst:273 msgid "" "Similar to :c:func:`PyErr_SetExcFromWindowsErr`, with the additional " "behavior that if *filename* is not ``NULL``, it is passed to the constructor " @@ -355,7 +376,7 @@ msgid "" "filename` attribute of the exception instance." msgstr "" -#: ../../c-api/exceptions.rst:268 +#: ../../c-api/exceptions.rst:283 msgid "" "Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but " "accepts a second filename object." @@ -363,7 +384,7 @@ msgstr "" ":c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject` に似てますが、2つ目の" "ファイル名オブジェクトを受け取ります。" -#: ../../c-api/exceptions.rst:278 +#: ../../c-api/exceptions.rst:293 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional " "parameter specifying the exception type to be raised." @@ -371,7 +392,7 @@ msgstr "" ":c:func:`PyErr_SetFromWindowsErrWithFilename` に似ていますが、送出する例外の" "型を指定する引数が追加されています。" -#: ../../c-api/exceptions.rst:286 +#: ../../c-api/exceptions.rst:301 msgid "" "This is a convenience function to raise :exc:`ImportError`. *msg* will be " "set as the exception's message string. *name* and *path*, both of which can " @@ -383,7 +404,7 @@ msgstr "" "く、それぞれ :exc:`ImportError` の ``name`` 属性と ``path`` 属性としてセット" "されます。" -#: ../../c-api/exceptions.rst:296 +#: ../../c-api/exceptions.rst:311 msgid "" "Much like :c:func:`PyErr_SetImportError` but this function allows for " "specifying a subclass of :exc:`ImportError` to raise." @@ -391,7 +412,7 @@ msgstr "" ":c:func:`PyErr_SetImportError` とよく似ていますが、この関数は送出する例外とし" "て、 :exc:`ImportError` のサブクラスを指定できます。" -#: ../../c-api/exceptions.rst:304 +#: ../../c-api/exceptions.rst:319 msgid "" "Set file, line, and offset information for the current exception. If the " "current exception is not a :exc:`SyntaxError`, then it sets additional " @@ -402,13 +423,13 @@ msgstr "" "現在の例外が :exc:`SyntaxError` でない場合は、例外を表示するサブシステムが、" "例外が :exc:`SyntaxError` であると思えるように属性を追加します。" -#: ../../c-api/exceptions.rst:314 +#: ../../c-api/exceptions.rst:329 msgid "" "Similar to :c:func:`PyErr_SyntaxLocationObject`, but also sets the " "*end_lineno* and *end_col_offset* information for the current exception." msgstr "" -#: ../../c-api/exceptions.rst:322 +#: ../../c-api/exceptions.rst:337 msgid "" "Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " "decoded from the :term:`filesystem encoding and error handler`." @@ -417,7 +438,7 @@ msgstr "" "ファイルシステムのエンコーディングとエラーハンドラ ` でデコードされたバイト文字列です。" -#: ../../c-api/exceptions.rst:330 +#: ../../c-api/exceptions.rst:345 msgid "" "Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " "omitted." @@ -425,7 +446,7 @@ msgstr "" ":c:func:`PyErr_SyntaxLocationEx` と似ていますが、 *col_offset* 引数が除去され" "ています。" -#: ../../c-api/exceptions.rst:336 +#: ../../c-api/exceptions.rst:351 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " "where *message* indicates that an internal operation (e.g. a Python/C API " @@ -436,30 +457,30 @@ msgstr "" "*message* は内部操作(例えば、Python/C API関数)が不正な引数とともに呼び出され" "たということを示しています。主に内部で使用するためのものです。" -#: ../../c-api/exceptions.rst:344 +#: ../../c-api/exceptions.rst:359 msgid "" "Get the source line in *filename* at line *lineno*. *filename* should be a " "Python :class:`str` object." msgstr "" -#: ../../c-api/exceptions.rst:347 +#: ../../c-api/exceptions.rst:362 msgid "" "On success, this function returns a Python string object with the found " "line. On failure, this function returns ``NULL`` without an exception set." msgstr "" -#: ../../c-api/exceptions.rst:353 +#: ../../c-api/exceptions.rst:368 msgid "" "Similar to :c:func:`PyErr_ProgramTextObject`, but *filename* is a :c:expr:" "`const char *`, which is decoded with the :term:`filesystem encoding and " "error handler`, instead of a Python object reference." msgstr "" -#: ../../c-api/exceptions.rst:360 +#: ../../c-api/exceptions.rst:375 msgid "Issuing warnings" msgstr "警告" -#: ../../c-api/exceptions.rst:362 +#: ../../c-api/exceptions.rst:377 msgid "" "Use these functions to issue warnings from C code. They mirror similar " "functions exported by the Python :mod:`warnings` module. They normally " @@ -488,7 +509,7 @@ msgstr "" "例外が送出された場合、呼び出し元は通常の例外処理を行います (例えば、保持して" "いた参照に対し :c:func:`Py_DECREF` を行い、エラー値を返します)。" -#: ../../c-api/exceptions.rst:377 +#: ../../c-api/exceptions.rst:392 msgid "" "Issue a warning message. The *category* argument is a warning category (see " "below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " @@ -504,7 +525,7 @@ msgstr "" "`PyErr_WarnEx` を呼び出している関数が、2 だとその上の関数が Warning の発行元" "になります。" -#: ../../c-api/exceptions.rst:384 +#: ../../c-api/exceptions.rst:399 msgid "" "Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" "`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " @@ -518,7 +539,7 @@ msgstr "" "標準の Python 警告カテゴリは、 :ref:`standardwarningcategories` で名前が列挙" "されているグローバル変数として利用可能です。" -#: ../../c-api/exceptions.rst:390 +#: ../../c-api/exceptions.rst:405 msgid "" "For information about warning control, see the documentation for the :mod:" "`warnings` module and the :option:`-W` option in the command line " @@ -528,7 +549,7 @@ msgstr "" "キュメンテーションとコマンドライン・ドキュメンテーションの :option:`-W` オプ" "ションを参照してください。警告コントロールのためのC APIはありません。" -#: ../../c-api/exceptions.rst:397 +#: ../../c-api/exceptions.rst:412 msgid "" "Issue a warning message with explicit control over all warning attributes. " "This is a straightforward wrapper around the Python function :func:`warnings." @@ -540,7 +561,7 @@ msgstr "" "はそちらを参照してください。そこに説明されているデフォルトの効果を得るため" "に、 *module* と *registry* 引数は ``NULL`` に設定することができます。" -#: ../../c-api/exceptions.rst:408 +#: ../../c-api/exceptions.rst:423 msgid "" "Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " "*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" @@ -551,32 +572,32 @@ msgstr "" "イルシステムのエンコーディングとエラーハンドラ ` でデコードされます。" -#: ../../c-api/exceptions.rst:415 +#: ../../c-api/exceptions.rst:430 msgid "" "Function similar to :c:func:`PyErr_WarnEx`, but uses :c:func:" "`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" "encoded string." msgstr "" -#: ../../c-api/exceptions.rst:424 +#: ../../c-api/exceptions.rst:439 msgid "" "Similar to :c:func:`PyErr_WarnExplicit`, but uses :c:func:" "`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" "encoded string." msgstr "" -#: ../../c-api/exceptions.rst:433 +#: ../../c-api/exceptions.rst:448 msgid "" "Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" "`ResourceWarning` and it passes *source* to :class:`!warnings." "WarningMessage`." msgstr "" -#: ../../c-api/exceptions.rst:440 +#: ../../c-api/exceptions.rst:455 msgid "Querying the error indicator" msgstr "エラーインジケータの問い合わせ" -#: ../../c-api/exceptions.rst:444 +#: ../../c-api/exceptions.rst:459 msgid "" "Test whether the error indicator is set. If set, return the exception " "*type* (the first argument to the last call to one of the ``PyErr_Set*`` " @@ -590,11 +611,11 @@ msgstr "" "します。あなたは戻り値への参照を持っていませんので、それに :c:func:" "`Py_DECREF` する必要はありません。" -#: ../../c-api/exceptions.rst:450 +#: ../../c-api/exceptions.rst:465 msgid "The caller must have an :term:`attached thread state`." msgstr "" -#: ../../c-api/exceptions.rst:454 +#: ../../c-api/exceptions.rst:469 msgid "" "Do not compare the return value to a specific exception; use :c:func:" "`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " @@ -606,7 +627,7 @@ msgstr "" "ぜなら、例外はクラスではなくインスタンスかもしれないし、あるいは、クラス例外" "の場合は期待される例外のサブクラスかもしれないからです。)" -#: ../../c-api/exceptions.rst:462 +#: ../../c-api/exceptions.rst:477 msgid "" "Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " "should only be called when an exception is actually set; a memory access " @@ -616,7 +637,7 @@ msgstr "" "定されたときにだけ、これを呼び出だすべきです。例外が発生していないならば、メ" "モリアクセス違反が起きるでしょう。" -#: ../../c-api/exceptions.rst:469 +#: ../../c-api/exceptions.rst:484 msgid "" "Return true if the *given* exception matches the exception type in *exc*. " "If *exc* is a class object, this also returns true when *given* is an " @@ -629,7 +650,7 @@ msgstr "" "*exc* がタプルの場合は、タプルにある (およびそのサブタプルに再帰的にある) す" "べての例外型が適合するか調べられます。" -#: ../../c-api/exceptions.rst:477 +#: ../../c-api/exceptions.rst:492 msgid "" "Return the exception currently being raised, clearing the error indicator at " "the same time. Return ``NULL`` if the error indicator is not set." @@ -637,7 +658,7 @@ msgstr "" "現在発生している例外を返し、同時にエラーインジケータを消去します。エラーイン" "ジケータが設定されていない場合は ``NULL`` を返します。" -#: ../../c-api/exceptions.rst:480 +#: ../../c-api/exceptions.rst:495 msgid "" "This function is used by code that needs to catch exceptions, or code that " "needs to save and restore the error indicator temporarily." @@ -645,11 +666,11 @@ msgstr "" "この関数は、例外をキャッチする必要があるコード、または一時的にエラーインジ" "ケータを保存・復元する必要があるコードに使用されます。" -#: ../../c-api/exceptions.rst:483 ../../c-api/exceptions.rst:527 +#: ../../c-api/exceptions.rst:498 ../../c-api/exceptions.rst:543 msgid "For example::" msgstr "例えば::" -#: ../../c-api/exceptions.rst:485 +#: ../../c-api/exceptions.rst:500 msgid "" "{\n" " PyObject *exc = PyErr_GetRaisedException();\n" @@ -667,27 +688,32 @@ msgstr "" " PyErr_SetRaisedException(exc);\n" "}" -#: ../../c-api/exceptions.rst:493 +#: ../../c-api/exceptions.rst:508 msgid "" ":c:func:`PyErr_GetHandledException`, to save the exception currently being " "handled." msgstr "" -#: ../../c-api/exceptions.rst:501 +#: ../../c-api/exceptions.rst:516 msgid "" "Set *exc* as the exception currently being raised, clearing the existing " -"exception if one is set." +"exception if one is set. If *exc* is ``NULL``, just clear the existing " +"exception." msgstr "" -#: ../../c-api/exceptions.rst:506 -msgid "This call steals a reference to *exc*, which must be a valid exception." +#: ../../c-api/exceptions.rst:520 +msgid "*exc* must be a valid exception or ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:515 +#: ../../c-api/exceptions.rst:522 +msgid "This call \":term:`steals `\" a reference to *exc*." +msgstr "" + +#: ../../c-api/exceptions.rst:531 msgid "Use :c:func:`PyErr_GetRaisedException` instead." msgstr "" -#: ../../c-api/exceptions.rst:517 +#: ../../c-api/exceptions.rst:533 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -701,13 +727,13 @@ msgstr "" "れのオブジェクトへの参照を持つことになります。型オブジェクトが ``NULL`` でな" "いときでさえ、その値とトレースバックオブジェクトは ``NULL`` かもしれません。" -#: ../../c-api/exceptions.rst:524 +#: ../../c-api/exceptions.rst:540 msgid "" "This function is normally only used by legacy code that needs to catch " "exceptions or save and restore the error indicator temporarily." msgstr "" -#: ../../c-api/exceptions.rst:529 +#: ../../c-api/exceptions.rst:545 msgid "" "{\n" " PyObject *type, *value, *traceback;\n" @@ -719,11 +745,11 @@ msgid "" "}" msgstr "" -#: ../../c-api/exceptions.rst:543 +#: ../../c-api/exceptions.rst:559 msgid "Use :c:func:`PyErr_SetRaisedException` instead." msgstr "" -#: ../../c-api/exceptions.rst:545 +#: ../../c-api/exceptions.rst:561 msgid "" "Set the error indicator from the three objects, *type*, *value*, and " "*traceback*, clearing the existing exception if one is set. If the objects " @@ -736,20 +762,20 @@ msgid "" "don't use this function. I warned you.)" msgstr "" -#: ../../c-api/exceptions.rst:559 +#: ../../c-api/exceptions.rst:575 msgid "" "This function is normally only used by legacy code that needs to save and " "restore the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save " "the current error indicator." msgstr "" -#: ../../c-api/exceptions.rst:568 +#: ../../c-api/exceptions.rst:584 msgid "" "Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-" "normalization." msgstr "" -#: ../../c-api/exceptions.rst:571 +#: ../../c-api/exceptions.rst:587 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -765,21 +791,21 @@ msgstr "" "は何も起きません。遅延正規化はパフォーマンスを改善するために実装されていま" "す。" -#: ../../c-api/exceptions.rst:579 +#: ../../c-api/exceptions.rst:595 msgid "" "This function *does not* implicitly set the :attr:`~BaseException." "__traceback__` attribute on the exception value. If setting the traceback " "appropriately is desired, the following additional snippet is needed::" msgstr "" -#: ../../c-api/exceptions.rst:584 +#: ../../c-api/exceptions.rst:600 msgid "" "if (tb != NULL) {\n" " PyException_SetTraceback(val, tb);\n" "}" msgstr "" -#: ../../c-api/exceptions.rst:591 +#: ../../c-api/exceptions.rst:607 msgid "" "Retrieve the active exception instance, as would be returned by :func:`sys." "exception`. This refers to an exception that was *already caught*, not to an " @@ -787,7 +813,7 @@ msgid "" "or ``NULL``. Does not modify the interpreter's exception state." msgstr "" -#: ../../c-api/exceptions.rst:598 +#: ../../c-api/exceptions.rst:614 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -799,14 +825,14 @@ msgstr "" "例外の状態を元に戻す、もしくはクリアするには :c:func:" "`PyErr_SetHandledException` を使ってください。" -#: ../../c-api/exceptions.rst:607 +#: ../../c-api/exceptions.rst:623 msgid "" "Set the active exception, as known from ``sys.exception()``. This refers to " "an exception that was *already caught*, not to an exception that was freshly " "raised. To clear the exception state, pass ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:614 +#: ../../c-api/exceptions.rst:630 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -818,7 +844,7 @@ msgstr "" "例外の状態を取得するには :c:func:`PyErr_GetHandledException` を使ってくださ" "い。" -#: ../../c-api/exceptions.rst:623 +#: ../../c-api/exceptions.rst:639 msgid "" "Retrieve the old-style representation of the exception info, as known from :" "func:`sys.exc_info`. This refers to an exception that was *already caught*, " @@ -828,7 +854,7 @@ msgid "" "using :c:func:`PyErr_GetHandledException`." msgstr "" -#: ../../c-api/exceptions.rst:632 +#: ../../c-api/exceptions.rst:648 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -840,17 +866,17 @@ msgstr "" "例外の状態を元に戻す、もしくはクリアするには :c:func:`PyErr_SetExcInfo` を" "使ってください。" -#: ../../c-api/exceptions.rst:642 +#: ../../c-api/exceptions.rst:658 msgid "" "Set the exception info, as known from ``sys.exc_info()``. This refers to an " "exception that was *already caught*, not to an exception that was freshly " -"raised. This function steals the references of the arguments. To clear the " -"exception state, pass ``NULL`` for all three arguments. This function is " -"kept for backwards compatibility. Prefer using :c:func:" -"`PyErr_SetHandledException`." +"raised. This function \":term:`steals `\" the references of the " +"arguments. To clear the exception state, pass ``NULL`` for all three " +"arguments. This function is kept for backwards compatibility. Prefer using :" +"c:func:`PyErr_SetHandledException`." msgstr "" -#: ../../c-api/exceptions.rst:651 +#: ../../c-api/exceptions.rst:668 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -861,25 +887,26 @@ msgstr "" "外の状態を一時的に保存し、元に戻す必要があるコードで使用することができます。" "例外の状態を取得するには :c:func:`PyErr_GetExcInfo` を使ってください。" -#: ../../c-api/exceptions.rst:658 +#: ../../c-api/exceptions.rst:675 msgid "" "The ``type`` and ``traceback`` arguments are no longer used and can be NULL. " "The interpreter now derives them from the exception instance (the ``value`` " -"argument). The function still steals references of all three arguments." +"argument). The function still \":term:`steals `\" references of all " +"three arguments." msgstr "" -#: ../../c-api/exceptions.rst:666 +#: ../../c-api/exceptions.rst:683 msgid "Signal Handling" msgstr "シグナルハンドリング" -#: ../../c-api/exceptions.rst:676 +#: ../../c-api/exceptions.rst:693 msgid "" "Handle external interruptions, such as signals or activating a debugger, " "whose processing has been delayed until it is safe to run Python code and/or " "raise exceptions." msgstr "" -#: ../../c-api/exceptions.rst:680 +#: ../../c-api/exceptions.rst:697 msgid "" "For example, pressing :kbd:`Ctrl-C` causes a terminal to send the :py:data:" "`signal.SIGINT` signal. This function executes the corresponding Python " @@ -887,85 +914,85 @@ msgid "" "exception." msgstr "" -#: ../../c-api/exceptions.rst:685 +#: ../../c-api/exceptions.rst:702 msgid "" ":c:func:`!PyErr_CheckSignals` should be called by long-running C code " "frequently enough so that the response appears immediate to humans." msgstr "" -#: ../../c-api/exceptions.rst:688 +#: ../../c-api/exceptions.rst:705 msgid "Handlers invoked by this function currently include:" msgstr "" -#: ../../c-api/exceptions.rst:690 +#: ../../c-api/exceptions.rst:707 msgid "" "Signal handlers, including Python functions registered using the :mod:" "`signal` module." msgstr "" -#: ../../c-api/exceptions.rst:693 +#: ../../c-api/exceptions.rst:710 msgid "" "Signal handlers are only run in the main thread of the main interpreter." msgstr "" -#: ../../c-api/exceptions.rst:695 +#: ../../c-api/exceptions.rst:712 msgid "" "(This is where the function got the name: originally, signals were the only " "way to interrupt the interpreter.)" msgstr "" -#: ../../c-api/exceptions.rst:698 +#: ../../c-api/exceptions.rst:715 msgid "Running the garbage collector, if necessary." msgstr "" -#: ../../c-api/exceptions.rst:700 +#: ../../c-api/exceptions.rst:717 msgid "Executing a pending :ref:`remote debugger ` script." msgstr "" -#: ../../c-api/exceptions.rst:702 +#: ../../c-api/exceptions.rst:719 msgid "Raise the exception set by :c:func:`PyThreadState_SetAsyncExc`." msgstr "" -#: ../../c-api/exceptions.rst:704 +#: ../../c-api/exceptions.rst:721 msgid "" "If any handler raises an exception, immediately return ``-1`` with that " "exception set. Any remaining interruptions are left to be processed on the " "next :c:func:`PyErr_CheckSignals()` invocation, if appropriate." msgstr "" -#: ../../c-api/exceptions.rst:709 +#: ../../c-api/exceptions.rst:726 msgid "" "If all handlers finish successfully, or there are no handlers to run, return " "``0``." msgstr "" -#: ../../c-api/exceptions.rst:712 +#: ../../c-api/exceptions.rst:729 msgid "This function may now invoke the garbage collector." msgstr "" -#: ../../c-api/exceptions.rst:715 +#: ../../c-api/exceptions.rst:732 msgid "" "This function may now execute a remote debugger script, if remote debugging " "is enabled." msgstr "" -#: ../../c-api/exceptions.rst:719 +#: ../../c-api/exceptions.rst:736 msgid "The exception set by :c:func:`PyThreadState_SetAsyncExc` is now raised." msgstr "" -#: ../../c-api/exceptions.rst:730 +#: ../../c-api/exceptions.rst:747 msgid "" "Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " "equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" -#: ../../c-api/exceptions.rst:734 ../../c-api/exceptions.rst:761 +#: ../../c-api/exceptions.rst:751 ../../c-api/exceptions.rst:778 msgid "" "This function is async-signal-safe. It can be called without an :term:" "`attached thread state` and from a C signal handler." msgstr "" -#: ../../c-api/exceptions.rst:744 +#: ../../c-api/exceptions.rst:761 msgid "" "Simulate the effect of a signal arriving. The next time :c:func:" "`PyErr_CheckSignals` is called, the Python signal handler for the given " @@ -975,7 +1002,7 @@ msgstr "" "次に :c:func:`PyErr_CheckSignals` が呼ばれたとき、与えられたシグナル番号用の " "Python のシグナルハンドラが呼び出されます。" -#: ../../c-api/exceptions.rst:748 +#: ../../c-api/exceptions.rst:765 msgid "" "This function can be called by C code that sets up its own signal handling " "and wants Python signal handlers to be invoked as expected when an " @@ -983,20 +1010,20 @@ msgid "" "interrupt an operation)." msgstr "" -#: ../../c-api/exceptions.rst:753 +#: ../../c-api/exceptions.rst:770 msgid "" "If the given signal isn't handled by Python (it was set to :py:const:`signal." "SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored." msgstr "" -#: ../../c-api/exceptions.rst:756 +#: ../../c-api/exceptions.rst:773 msgid "" "If *signum* is outside of the allowed range of signal numbers, ``-1`` is " "returned. Otherwise, ``0`` is returned. The error indicator is never " "changed by this function." msgstr "" -#: ../../c-api/exceptions.rst:769 +#: ../../c-api/exceptions.rst:786 msgid "" "This utility function specifies a file descriptor to which the signal number " "is written as a single byte whenever a signal is received. *fd* must be non-" @@ -1007,7 +1034,7 @@ msgstr "" "*fd* はノンブロッキングでなければなりません。\n" "この関数は、1つ前のファイル記述子を返します。" -#: ../../c-api/exceptions.rst:773 +#: ../../c-api/exceptions.rst:790 msgid "" "The value ``-1`` disables the feature; this is the initial state. This is " "equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " @@ -1020,15 +1047,15 @@ msgstr "" "*fd* は有効なファイル記述子であるべきです。\n" "この関数はメインスレッドからのみ呼び出されるべきです。" -#: ../../c-api/exceptions.rst:778 +#: ../../c-api/exceptions.rst:795 msgid "On Windows, the function now also supports socket handles." msgstr "Windowsで、この関数はソケットハンドルをサポートするようになりました。" -#: ../../c-api/exceptions.rst:783 +#: ../../c-api/exceptions.rst:800 msgid "Exception Classes" msgstr "例外クラス" -#: ../../c-api/exceptions.rst:787 +#: ../../c-api/exceptions.rst:804 msgid "" "This utility function creates and returns a new exception class. The *name* " "argument must be the name of the new exception, a C string of the form " @@ -1042,7 +1069,7 @@ msgstr "" "組み込み名 :exc:`Exception` (Cでは :c:data:`PyExc_Exception` としてアクセス可" "能)をルートとして派生したクラスオブジェクトを作成します。" -#: ../../c-api/exceptions.rst:793 +#: ../../c-api/exceptions.rst:810 msgid "" "The :attr:`~type.__module__` attribute of the new class is set to the first " "part (up to the last dot) of the *name* argument, and the class name is set " @@ -1052,7 +1079,7 @@ msgid "" "variables and methods." msgstr "" -#: ../../c-api/exceptions.rst:802 +#: ../../c-api/exceptions.rst:819 msgid "" "Same as :c:func:`PyErr_NewException`, except that the new exception class " "can easily be given a docstring: If *doc* is non-``NULL``, it will be used " @@ -1062,21 +1089,21 @@ msgstr "" "docstring を設定できます。 *doc* が ``NULL`` で無い場合、それが例外クラスの " "docstring になります。" -#: ../../c-api/exceptions.rst:811 +#: ../../c-api/exceptions.rst:828 msgid "" "Return non-zero if *ob* is an exception class, zero otherwise. This function " "always succeeds." msgstr "" -#: ../../c-api/exceptions.rst:816 +#: ../../c-api/exceptions.rst:833 msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." msgstr "" -#: ../../c-api/exceptions.rst:821 +#: ../../c-api/exceptions.rst:838 msgid "This is a macro including the base fields for an exception object." msgstr "" -#: ../../c-api/exceptions.rst:824 +#: ../../c-api/exceptions.rst:841 msgid "" "This was included in Python's C API by mistake and is not designed for use " "in extensions. For creating custom exception objects, use :c:func:" @@ -1084,21 +1111,21 @@ msgid "" "`PyExc_BaseException`." msgstr "" -#: ../../c-api/exceptions.rst:833 +#: ../../c-api/exceptions.rst:850 msgid "Exception Objects" msgstr "例外オブジェクト" -#: ../../c-api/exceptions.rst:837 +#: ../../c-api/exceptions.rst:854 msgid "" "Return true if *op* is an instance of :class:`BaseException`, false " "otherwise. This function always succeeds." msgstr "" -#: ../../c-api/exceptions.rst:843 +#: ../../c-api/exceptions.rst:860 msgid "Equivalent to :c:func:`Py_TYPE(op) `." msgstr "" -#: ../../c-api/exceptions.rst:848 +#: ../../c-api/exceptions.rst:865 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through the :attr:`~BaseException.__traceback__` " @@ -1108,7 +1135,7 @@ msgstr "" "じ、例外に関する traceback の新しい参照を返します。関係する traceback が無い" "場合は、 ``NULL`` を返します。" -#: ../../c-api/exceptions.rst:856 +#: ../../c-api/exceptions.rst:873 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." @@ -1116,7 +1143,7 @@ msgstr "" "その例外に関する traceback に *tb* をセットします。クリアするには " "``Py_None`` を使用してください。" -#: ../../c-api/exceptions.rst:862 +#: ../../c-api/exceptions.rst:879 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -1124,17 +1151,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" -#: ../../c-api/exceptions.rst:870 +#: ../../c-api/exceptions.rst:887 msgid "" "Set the context associated with the exception to *ctx*. Use ``NULL`` to " "clear it. There is no type check to make sure that *ctx* is an exception " -"instance. This steals a reference to *ctx*." +"instance. This \":term:`steals `\" a reference to *ctx*." msgstr "" -"例外に関するコンテキストに *ctx* をセットします。クリアするには ``NULL`` を使" -"用してください。*ctx* が例外インスタンスかどうかを確かめる型チェックは行われ" -"ません。これは *ctx* への参照を盗みます。" -#: ../../c-api/exceptions.rst:877 +#: ../../c-api/exceptions.rst:894 msgid "" "Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " @@ -1142,28 +1166,29 @@ msgid "" "attribute." msgstr "" -#: ../../c-api/exceptions.rst:885 +#: ../../c-api/exceptions.rst:902 msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " "clear it. There is no type check to make sure that *cause* is either an " -"exception instance or ``None``. This steals a reference to *cause*." +"exception instance or ``None``. This \":term:`steals `\" a reference " +"to *cause*." msgstr "" -#: ../../c-api/exceptions.rst:889 +#: ../../c-api/exceptions.rst:907 msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " "to ``True`` by this function." msgstr "" -#: ../../c-api/exceptions.rst:895 +#: ../../c-api/exceptions.rst:913 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: ../../c-api/exceptions.rst:900 +#: ../../c-api/exceptions.rst:918 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: ../../c-api/exceptions.rst:904 +#: ../../c-api/exceptions.rst:922 msgid "" "Implement part of the interpreter's implementation of :keyword:`!except*`. " "*orig* is the original exception that was caught, and *excs* is the list of " @@ -1175,18 +1200,18 @@ msgid "" "if there is nothing to reraise." msgstr "" -#: ../../c-api/exceptions.rst:918 +#: ../../c-api/exceptions.rst:936 msgid "Unicode Exception Objects" msgstr "Unicode 例外オブジェクト" -#: ../../c-api/exceptions.rst:920 +#: ../../c-api/exceptions.rst:938 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" "以下の関数は C言語から Unicode 例外を作ったり修正したりするために利用します。" -#: ../../c-api/exceptions.rst:924 +#: ../../c-api/exceptions.rst:942 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " @@ -1196,15 +1221,15 @@ msgstr "" "`UnicodeDecodeError` オブジェクトを作成します。 *encoding* および *reason* " "は UTF-8 エンコードされた文字列です。" -#: ../../c-api/exceptions.rst:931 +#: ../../c-api/exceptions.rst:949 msgid "Return the *encoding* attribute of the given exception object." msgstr "与えられた例外オブジェクトの *encoding* 属性を返します。" -#: ../../c-api/exceptions.rst:937 +#: ../../c-api/exceptions.rst:955 msgid "Return the *object* attribute of the given exception object." msgstr "与えられた例外オブジェクトの *object* 属性を返します。" -#: ../../c-api/exceptions.rst:943 +#: ../../c-api/exceptions.rst:961 msgid "" "Get the *start* attribute of the given exception object and place it into " "*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " @@ -1214,29 +1239,29 @@ msgstr "" "*start* は ``NULL`` であってはなりません。成功したら ``0`` を、失敗したら " "``-1`` を返します。" -#: ../../c-api/exceptions.rst:947 +#: ../../c-api/exceptions.rst:965 msgid "" "If the :attr:`UnicodeError.object` is an empty sequence, the resulting " "*start* is ``0``. Otherwise, it is clipped to ``[0, len(object) - 1]``." msgstr "" -#: ../../c-api/exceptions.rst:950 +#: ../../c-api/exceptions.rst:968 msgid ":attr:`UnicodeError.start`" msgstr "" -#: ../../c-api/exceptions.rst:956 +#: ../../c-api/exceptions.rst:974 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../c-api/exceptions.rst:961 +#: ../../c-api/exceptions.rst:979 msgid "" "While passing a negative *start* does not raise an exception, the " "corresponding getters will not consider it as a relative offset." msgstr "" -#: ../../c-api/exceptions.rst:969 +#: ../../c-api/exceptions.rst:987 msgid "" "Get the *end* attribute of the given exception object and place it into " "*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " @@ -1246,13 +1271,13 @@ msgstr "" "*end* は ``NULL`` であってはなりません。成功したら ``0`` を、失敗したら " "``-1`` を返します。" -#: ../../c-api/exceptions.rst:973 +#: ../../c-api/exceptions.rst:991 msgid "" "If the :attr:`UnicodeError.object` is an empty sequence, the resulting *end* " "is ``0``. Otherwise, it is clipped to ``[1, len(object)]``." msgstr "" -#: ../../c-api/exceptions.rst:980 +#: ../../c-api/exceptions.rst:998 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." @@ -1260,15 +1285,15 @@ msgstr "" "渡された例外オブジェクトの *end* 属性を *end* に設定します。成功したら ``0`` " "を、失敗したら ``-1`` を返します。" -#: ../../c-api/exceptions.rst:983 +#: ../../c-api/exceptions.rst:1001 msgid ":attr:`UnicodeError.end`" msgstr "" -#: ../../c-api/exceptions.rst:989 +#: ../../c-api/exceptions.rst:1007 msgid "Return the *reason* attribute of the given exception object." msgstr "渡された例外オブジェクトの *reason* 属性を返します。" -#: ../../c-api/exceptions.rst:995 +#: ../../c-api/exceptions.rst:1013 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." @@ -1276,11 +1301,11 @@ msgstr "" "渡された例外オブジェクトの *reason* 属性を *reason* に設定します。成功したら " "``0`` を、失敗したら ``-1`` を返します。" -#: ../../c-api/exceptions.rst:1002 +#: ../../c-api/exceptions.rst:1020 msgid "Recursion Control" msgstr "再帰の管理" -#: ../../c-api/exceptions.rst:1004 +#: ../../c-api/exceptions.rst:1022 msgid "" "These two functions provide a way to perform safe recursive calls at the C " "level, both in the core and in extension modules. They are needed if the " @@ -1290,18 +1315,18 @@ msgid "" "recursion handling." msgstr "" -#: ../../c-api/exceptions.rst:1013 +#: ../../c-api/exceptions.rst:1031 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "C レベルの再帰呼び出しをしようとしているところに印を付けます。" -#: ../../c-api/exceptions.rst:1015 +#: ../../c-api/exceptions.rst:1033 msgid "" "The function then checks if the stack limit is reached. If this is the " "case, a :exc:`RecursionError` is set and a nonzero value is returned. " "Otherwise, zero is returned." msgstr "" -#: ../../c-api/exceptions.rst:1019 +#: ../../c-api/exceptions.rst:1037 msgid "" "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " "to be concatenated to the :exc:`RecursionError` message caused by the " @@ -1311,17 +1336,17 @@ msgstr "" "して、再帰の深さの限界に達したことで送出される :exc:`RecursionError` のメッ" "セージに連結できるようにすべきです。" -#: ../../c-api/exceptions.rst:1024 +#: ../../c-api/exceptions.rst:1042 msgid "The :c:func:`PyUnstable_ThreadState_SetStackProtection` function." msgstr "" -#: ../../c-api/exceptions.rst:1026 ../../c-api/exceptions.rst:1034 +#: ../../c-api/exceptions.rst:1044 ../../c-api/exceptions.rst:1052 msgid "" "This function is now also available in the :ref:`limited API `." msgstr "" -#: ../../c-api/exceptions.rst:1031 +#: ../../c-api/exceptions.rst:1049 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." @@ -1330,21 +1355,16 @@ msgstr "" "`Py_EnterRecursiveCall` の *成功した* 呼び出しに対し 1 回呼ばなければなりませ" "ん。" -#: ../../c-api/exceptions.rst:1037 +#: ../../c-api/exceptions.rst:1055 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" "c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent " "cycles. The following two functions facilitate this functionality. " -"Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." +"Effectively, these are the C equivalent to :deco:`reprlib.recursive_repr`." msgstr "" -"コンテナ型に対し :c:member:`~PyTypeObject.tp_repr` を適切に実装するには、特殊" -"な再帰の処理が求められます。スタックの防護に加え、 :c:member:`~PyTypeObject." -"tp_repr` は循環処理を避けるためにオブジェクトを辿っていく必要があります。次" -"の 2 つの関数はその機能を容易にします。実質的には、これらは :func:`reprlib." -"recursive_repr` と同等な C の実装です。" -#: ../../c-api/exceptions.rst:1045 +#: ../../c-api/exceptions.rst:1063 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." @@ -1352,7 +1372,7 @@ msgstr "" "循環処理を検知するために、 :c:member:`~PyTypeObject.tp_repr` の実装の先頭で呼" "び出します。" -#: ../../c-api/exceptions.rst:1048 +#: ../../c-api/exceptions.rst:1066 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -1364,7 +1384,7 @@ msgstr "" "ブジェクトを返すべきです。例えば、 :class:`dict` オブジェクトは ``{...}`` を" "返しますし、 :class:`list` オブジェクトは ``[...]`` を返します。" -#: ../../c-api/exceptions.rst:1054 +#: ../../c-api/exceptions.rst:1072 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -1373,7 +1393,7 @@ msgstr "" "再帰回数の上限に達した場合は、この関数は負の整数を返します。この場合、 :c:" "member:`~PyTypeObject.tp_repr` の実装は一般的には ``NULL`` を返すべきです。" -#: ../../c-api/exceptions.rst:1058 +#: ../../c-api/exceptions.rst:1076 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." @@ -1381,7 +1401,7 @@ msgstr "" "それ以外の場合は、関数はゼロを返し、 :c:member:`~PyTypeObject.tp_repr` の実装" "は通常どおり処理を続けてかまいません。" -#: ../../c-api/exceptions.rst:1063 +#: ../../c-api/exceptions.rst:1081 msgid "" "Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" "c:func:`Py_ReprEnter` that returns zero." @@ -1389,286 +1409,286 @@ msgstr "" ":c:func:`Py_ReprEnter` を終了させます。 0 を返した :c:func:`Py_ReprEnter` の" "呼び出しに対し 1 回呼ばなければなりません。" -#: ../../c-api/exceptions.rst:1068 +#: ../../c-api/exceptions.rst:1086 msgid "" "Get the recursion limit for the current interpreter. It can be set with :c:" "func:`Py_SetRecursionLimit`. The recursion limit prevents the Python " "interpreter stack from growing infinitely." msgstr "" -#: ../../c-api/exceptions.rst:1072 ../../c-api/exceptions.rst:1082 +#: ../../c-api/exceptions.rst:1090 ../../c-api/exceptions.rst:1100 msgid "" "This function cannot fail, and the caller must hold an :term:`attached " "thread state`." msgstr "" -#: ../../c-api/exceptions.rst:1076 +#: ../../c-api/exceptions.rst:1094 msgid ":py:func:`sys.getrecursionlimit`" msgstr "" -#: ../../c-api/exceptions.rst:1080 +#: ../../c-api/exceptions.rst:1098 msgid "Set the recursion limit for the current interpreter." msgstr "" -#: ../../c-api/exceptions.rst:1086 +#: ../../c-api/exceptions.rst:1104 msgid ":py:func:`sys.setrecursionlimit`" msgstr "" -#: ../../c-api/exceptions.rst:1091 +#: ../../c-api/exceptions.rst:1109 msgid "Exception and warning types" msgstr "" -#: ../../c-api/exceptions.rst:1093 +#: ../../c-api/exceptions.rst:1111 msgid "" "All standard Python exceptions and warning categories are available as " "global variables whose names are ``PyExc_`` followed by the Python exception " "name. These have the type :c:expr:`PyObject*`; they are all class objects." msgstr "" -#: ../../c-api/exceptions.rst:1097 +#: ../../c-api/exceptions.rst:1115 msgid "For completeness, here are all the variables:" msgstr "" -#: ../../c-api/exceptions.rst:1100 +#: ../../c-api/exceptions.rst:1118 msgid "Exception types" msgstr "" -#: ../../c-api/exceptions.rst:1107 ../../c-api/exceptions.rst:1255 -#: ../../c-api/exceptions.rst:1285 +#: ../../c-api/exceptions.rst:1125 ../../c-api/exceptions.rst:1273 +#: ../../c-api/exceptions.rst:1303 msgid "C name" msgstr "" -#: ../../c-api/exceptions.rst:1108 ../../c-api/exceptions.rst:1256 -#: ../../c-api/exceptions.rst:1286 +#: ../../c-api/exceptions.rst:1126 ../../c-api/exceptions.rst:1274 +#: ../../c-api/exceptions.rst:1304 msgid "Python name" msgstr "" -#: ../../c-api/exceptions.rst:1110 +#: ../../c-api/exceptions.rst:1128 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: ../../c-api/exceptions.rst:1112 +#: ../../c-api/exceptions.rst:1130 msgid ":exc:`BaseExceptionGroup`" msgstr "" -#: ../../c-api/exceptions.rst:1114 +#: ../../c-api/exceptions.rst:1132 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: ../../c-api/exceptions.rst:1116 +#: ../../c-api/exceptions.rst:1134 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: ../../c-api/exceptions.rst:1118 +#: ../../c-api/exceptions.rst:1136 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: ../../c-api/exceptions.rst:1120 +#: ../../c-api/exceptions.rst:1138 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: ../../c-api/exceptions.rst:1122 +#: ../../c-api/exceptions.rst:1140 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: ../../c-api/exceptions.rst:1124 +#: ../../c-api/exceptions.rst:1142 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: ../../c-api/exceptions.rst:1126 +#: ../../c-api/exceptions.rst:1144 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: ../../c-api/exceptions.rst:1128 +#: ../../c-api/exceptions.rst:1146 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: ../../c-api/exceptions.rst:1130 +#: ../../c-api/exceptions.rst:1148 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: ../../c-api/exceptions.rst:1132 +#: ../../c-api/exceptions.rst:1150 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: ../../c-api/exceptions.rst:1134 +#: ../../c-api/exceptions.rst:1152 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: ../../c-api/exceptions.rst:1136 +#: ../../c-api/exceptions.rst:1154 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: ../../c-api/exceptions.rst:1138 +#: ../../c-api/exceptions.rst:1156 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: ../../c-api/exceptions.rst:1140 +#: ../../c-api/exceptions.rst:1158 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: ../../c-api/exceptions.rst:1142 +#: ../../c-api/exceptions.rst:1160 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: ../../c-api/exceptions.rst:1144 +#: ../../c-api/exceptions.rst:1162 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: ../../c-api/exceptions.rst:1146 +#: ../../c-api/exceptions.rst:1164 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: ../../c-api/exceptions.rst:1148 +#: ../../c-api/exceptions.rst:1166 msgid ":exc:`ImportCycleError`" msgstr "" -#: ../../c-api/exceptions.rst:1150 +#: ../../c-api/exceptions.rst:1168 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: ../../c-api/exceptions.rst:1152 +#: ../../c-api/exceptions.rst:1170 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: ../../c-api/exceptions.rst:1154 +#: ../../c-api/exceptions.rst:1172 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: ../../c-api/exceptions.rst:1156 +#: ../../c-api/exceptions.rst:1174 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: ../../c-api/exceptions.rst:1158 +#: ../../c-api/exceptions.rst:1176 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: ../../c-api/exceptions.rst:1160 +#: ../../c-api/exceptions.rst:1178 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: ../../c-api/exceptions.rst:1162 +#: ../../c-api/exceptions.rst:1180 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: ../../c-api/exceptions.rst:1164 +#: ../../c-api/exceptions.rst:1182 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: ../../c-api/exceptions.rst:1166 +#: ../../c-api/exceptions.rst:1184 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: ../../c-api/exceptions.rst:1168 +#: ../../c-api/exceptions.rst:1186 msgid ":exc:`ModuleNotFoundError`" msgstr ":exc:`ModuleNotFoundError`" -#: ../../c-api/exceptions.rst:1170 +#: ../../c-api/exceptions.rst:1188 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: ../../c-api/exceptions.rst:1172 +#: ../../c-api/exceptions.rst:1190 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: ../../c-api/exceptions.rst:1174 +#: ../../c-api/exceptions.rst:1192 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: ../../c-api/exceptions.rst:1176 ../../c-api/exceptions.rst:1259 -#: ../../c-api/exceptions.rst:1262 ../../c-api/exceptions.rst:1265 +#: ../../c-api/exceptions.rst:1194 ../../c-api/exceptions.rst:1277 +#: ../../c-api/exceptions.rst:1280 ../../c-api/exceptions.rst:1283 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: ../../c-api/exceptions.rst:1178 +#: ../../c-api/exceptions.rst:1196 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: ../../c-api/exceptions.rst:1180 +#: ../../c-api/exceptions.rst:1198 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: ../../c-api/exceptions.rst:1182 +#: ../../c-api/exceptions.rst:1200 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: ../../c-api/exceptions.rst:1184 +#: ../../c-api/exceptions.rst:1202 msgid ":exc:`PythonFinalizationError`" msgstr ":exc:`PythonFinalizationError`" -#: ../../c-api/exceptions.rst:1186 +#: ../../c-api/exceptions.rst:1204 msgid ":exc:`RecursionError`" msgstr ":exc:`RecursionError`" -#: ../../c-api/exceptions.rst:1188 +#: ../../c-api/exceptions.rst:1206 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: ../../c-api/exceptions.rst:1190 +#: ../../c-api/exceptions.rst:1208 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: ../../c-api/exceptions.rst:1192 +#: ../../c-api/exceptions.rst:1210 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: ../../c-api/exceptions.rst:1194 +#: ../../c-api/exceptions.rst:1212 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: ../../c-api/exceptions.rst:1196 +#: ../../c-api/exceptions.rst:1214 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: ../../c-api/exceptions.rst:1198 +#: ../../c-api/exceptions.rst:1216 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: ../../c-api/exceptions.rst:1200 +#: ../../c-api/exceptions.rst:1218 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: ../../c-api/exceptions.rst:1202 +#: ../../c-api/exceptions.rst:1220 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: ../../c-api/exceptions.rst:1204 +#: ../../c-api/exceptions.rst:1222 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: ../../c-api/exceptions.rst:1206 +#: ../../c-api/exceptions.rst:1224 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: ../../c-api/exceptions.rst:1208 +#: ../../c-api/exceptions.rst:1226 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: ../../c-api/exceptions.rst:1210 +#: ../../c-api/exceptions.rst:1228 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: ../../c-api/exceptions.rst:1212 +#: ../../c-api/exceptions.rst:1230 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: ../../c-api/exceptions.rst:1214 +#: ../../c-api/exceptions.rst:1232 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: ../../c-api/exceptions.rst:1216 +#: ../../c-api/exceptions.rst:1234 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: ../../c-api/exceptions.rst:1218 +#: ../../c-api/exceptions.rst:1236 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: ../../c-api/exceptions.rst:1220 +#: ../../c-api/exceptions.rst:1238 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: ../../c-api/exceptions.rst:1222 +#: ../../c-api/exceptions.rst:1240 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1688,152 +1708,152 @@ msgstr "" "data:`PyExc_PermissionError` 、 :c:data:`PyExc_ProcessLookupError` 、 :c:" "data:`PyExc_TimeoutError` は :pep:`3151` により導入されました。" -#: ../../c-api/exceptions.rst:1232 +#: ../../c-api/exceptions.rst:1250 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr "" ":c:data:`PyExc_StopAsyncIteration` および :c:data:`PyExc_RecursionError` 。" -#: ../../c-api/exceptions.rst:1235 +#: ../../c-api/exceptions.rst:1253 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: ../../c-api/exceptions.rst:1238 +#: ../../c-api/exceptions.rst:1256 msgid ":c:data:`PyExc_BaseExceptionGroup`." msgstr "" -#: ../../c-api/exceptions.rst:1243 +#: ../../c-api/exceptions.rst:1261 msgid "OSError aliases" msgstr "" -#: ../../c-api/exceptions.rst:1245 +#: ../../c-api/exceptions.rst:1263 msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." msgstr "" -#: ../../c-api/exceptions.rst:1247 +#: ../../c-api/exceptions.rst:1265 msgid "These aliases used to be separate exception types." msgstr "これらのエイリアスは例外の種類を分けるために使われます。" -#: ../../c-api/exceptions.rst:1257 +#: ../../c-api/exceptions.rst:1275 msgid "Notes" msgstr "注釈" -#: ../../c-api/exceptions.rst:1266 +#: ../../c-api/exceptions.rst:1284 msgid "[win]_" msgstr "" -#: ../../c-api/exceptions.rst:1268 +#: ../../c-api/exceptions.rst:1286 msgid "Notes:" msgstr "注釈:" -#: ../../c-api/exceptions.rst:1271 +#: ../../c-api/exceptions.rst:1289 msgid "" ":c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that " "uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: ../../c-api/exceptions.rst:1278 +#: ../../c-api/exceptions.rst:1296 msgid "Warning types" msgstr "" -#: ../../c-api/exceptions.rst:1288 +#: ../../c-api/exceptions.rst:1306 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: ../../c-api/exceptions.rst:1290 +#: ../../c-api/exceptions.rst:1308 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: ../../c-api/exceptions.rst:1292 +#: ../../c-api/exceptions.rst:1310 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: ../../c-api/exceptions.rst:1294 +#: ../../c-api/exceptions.rst:1312 msgid ":exc:`EncodingWarning`" msgstr "" -#: ../../c-api/exceptions.rst:1296 +#: ../../c-api/exceptions.rst:1314 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: ../../c-api/exceptions.rst:1298 +#: ../../c-api/exceptions.rst:1316 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: ../../c-api/exceptions.rst:1300 +#: ../../c-api/exceptions.rst:1318 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: ../../c-api/exceptions.rst:1302 +#: ../../c-api/exceptions.rst:1320 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: ../../c-api/exceptions.rst:1304 +#: ../../c-api/exceptions.rst:1322 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: ../../c-api/exceptions.rst:1306 +#: ../../c-api/exceptions.rst:1324 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: ../../c-api/exceptions.rst:1308 +#: ../../c-api/exceptions.rst:1326 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: ../../c-api/exceptions.rst:1310 +#: ../../c-api/exceptions.rst:1328 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: ../../c-api/exceptions.rst:1312 +#: ../../c-api/exceptions.rst:1330 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: ../../c-api/exceptions.rst:1315 +#: ../../c-api/exceptions.rst:1333 msgid ":c:data:`PyExc_EncodingWarning`." msgstr "" -#: ../../c-api/exceptions.rst:1320 +#: ../../c-api/exceptions.rst:1338 msgid "Tracebacks" msgstr "" -#: ../../c-api/exceptions.rst:1324 +#: ../../c-api/exceptions.rst:1342 msgid "" "Type object for traceback objects. This is available as :class:`types." "TracebackType` in the Python layer." msgstr "" -#: ../../c-api/exceptions.rst:1330 +#: ../../c-api/exceptions.rst:1348 msgid "" "Return true if *op* is a traceback object, false otherwise. This function " "does not account for subtypes." msgstr "" -#: ../../c-api/exceptions.rst:1336 +#: ../../c-api/exceptions.rst:1354 msgid "" "Replace the :attr:`~BaseException.__traceback__` attribute on the current " "exception with a new traceback prepending *f* to the existing chain." msgstr "" -#: ../../c-api/exceptions.rst:1339 +#: ../../c-api/exceptions.rst:1357 msgid "Calling this function without an exception set is undefined behavior." msgstr "" -#: ../../c-api/exceptions.rst:1341 ../../c-api/exceptions.rst:1349 +#: ../../c-api/exceptions.rst:1359 ../../c-api/exceptions.rst:1367 msgid "" "This function returns ``0`` on success, and returns ``-1`` with an exception " "set on failure." msgstr "" -#: ../../c-api/exceptions.rst:1347 +#: ../../c-api/exceptions.rst:1365 msgid "Write the traceback *tb* into the file *f*." msgstr "" -#: ../../c-api/exceptions.rst:1354 +#: ../../c-api/exceptions.rst:1372 msgid "" "Write a trace of the Python stack in *tstate* into the file *fd*. The " "format looks like::" msgstr "" -#: ../../c-api/exceptions.rst:1357 +#: ../../c-api/exceptions.rst:1375 msgid "" "Traceback (most recent call first):\n" " File \"xxx\", line xxx in \n" @@ -1842,7 +1862,7 @@ msgid "" " File \"xxx\", line xxx in " msgstr "" -#: ../../c-api/exceptions.rst:1363 +#: ../../c-api/exceptions.rst:1381 msgid "" "This function is meant to debug situations such as segfaults, fatal errors, " "and similar. The file and function names it outputs are encoded to ASCII " @@ -1850,12 +1870,12 @@ msgid "" "first 100 frames; further frames are truncated with the line ``...``." msgstr "" -#: ../../c-api/exceptions.rst:1368 ../../c-api/exceptions.rst:1393 +#: ../../c-api/exceptions.rst:1386 ../../c-api/exceptions.rst:1411 msgid "" "This function will return ``NULL`` on success, or an error message on error." msgstr "" -#: ../../c-api/exceptions.rst:1370 ../../c-api/exceptions.rst:1401 +#: ../../c-api/exceptions.rst:1388 ../../c-api/exceptions.rst:1419 msgid "" "This function is intended for use in crash scenarios such as signal handlers " "for SIGSEGV, where the interpreter may be in an inconsistent state. Given " @@ -1863,24 +1883,24 @@ msgid "" "the function might produce incomplete output or it may even crash itself." msgstr "" -#: ../../c-api/exceptions.rst:1375 +#: ../../c-api/exceptions.rst:1393 msgid "" "The caller does not need to hold an :term:`attached thread state`, nor does " "*tstate* need to be attached." msgstr "" -#: ../../c-api/exceptions.rst:1382 +#: ../../c-api/exceptions.rst:1400 msgid "Write the traces of all Python threads in *interp* into the file *fd*." msgstr "" -#: ../../c-api/exceptions.rst:1384 +#: ../../c-api/exceptions.rst:1402 msgid "" "If *interp* is ``NULL`` then this function will try to identify the current " "interpreter using thread-specific storage. If it cannot, it will return an " "error." msgstr "" -#: ../../c-api/exceptions.rst:1388 +#: ../../c-api/exceptions.rst:1406 msgid "" "If *current_tstate* is not ``NULL`` then it will be used to identify what " "the current thread is in the written output. If it is ``NULL`` then this " @@ -1889,7 +1909,7 @@ msgid "" "state." msgstr "" -#: ../../c-api/exceptions.rst:1395 +#: ../../c-api/exceptions.rst:1413 msgid "" "This function is meant to debug situations such as segfaults, fatal errors, " "and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each thread. It " @@ -1898,38 +1918,38 @@ msgid "" "function will use a default value of 100 for the argument." msgstr "" -#: ../../c-api/exceptions.rst:1406 +#: ../../c-api/exceptions.rst:1424 msgid "" "The caller does not need to hold an :term:`attached thread state`, nor does " "*current_tstate* need to be attached." msgstr "" -#: ../../c-api/exceptions.rst:1410 +#: ../../c-api/exceptions.rst:1428 msgid "" "On the :term:`free-threaded build`, this function is not thread-safe. If " "another thread deletes its :term:`thread state` while this function is being " "called, the process will likely crash." msgstr "" -#: ../../c-api/exceptions.rst:183 +#: ../../c-api/exceptions.rst:198 msgid "strerror (C function)" msgstr "" -#: ../../c-api/exceptions.rst:671 ../../c-api/exceptions.rst:725 -#: ../../c-api/exceptions.rst:740 +#: ../../c-api/exceptions.rst:688 ../../c-api/exceptions.rst:742 +#: ../../c-api/exceptions.rst:757 msgid "module" msgstr "module" -#: ../../c-api/exceptions.rst:671 ../../c-api/exceptions.rst:725 -#: ../../c-api/exceptions.rst:740 +#: ../../c-api/exceptions.rst:688 ../../c-api/exceptions.rst:742 +#: ../../c-api/exceptions.rst:757 msgid "signal" msgstr "signal" -#: ../../c-api/exceptions.rst:671 ../../c-api/exceptions.rst:725 +#: ../../c-api/exceptions.rst:688 ../../c-api/exceptions.rst:742 msgid "SIGINT (C macro)" msgstr "" -#: ../../c-api/exceptions.rst:671 ../../c-api/exceptions.rst:725 -#: ../../c-api/exceptions.rst:740 +#: ../../c-api/exceptions.rst:688 ../../c-api/exceptions.rst:742 +#: ../../c-api/exceptions.rst:757 msgid "KeyboardInterrupt (built-in exception)" msgstr "KeyboardInterrupt (組み込み例外)" diff --git a/c-api/extension-modules.po b/c-api/extension-modules.po index 5ee9ca832..7ef642ff8 100644 --- a/c-api/extension-modules.po +++ b/c-api/extension-modules.po @@ -4,17 +4,17 @@ # FIRST AUTHOR , YEAR. # # Translators: -# python-doc bot, 2025 # qqfunc, 2025 +# python-doc bot, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-25 14:37+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" -"Last-Translator: qqfunc, 2025\n" +"Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "MIME-Version: 1.0\n" @@ -133,15 +133,15 @@ msgstr "" msgid "specifies the :c:expr:`PySlot*` return type," msgstr "" -#: ../../c-api/extension-modules.rst:79 ../../c-api/extension-modules.rst:224 +#: ../../c-api/extension-modules.rst:79 ../../c-api/extension-modules.rst:248 msgid "adds any special linkage declarations required by the platform, and" msgstr "" -#: ../../c-api/extension-modules.rst:80 ../../c-api/extension-modules.rst:225 +#: ../../c-api/extension-modules.rst:80 ../../c-api/extension-modules.rst:249 msgid "for C++, declares the function as ``extern \"C\"``." msgstr "" -#: ../../c-api/extension-modules.rst:82 ../../c-api/extension-modules.rst:255 +#: ../../c-api/extension-modules.rst:82 ../../c-api/extension-modules.rst:279 msgid "For example, a module called ``spam`` would be defined like this::" msgstr "" @@ -170,16 +170,55 @@ msgid "" "module's C source." msgstr "" -#: ../../c-api/extension-modules.rst:103 +#: ../../c-api/extension-modules.rst:105 msgid "" -"The hook should be kept short -- ideally, one line as above. If you do need " -"to use Python C API in this function, it is recommended to call " -"``PyABIInfo_Check(&abi_info, \"modulename\")`` first to raise an exception, " -"rather than crash, in common cases of ABI mismatch." +"The hook should be kept short. If it does more than ``return`` a static " +"array, several caveats apply:" +msgstr "" + +#: ../../c-api/extension-modules.rst:108 +msgid "" +"If you need to use any Python C API, it is recommended to call :c:func:" +"`PyABIInfo_Check` first to raise an exception, rather than crash, in common " +"cases of ABI mismatch." msgstr "" #: ../../c-api/extension-modules.rst:111 msgid "" +"Code in the export hook must never rely on the :term:`GIL`: :term:`free-" +"threaded builds ` of Python can only check the :c:macro:" +"`Py_mod_gil` slot (or the lack of it) after the hook returns," +msgstr "" + +#: ../../c-api/extension-modules.rst:114 +msgid "" +"Similarly, the hook may be called in any subinterpreter, since the :c:macro:" +"`Py_mod_multiple_interpreters` slot (or lack of it) is only checked after " +"the hook returns." +msgstr "" + +#: ../../c-api/extension-modules.rst:118 +msgid "For example::" +msgstr "例えば::" + +#: ../../c-api/extension-modules.rst:120 +msgid "" +"PyMODEXPORT_FUNC\n" +"PyModExport_modulename(void)\n" +"{\n" +" if (PyABIInfo_Check(&abi_info, \"modulename\") < 0) {\n" +" /* ABI mismatch. It's not safe to examine the raised exception. */\n" +" return NULL;\n" +" }\n" +"\n" +" /* use Python API (as little as possible); don't rely on GIL */\n" +"\n" +" return modulename_slots;\n" +"}" +msgstr "" + +#: ../../c-api/extension-modules.rst:135 +msgid "" "It is possible to export multiple modules from a single shared library by " "defining multiple export hooks. However, importing them requires a custom " "importer or suitably named copies/links of the extension file, because " @@ -189,21 +228,21 @@ msgid "" "details." msgstr "" -#: ../../c-api/extension-modules.rst:123 +#: ../../c-api/extension-modules.rst:147 msgid "Multi-phase initialization" msgstr "多段階初期化" -#: ../../c-api/extension-modules.rst:125 +#: ../../c-api/extension-modules.rst:149 msgid "The process of creating an extension module follows several phases:" msgstr "" -#: ../../c-api/extension-modules.rst:127 +#: ../../c-api/extension-modules.rst:151 msgid "" "Python finds and calls the export hook to get information on how to create " "the module." msgstr "" -#: ../../c-api/extension-modules.rst:129 +#: ../../c-api/extension-modules.rst:153 msgid "" "Before any substantial code is executed, Python can determine which " "capabilities the module supports, and it can adjust the environment or " @@ -212,21 +251,21 @@ msgid "" "this step." msgstr "" -#: ../../c-api/extension-modules.rst:134 +#: ../../c-api/extension-modules.rst:158 msgid "" "By default, Python itself then creates the module object -- that is, it does " "the equivalent of calling :py:meth:`~object.__new__` when creating an " "object. This step can be overridden using the :c:data:`Py_mod_create` slot." msgstr "" -#: ../../c-api/extension-modules.rst:137 +#: ../../c-api/extension-modules.rst:161 msgid "" "Python sets initial module attributes like :attr:`~module.__package__` and :" "attr:`~module.__loader__`, and inserts the module object into :py:attr:`sys." "modules`." msgstr "" -#: ../../c-api/extension-modules.rst:140 +#: ../../c-api/extension-modules.rst:164 msgid "" "Afterwards, the module object is initialized in an extension-specific way -- " "the equivalent of :py:meth:`~object.__init__` when creating an object, or of " @@ -234,7 +273,7 @@ msgid "" "specified using the :c:data:`Py_mod_exec` slot." msgstr "" -#: ../../c-api/extension-modules.rst:145 +#: ../../c-api/extension-modules.rst:169 msgid "" "This is called *multi-phase initialization* to distinguish it from the " "legacy (but still supported) :ref:`single-phase initialization ` or after Python runtime reinitialization (:c:func:" @@ -268,7 +307,7 @@ msgid "" "behavior." msgstr "" -#: ../../c-api/extension-modules.rst:171 +#: ../../c-api/extension-modules.rst:195 msgid "" "To avoid such issues, each instance of an extension module should be " "*isolated*: changes to one instance should not implicitly affect the others, " @@ -277,13 +316,13 @@ msgid "" "extensions-howto` for more details and a practical guide." msgstr "" -#: ../../c-api/extension-modules.rst:177 +#: ../../c-api/extension-modules.rst:201 msgid "" "A simpler way to avoid these issues is :ref:`raising an error on repeated " "initialization `." msgstr "" -#: ../../c-api/extension-modules.rst:180 +#: ../../c-api/extension-modules.rst:204 msgid "" "All modules are expected to support :ref:`sub-interpreters `, or otherwise explicitly signal a lack of support. This is usually " @@ -292,23 +331,23 @@ msgid "" "`Py_mod_multiple_interpreters` slot." msgstr "" -#: ../../c-api/extension-modules.rst:192 +#: ../../c-api/extension-modules.rst:216 msgid "``PyInit`` function" msgstr "" -#: ../../c-api/extension-modules.rst:196 +#: ../../c-api/extension-modules.rst:220 msgid "" "This functionality will not get new features, but there are no plans to " "remove it." msgstr "" -#: ../../c-api/extension-modules.rst:199 +#: ../../c-api/extension-modules.rst:223 msgid "" "Instead of :c:func:`PyModExport_modulename`, an extension module can define " "an older-style :dfn:`initialization function` with the signature:" msgstr "" -#: ../../c-api/extension-modules.rst:204 +#: ../../c-api/extension-modules.rst:228 msgid "" "Its name should be :samp:`PyInit_{}`, with ```` replaced by the " "name of the module. For non-ASCII module names, use :samp:`PyInitU_{}` " @@ -316,27 +355,27 @@ msgid "" "hook ` (that is, using Punycode with underscores)." msgstr "" -#: ../../c-api/extension-modules.rst:211 +#: ../../c-api/extension-modules.rst:235 msgid "" "If a module exports both :samp:`PyInit_{}` and :samp:" "`PyModExport_{}`, the :samp:`PyInit_{}` function is ignored." msgstr "" -#: ../../c-api/extension-modules.rst:215 +#: ../../c-api/extension-modules.rst:239 msgid "" "Like with :c:macro:`PyMODEXPORT_FUNC`, it is recommended to define the " "initialization function using a helper macro:" msgstr "" -#: ../../c-api/extension-modules.rst:220 +#: ../../c-api/extension-modules.rst:244 msgid "Declare an extension module initialization function. This macro:" msgstr "" -#: ../../c-api/extension-modules.rst:223 +#: ../../c-api/extension-modules.rst:247 msgid "specifies the :c:expr:`PyObject*` return type," msgstr "" -#: ../../c-api/extension-modules.rst:228 +#: ../../c-api/extension-modules.rst:252 msgid "" "Normally, the initialization function (``PyInit_modulename``) returns a :c:" "type:`PyModuleDef` instance with non-``NULL`` :c:member:`~PyModuleDef." @@ -344,37 +383,37 @@ msgid "" "phase-initialization>`." msgstr "" -#: ../../c-api/extension-modules.rst:233 +#: ../../c-api/extension-modules.rst:257 msgid "" "Before it is returned, the ``PyModuleDef`` instance must be initialized " "using the following function:" msgstr "" -#: ../../c-api/extension-modules.rst:238 +#: ../../c-api/extension-modules.rst:262 msgid "" "Ensure a module definition is a properly initialized Python object that " "correctly reports its type and a reference count." msgstr "" -#: ../../c-api/extension-modules.rst:241 +#: ../../c-api/extension-modules.rst:265 msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." msgstr "" -#: ../../c-api/extension-modules.rst:243 +#: ../../c-api/extension-modules.rst:267 msgid "" "Calling this function is required before returning a :c:type:`PyModuleDef` " "from a module initialization function. It should not be used in other " "contexts." msgstr "" -#: ../../c-api/extension-modules.rst:247 +#: ../../c-api/extension-modules.rst:271 msgid "" "Note that Python assumes that ``PyModuleDef`` structures are statically " "allocated. This function may return either a new reference or a borrowed " "one; this reference must not be released." msgstr "" -#: ../../c-api/extension-modules.rst:257 +#: ../../c-api/extension-modules.rst:281 msgid "" "static struct PyModuleDef spam_module = {\n" " .m_base = PyModuleDef_HEAD_INIT,\n" @@ -389,22 +428,22 @@ msgid "" "}" msgstr "" -#: ../../c-api/extension-modules.rst:273 +#: ../../c-api/extension-modules.rst:297 msgid "Legacy single-phase initialization" msgstr "従来の一段階初期化" -#: ../../c-api/extension-modules.rst:277 +#: ../../c-api/extension-modules.rst:301 msgid "" "Single-phase initialization is a legacy mechanism to initialize extension " "modules, with known drawbacks and design flaws. Extension module authors are " "encouraged to use multi-phase initialization instead." msgstr "" -#: ../../c-api/extension-modules.rst:281 +#: ../../c-api/extension-modules.rst:305 msgid "However, there are no plans to remove support for it." msgstr "" -#: ../../c-api/extension-modules.rst:283 +#: ../../c-api/extension-modules.rst:307 msgid "" "In single-phase initialization, the old-style :ref:`initialization function " "` (``PyInit_modulename``) should create, populate and " @@ -412,23 +451,23 @@ msgid "" "`PyModule_Create` and functions like :c:func:`PyModule_AddObjectRef`." msgstr "" -#: ../../c-api/extension-modules.rst:289 +#: ../../c-api/extension-modules.rst:313 msgid "" "Single-phase initialization differs from the :ref:`default ` in the following ways:" msgstr "" -#: ../../c-api/extension-modules.rst:292 +#: ../../c-api/extension-modules.rst:316 msgid "Single-phase modules are, or rather *contain*, “singletons”." msgstr "" -#: ../../c-api/extension-modules.rst:294 +#: ../../c-api/extension-modules.rst:318 msgid "" "When the module is first initialized, Python saves the contents of the " "module's ``__dict__`` (that is, typically, the module's functions and types)." msgstr "" -#: ../../c-api/extension-modules.rst:298 +#: ../../c-api/extension-modules.rst:322 msgid "" "For subsequent imports, Python does not call the initialization function " "again. Instead, it creates a new module object with a new ``__dict__``, and " @@ -437,7 +476,7 @@ msgid "" "an exception class ``error``:" msgstr "" -#: ../../c-api/extension-modules.rst:306 +#: ../../c-api/extension-modules.rst:330 msgid "" ">>> import sys\n" ">>> import _testsinglephase as one\n" @@ -453,12 +492,12 @@ msgid "" "True" msgstr "" -#: ../../c-api/extension-modules.rst:321 +#: ../../c-api/extension-modules.rst:345 msgid "" "The exact behavior should be considered a CPython implementation detail." msgstr "" -#: ../../c-api/extension-modules.rst:323 +#: ../../c-api/extension-modules.rst:347 msgid "" "To work around the fact that ``PyInit_modulename`` does not take a *spec* " "argument, some state of the import machinery is saved and applied to the " @@ -467,27 +506,27 @@ msgid "" "parent package name to the name of the module." msgstr "" -#: ../../c-api/extension-modules.rst:329 +#: ../../c-api/extension-modules.rst:353 msgid "" "A single-phase ``PyInit_modulename`` function should create “its” module " "object as soon as possible, before any other module objects can be created." msgstr "" -#: ../../c-api/extension-modules.rst:332 +#: ../../c-api/extension-modules.rst:356 msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported." msgstr "" -#: ../../c-api/extension-modules.rst:334 +#: ../../c-api/extension-modules.rst:358 msgid "" "Single-phase modules support module lookup functions like :c:func:" "`PyState_FindModule`." msgstr "" -#: ../../c-api/extension-modules.rst:337 +#: ../../c-api/extension-modules.rst:361 msgid "The module's :c:member:`PyModuleDef.m_slots` must be NULL." msgstr "" -#: ../../c-api/extension-modules.rst:339 +#: ../../c-api/extension-modules.rst:363 msgid "" "``_testsinglephase`` is an internal module used in CPython's self-test " "suite; your installation may or may not include it." diff --git a/c-api/file.po b/c-api/file.po index 4945557fa..11f648ab0 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/float.po b/c-api/float.po index fe9e65247..30962ec96 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -298,15 +298,11 @@ msgstr "" msgid "Pack a C double as the IEEE 754 binary64 double precision format." msgstr "" -#: ../../c-api/float.rst:237 -msgid "This function always succeeds in CPython." -msgstr "" - -#: ../../c-api/float.rst:241 +#: ../../c-api/float.rst:238 msgid "Unpack functions" msgstr "" -#: ../../c-api/float.rst:243 +#: ../../c-api/float.rst:240 msgid "" "The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:" "expr:`int` argument, non-zero if the bytes string is in little-endian format " @@ -316,26 +312,22 @@ msgid "" "processor, or ``1`` on little endian processor." msgstr "" -#: ../../c-api/float.rst:250 +#: ../../c-api/float.rst:247 msgid "" "Return value: The unpacked double. On error, this is ``-1.0`` and :c:func:" "`PyErr_Occurred` is true (and an exception is set, most likely :exc:" "`OverflowError`)." msgstr "" -#: ../../c-api/float.rst:255 -msgid "These functions always succeed in CPython." -msgstr "" - -#: ../../c-api/float.rst:259 +#: ../../c-api/float.rst:253 msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." msgstr "" -#: ../../c-api/float.rst:263 +#: ../../c-api/float.rst:257 msgid "Unpack the IEEE 754 binary32 single precision format as a C double." msgstr "" -#: ../../c-api/float.rst:267 +#: ../../c-api/float.rst:261 msgid "Unpack the IEEE 754 binary64 double precision format as a C double." msgstr "" diff --git a/c-api/frame.po b/c-api/frame.po index ea000d0f3..26cde6c96 100644 --- a/c-api/frame.po +++ b/c-api/frame.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-29 17:28+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -271,3 +271,51 @@ msgstr "" msgid "" "Return the currently executing line number, or -1 if there is no line number." msgstr "" + +#: ../../c-api/frame.rst:250 +msgid "" +"An array of executable kinds (executor types) for frames, used for internal " +"debugging and tracing." +msgstr "" + +#: ../../c-api/frame.rst:253 +msgid "" +"Tools like debuggers and profilers can use this to identify the type of " +"execution context associated with a frame (such as to filter out internal " +"frames). The entries are indexed by the following constants:" +msgstr "" + +#: ../../c-api/frame.rst:261 +msgid "Constant" +msgstr "定数" + +#: ../../c-api/frame.rst:262 +msgid "Description" +msgstr "説明" + +#: ../../c-api/frame.rst:264 +msgid "" +"The frame is internal (For example: inlined) and should be skipped by tools." +msgstr "" + +#: ../../c-api/frame.rst:266 +msgid "The frame corresponds to a standard Python function." +msgstr "" + +#: ../../c-api/frame.rst:268 +msgid "The frame corresponds to a function defined in native code." +msgstr "" + +#: ../../c-api/frame.rst:270 +msgid "The frame corresponds to a method on a class instance." +msgstr "" + +#: ../../c-api/frame.rst:272 +msgid "" +"Note that reading the executable kind from a frame is currently only " +"possible with undocumented internal APIs." +msgstr "" + +#: ../../c-api/frame.rst:280 +msgid "The number of entries in :c:data:`PyUnstable_ExecutableKinds`." +msgstr "" diff --git a/c-api/function.po b/c-api/function.po index 09e77e182..2ef50ffd2 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index af07c7a9f..713ae8160 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/gen.po b/c-api/gen.po index 87e764914..4ccb613cd 100644 --- a/c-api/gen.po +++ b/c-api/gen.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -66,26 +66,17 @@ msgstr "" #: ../../c-api/gen.rst:37 msgid "" "Create and return a new generator object based on the *frame* object. A " -"reference to *frame* is stolen by this function. The argument must not be " -"``NULL``." +"reference to *frame* is \":term:`stolen `\" by this function (even on " +"error). The argument must not be ``NULL``." msgstr "" -"*frame* オブジェクトに基づいて新たなジェネレータオブジェクトを生成して返しま" -"す。\n" -"この関数は *frame* への参照を盗みます。\n" -"引数が ``NULL`` であってはなりません。" #: ../../c-api/gen.rst:43 msgid "" "Create and return a new generator object based on the *frame* object, with " "``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " -"to *frame* is stolen by this function. The *frame* argument must not be " -"``NULL``." +"to *frame* is \":term:`stolen `\" by this function (even on error). " +"The *frame* argument must not be ``NULL``." msgstr "" -"*frame* オブジェクトから新たなジェネレータオブジェクトを生成し、 " -"``__name__`` と ``__qualname__`` を *name* と *qualname* に設定して返しま" -"す。\n" -"この関数は *frame* への参照を盗みます。\n" -"*frame* 引数は ``NULL`` であってはなりません。" #: ../../c-api/gen.rst:51 msgid "" @@ -110,31 +101,31 @@ msgstr "" #: ../../c-api/gen.rst:70 msgid "" "Create a new asynchronous generator wrapping *frame*, with ``__name__`` and " -"``__qualname__`` set to *name* and *qualname*. *frame* is stolen by this " -"function and must not be ``NULL``." +"``__qualname__`` set to *name* and *qualname*. *frame* is \":term:`stolen " +"`\" by this function (even on error) and must not be ``NULL``." msgstr "" -#: ../../c-api/gen.rst:74 +#: ../../c-api/gen.rst:75 msgid "" "On success, this function returns a :term:`strong reference` to the new " "asynchronous generator. On failure, this function returns ``NULL`` with an " "exception set." msgstr "" -#: ../../c-api/gen.rst:82 +#: ../../c-api/gen.rst:83 msgid "" "Return true if *op* is an asynchronous generator object, false otherwise. " "This function always succeeds." msgstr "" -#: ../../c-api/gen.rst:89 +#: ../../c-api/gen.rst:90 msgid "Deprecated API" msgstr "" -#: ../../c-api/gen.rst:93 +#: ../../c-api/gen.rst:94 msgid "This is an API that was included in Python's C API by mistake." msgstr "" -#: ../../c-api/gen.rst:96 +#: ../../c-api/gen.rst:97 msgid "It is solely here for completeness; do not use this API." msgstr "" diff --git a/c-api/hash.po b/c-api/hash.po index c925065f3..c520d33a7 100644 --- a/c-api/hash.po +++ b/c-api/hash.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: qqfunc, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/import.po b/c-api/import.po index 8923f3bda..462262e56 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-09 16:27+0000\n" +"POT-Creation-Date: 2026-08-27 23:26+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -213,7 +213,7 @@ msgid "" msgstr "" #: ../../c-api/import.rst:148 -msgid "``__cached__`` is no longer set." +msgid "The ``__cached__`` attribute is no longer set." msgstr "" #: ../../c-api/import.rst:154 @@ -240,7 +240,7 @@ msgid "" msgstr "" #: ../../c-api/import.rst:172 -msgid "``__cached__`` no longer set." +msgid "The ``__cached__`` attribute no longer set." msgstr "" #: ../../c-api/import.rst:178 @@ -420,7 +420,14 @@ msgstr "" msgid "Initialization function for a module built into the interpreter." msgstr "" -#: ../../c-api/import.rst:310 +#: ../../c-api/import.rst:307 +msgid "" +"Note that the inittab uses \"``PyInit``\" :ref:`initialization functions " +"`; there is currently no way to include " +"\"``PyModExport_``\" :ref:`export hooks `." +msgstr "" + +#: ../../c-api/import.rst:315 msgid "" "Add a collection of modules to the table of built-in modules. The *newtab* " "array must end with a sentinel entry which contains ``NULL`` for the :c:" @@ -431,7 +438,7 @@ msgid "" "before :c:func:`Py_Initialize`." msgstr "" -#: ../../c-api/import.rst:317 +#: ../../c-api/import.rst:322 msgid "" "If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " "or :c:func:`PyImport_ExtendInittab` must be called before each Python " @@ -441,22 +448,22 @@ msgstr "" "func:`PyImport_ExtendInittab` は、それぞれの初期化の前に呼び出される必要があ" "ります。" -#: ../../c-api/import.rst:324 +#: ../../c-api/import.rst:329 msgid "" "The table of built-in modules used by Python initialization. Do not use this " "directly; use :c:func:`PyImport_AppendInittab` and :c:func:" "`PyImport_ExtendInittab` instead." msgstr "" -#: ../../c-api/import.rst:331 +#: ../../c-api/import.rst:336 msgid "Import the module *mod_name* and get its attribute *attr_name*." msgstr "" -#: ../../c-api/import.rst:333 +#: ../../c-api/import.rst:338 msgid "Names must be Python :class:`str` objects." msgstr "" -#: ../../c-api/import.rst:335 +#: ../../c-api/import.rst:340 msgid "" "Helper function combining :c:func:`PyImport_Import` and :c:func:" "`PyObject_GetAttr`. For example, it can raise :exc:`ImportError` if the " @@ -464,27 +471,27 @@ msgid "" "exist." msgstr "" -#: ../../c-api/import.rst:344 ../../c-api/import.rst:364 +#: ../../c-api/import.rst:349 ../../c-api/import.rst:369 msgid "" "Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded " "strings instead of Python :class:`str` objects." msgstr "" -#: ../../c-api/import.rst:351 +#: ../../c-api/import.rst:356 msgid "Gets the current lazy imports mode." msgstr "" -#: ../../c-api/import.rst:357 +#: ../../c-api/import.rst:362 msgid "" "Return a :term:`strong reference` to the current lazy imports filter, or " "``NULL`` if none exists. This function always succeeds." msgstr "" -#: ../../c-api/import.rst:367 +#: ../../c-api/import.rst:372 msgid "This function always returns ``0``." msgstr "" -#: ../../c-api/import.rst:373 +#: ../../c-api/import.rst:378 msgid "" "Sets the current lazy imports filter. The *filter* should be a callable that " "will receive ``(importing_module_name, imported_module_name, [fromlist])`` " @@ -494,40 +501,40 @@ msgid "" "lazy and ``False`` otherwise." msgstr "" -#: ../../c-api/import.rst:380 +#: ../../c-api/import.rst:385 msgid "Return ``0`` on success and ``-1`` with an exception set otherwise." msgstr "" -#: ../../c-api/import.rst:386 +#: ../../c-api/import.rst:391 msgid "Enumeration of possible lazy import modes." msgstr "" -#: ../../c-api/import.rst:390 +#: ../../c-api/import.rst:395 msgid "Respect the ``lazy`` keyword in source code. This is the default mode." msgstr "" -#: ../../c-api/import.rst:394 +#: ../../c-api/import.rst:399 msgid "Make all imports lazy by default." msgstr "" -#: ../../c-api/import.rst:400 +#: ../../c-api/import.rst:405 msgid "" "This function is a building block that enables embedders to implement the :" "py:meth:`~importlib.abc.Loader.create_module` step of custom static " "extension importers (e.g. of statically-linked extensions)." msgstr "" -#: ../../c-api/import.rst:404 +#: ../../c-api/import.rst:409 msgid "*spec* must be a :class:`~importlib.machinery.ModuleSpec` object." msgstr "" -#: ../../c-api/import.rst:406 +#: ../../c-api/import.rst:411 msgid "" "*initfunc* must be an :ref:`initialization function `, the same as for :c:func:`PyImport_AppendInittab`." msgstr "" -#: ../../c-api/import.rst:409 +#: ../../c-api/import.rst:414 msgid "" "On success, create and return a module object. This module will not be " "initialized; call :c:func:`PyModule_Exec` to initialize it. (Custom " @@ -535,7 +542,7 @@ msgid "" "exec_module` method.)" msgstr "" -#: ../../c-api/import.rst:415 +#: ../../c-api/import.rst:420 msgid "On error, return NULL with an exception set." msgstr "" diff --git a/c-api/index.po b/c-api/index.po index 0a78ec649..73ef314d4 100644 --- a/c-api/index.po +++ b/c-api/index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/init.po b/c-api/init.po index aa250f92b..50cb251da 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/c-api/init_config.po b/c-api/init_config.po index b007d112c..8bf6193e6 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-17 16:52+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Cheesecake, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1573,7 +1573,7 @@ msgstr "" #: ../../c-api/init_config.rst:1607 ../../c-api/init_config.rst:1667 #: ../../c-api/init_config.rst:1719 ../../c-api/init_config.rst:1781 #: ../../c-api/init_config.rst:1835 ../../c-api/init_config.rst:1864 -#: ../../c-api/init_config.rst:1978 ../../c-api/init_config.rst:2025 +#: ../../c-api/init_config.rst:1978 ../../c-api/init_config.rst:2024 msgid "Default: ``0``." msgstr "" @@ -1607,7 +1607,7 @@ msgstr "" #: ../../c-api/init_config.rst:982 ../../c-api/init_config.rst:1270 #: ../../c-api/init_config.rst:1308 ../../c-api/init_config.rst:1852 -#: ../../c-api/init_config.rst:2010 +#: ../../c-api/init_config.rst:2009 msgid "Default: ``1``." msgstr "" @@ -1665,7 +1665,7 @@ msgid "" "`~PyPreConfig.parse_argv` of *preconfig* is non-zero." msgstr "" -#: ../../c-api/init_config.rst:1026 ../../c-api/init_config.rst:2048 +#: ../../c-api/init_config.rst:1026 ../../c-api/init_config.rst:2047 msgid "" "The caller is responsible to handle exceptions (error or exit) using :c:func:" "`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." @@ -1955,11 +1955,11 @@ msgid "See also :c:member:`PyConfig.exec_prefix`." msgstr "" #: ../../c-api/init_config.rst:1238 -msgid "Python base executable: :data:`sys._base_executable`." +msgid "Python base executable: ``sys._base_executable``." msgstr "" #: ../../c-api/init_config.rst:1240 -msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." +msgid "Set by the ``__PYVENV_LAUNCHER__`` environment variable." msgstr "" #: ../../c-api/init_config.rst:1242 @@ -2556,8 +2556,8 @@ msgid "" "`Py_GetArgcArgv` function." msgstr "" -#: ../../c-api/init_config.rst:1684 ../../c-api/init_config.rst:1997 -#: ../../c-api/init_config.rst:2016 +#: ../../c-api/init_config.rst:1684 ../../c-api/init_config.rst:1996 +#: ../../c-api/init_config.rst:2015 msgid "Default: empty list." msgstr "" @@ -2628,8 +2628,8 @@ msgstr "" #: ../../c-api/init_config.rst:1750 msgid "" -"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:" -"`__PYVENV_LAUNCHER__` environment variable if set." +"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use ``__PYVENV_LAUNCHER__`` " +"environment variable if set." msgstr "" #: ../../c-api/init_config.rst:1752 @@ -2935,55 +2935,55 @@ msgstr "" msgid "" "The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse " "order: the last :c:member:`PyConfig.warnoptions` item becomes the first item " -"of :data:`warnings.filters` which is checked first (highest priority)." +"of ``warnings.filters`` which is checked first (highest priority)." msgstr "" -#: ../../c-api/init_config.rst:1990 +#: ../../c-api/init_config.rst:1989 msgid "" "The :option:`-W` command line options adds its value to :c:member:`~PyConfig." "warnoptions`, it can be used multiple times." msgstr "" -#: ../../c-api/init_config.rst:1993 +#: ../../c-api/init_config.rst:1992 msgid "" "The :envvar:`PYTHONWARNINGS` environment variable can also be used to add " "warning options. Multiple options can be specified, separated by commas (``," "``)." msgstr "" -#: ../../c-api/init_config.rst:2001 +#: ../../c-api/init_config.rst:2000 msgid "" "If equal to ``0``, Python won't try to write ``.pyc`` files on the import of " "source modules." msgstr "" -#: ../../c-api/init_config.rst:2004 +#: ../../c-api/init_config.rst:2003 msgid "" "Set to ``0`` by the :option:`-B` command line option and the :envvar:" "`PYTHONDONTWRITEBYTECODE` environment variable." msgstr "" -#: ../../c-api/init_config.rst:2007 +#: ../../c-api/init_config.rst:2006 msgid "" ":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" "member:`~PyConfig.write_bytecode`." msgstr "" -#: ../../c-api/init_config.rst:2014 +#: ../../c-api/init_config.rst:2013 msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." msgstr "" -#: ../../c-api/init_config.rst:2020 +#: ../../c-api/init_config.rst:2019 msgid "If non-zero, write performance statistics at Python exit." msgstr "" -#: ../../c-api/init_config.rst:2022 +#: ../../c-api/init_config.rst:2021 msgid "" "Need a special build with the ``Py_STATS`` macro: see :option:`--enable-" "pystats`." msgstr "" -#: ../../c-api/init_config.rst:2027 +#: ../../c-api/init_config.rst:2026 msgid "" "If :c:member:`~PyConfig.parse_argv` is non-zero, :c:member:`~PyConfig.argv` " "arguments are parsed the same way the regular Python parses :ref:`command " @@ -2991,27 +2991,27 @@ msgid "" "c:member:`~PyConfig.argv`." msgstr "" -#: ../../c-api/init_config.rst:2032 +#: ../../c-api/init_config.rst:2031 msgid "" "The :c:member:`~PyConfig.xoptions` options are parsed to set other options: " "see the :option:`-X` command line option." msgstr "" -#: ../../c-api/init_config.rst:2037 +#: ../../c-api/init_config.rst:2036 msgid "The ``show_alloc_count`` field has been removed." msgstr "" -#: ../../c-api/init_config.rst:2043 +#: ../../c-api/init_config.rst:2042 msgid "Initialization with PyConfig" msgstr "" -#: ../../c-api/init_config.rst:2045 +#: ../../c-api/init_config.rst:2044 msgid "" "Initializing the interpreter from a populated configuration struct is " "handled by calling :c:func:`Py_InitializeFromConfig`." msgstr "" -#: ../../c-api/init_config.rst:2051 +#: ../../c-api/init_config.rst:2050 msgid "" "If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:" "func:`PyImport_ExtendInittab` are used, they must be set or called after " @@ -3020,17 +3020,17 @@ msgid "" "`PyImport_ExtendInittab` must be called before each Python initialization." msgstr "" -#: ../../c-api/init_config.rst:2058 +#: ../../c-api/init_config.rst:2057 msgid "" "The current configuration (``PyConfig`` type) is stored in " "``PyInterpreterState.config``." msgstr "" -#: ../../c-api/init_config.rst:2061 +#: ../../c-api/init_config.rst:2060 msgid "Example setting the program name::" msgstr "" -#: ../../c-api/init_config.rst:2063 +#: ../../c-api/init_config.rst:2062 msgid "" "void init_python(void)\n" "{\n" @@ -3059,7 +3059,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/init_config.rst:2089 +#: ../../c-api/init_config.rst:2088 msgid "" "More complete example modifying the default configuration, read the " "configuration, and then override some parameters. Note that since 3.11, many " @@ -3068,7 +3068,7 @@ msgid "" "called will be left unchanged by initialization::" msgstr "" -#: ../../c-api/init_config.rst:2096 +#: ../../c-api/init_config.rst:2095 msgid "" "PyStatus init_python(const char *program_name)\n" "{\n" @@ -3123,18 +3123,18 @@ msgid "" "}" msgstr "" -#: ../../c-api/init_config.rst:2152 +#: ../../c-api/init_config.rst:2151 msgid "Isolated Configuration" msgstr "" -#: ../../c-api/init_config.rst:2154 +#: ../../c-api/init_config.rst:2153 msgid "" ":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:" "`PyConfig_InitIsolatedConfig` functions create a configuration to isolate " "Python from the system. For example, to embed Python into an application." msgstr "" -#: ../../c-api/init_config.rst:2159 +#: ../../c-api/init_config.rst:2158 msgid "" "This configuration ignores global configuration variables, environment " "variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " @@ -3142,115 +3142,115 @@ msgid "" "LC_CTYPE locale are left unchanged. Signal handlers are not installed." msgstr "" -#: ../../c-api/init_config.rst:2164 +#: ../../c-api/init_config.rst:2163 msgid "" "Configuration files are still used with this configuration to determine " "paths that are unspecified. Ensure :c:member:`PyConfig.home` is specified to " "avoid computing the default path configuration." msgstr "" -#: ../../c-api/init_config.rst:2172 +#: ../../c-api/init_config.rst:2171 msgid "Python Configuration" msgstr "" -#: ../../c-api/init_config.rst:2174 +#: ../../c-api/init_config.rst:2173 msgid "" ":c:func:`PyPreConfig_InitPythonConfig` and :c:func:" "`PyConfig_InitPythonConfig` functions create a configuration to build a " "customized Python which behaves as the regular Python." msgstr "" -#: ../../c-api/init_config.rst:2178 +#: ../../c-api/init_config.rst:2177 msgid "" "Environments variables and command line arguments are used to configure " "Python, whereas global configuration variables are ignored." msgstr "" -#: ../../c-api/init_config.rst:2181 +#: ../../c-api/init_config.rst:2180 msgid "" "This function enables C locale coercion (:pep:`538`) and :ref:`Python UTF-8 " "Mode ` (:pep:`540`) depending on the LC_CTYPE locale, :envvar:" "`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment variables." msgstr "" -#: ../../c-api/init_config.rst:2190 +#: ../../c-api/init_config.rst:2189 msgid "Python Path Configuration" msgstr "" -#: ../../c-api/init_config.rst:2192 +#: ../../c-api/init_config.rst:2191 msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" msgstr "" -#: ../../c-api/init_config.rst:2194 +#: ../../c-api/init_config.rst:2193 msgid "Path configuration inputs:" msgstr "" -#: ../../c-api/init_config.rst:2196 +#: ../../c-api/init_config.rst:2195 msgid ":c:member:`PyConfig.home`" msgstr ":c:member:`PyConfig.home`" -#: ../../c-api/init_config.rst:2197 +#: ../../c-api/init_config.rst:2196 msgid ":c:member:`PyConfig.platlibdir`" msgstr ":c:member:`PyConfig.platlibdir`" -#: ../../c-api/init_config.rst:2198 +#: ../../c-api/init_config.rst:2197 msgid ":c:member:`PyConfig.pathconfig_warnings`" msgstr ":c:member:`PyConfig.pathconfig_warnings`" -#: ../../c-api/init_config.rst:2199 +#: ../../c-api/init_config.rst:2198 msgid ":c:member:`PyConfig.program_name`" msgstr ":c:member:`PyConfig.program_name`" -#: ../../c-api/init_config.rst:2200 +#: ../../c-api/init_config.rst:2199 msgid ":c:member:`PyConfig.pythonpath_env`" msgstr ":c:member:`PyConfig.pythonpath_env`" -#: ../../c-api/init_config.rst:2201 +#: ../../c-api/init_config.rst:2200 msgid "current working directory: to get absolute paths" msgstr "" -#: ../../c-api/init_config.rst:2202 +#: ../../c-api/init_config.rst:2201 msgid "" "``PATH`` environment variable to get the program full path (from :c:member:" "`PyConfig.program_name`)" msgstr "" -#: ../../c-api/init_config.rst:2204 +#: ../../c-api/init_config.rst:2203 msgid "``__PYVENV_LAUNCHER__`` environment variable" msgstr "" -#: ../../c-api/init_config.rst:2205 +#: ../../c-api/init_config.rst:2204 msgid "" "(Windows only) Application paths in the registry under " "\"Software\\Python\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and " "HKEY_LOCAL_MACHINE (where X.Y is the Python version)." msgstr "" -#: ../../c-api/init_config.rst:2209 +#: ../../c-api/init_config.rst:2208 msgid "Path configuration output fields:" msgstr "" -#: ../../c-api/init_config.rst:2211 +#: ../../c-api/init_config.rst:2210 msgid ":c:member:`PyConfig.base_exec_prefix`" msgstr ":c:member:`PyConfig.base_exec_prefix`" -#: ../../c-api/init_config.rst:2212 +#: ../../c-api/init_config.rst:2211 msgid ":c:member:`PyConfig.base_executable`" msgstr ":c:member:`PyConfig.base_executable`" -#: ../../c-api/init_config.rst:2213 +#: ../../c-api/init_config.rst:2212 msgid ":c:member:`PyConfig.base_prefix`" msgstr ":c:member:`PyConfig.base_prefix`" -#: ../../c-api/init_config.rst:2214 +#: ../../c-api/init_config.rst:2213 msgid ":c:member:`PyConfig.exec_prefix`" msgstr ":c:member:`PyConfig.exec_prefix`" -#: ../../c-api/init_config.rst:2215 +#: ../../c-api/init_config.rst:2214 msgid ":c:member:`PyConfig.executable`" msgstr ":c:member:`PyConfig.executable`" -#: ../../c-api/init_config.rst:2216 +#: ../../c-api/init_config.rst:2215 msgid "" ":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." "module_search_paths`" @@ -3258,11 +3258,11 @@ msgstr "" ":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." "module_search_paths`" -#: ../../c-api/init_config.rst:2218 +#: ../../c-api/init_config.rst:2217 msgid ":c:member:`PyConfig.prefix`" msgstr ":c:member:`PyConfig.prefix`" -#: ../../c-api/init_config.rst:2220 +#: ../../c-api/init_config.rst:2219 msgid "" "If at least one \"output field\" is not set, Python calculates the path " "configuration to fill unset fields. If :c:member:`~PyConfig." @@ -3271,7 +3271,7 @@ msgid "" "module_search_paths_set` is set to ``1``." msgstr "" -#: ../../c-api/init_config.rst:2226 +#: ../../c-api/init_config.rst:2225 msgid "" "It is possible to completely ignore the function calculating the default " "path configuration by setting explicitly all path configuration output " @@ -3281,52 +3281,52 @@ msgid "" "modification." msgstr "" -#: ../../c-api/init_config.rst:2233 +#: ../../c-api/init_config.rst:2232 msgid "" "Set :c:member:`~PyConfig.pathconfig_warnings` to ``0`` to suppress warnings " "when calculating the path configuration (Unix only, Windows does not log any " "warning)." msgstr "" -#: ../../c-api/init_config.rst:2236 +#: ../../c-api/init_config.rst:2235 msgid "" "If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig." "base_exec_prefix` fields are not set, they inherit their value from :c:" "member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively." msgstr "" -#: ../../c-api/init_config.rst:2240 +#: ../../c-api/init_config.rst:2239 msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" msgstr "" -#: ../../c-api/init_config.rst:2242 +#: ../../c-api/init_config.rst:2241 msgid "" "If :c:member:`~PyConfig.run_filename` is set and is a directory which " "contains a ``__main__.py`` script, prepend :c:member:`~PyConfig." "run_filename` to :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:2245 +#: ../../c-api/init_config.rst:2244 msgid "If :c:member:`~PyConfig.isolated` is zero:" msgstr "" -#: ../../c-api/init_config.rst:2247 +#: ../../c-api/init_config.rst:2246 msgid "" "If :c:member:`~PyConfig.run_module` is set, prepend the current directory " "to :data:`sys.path`. Do nothing if the current directory cannot be read." msgstr "" -#: ../../c-api/init_config.rst:2249 +#: ../../c-api/init_config.rst:2248 msgid "" "If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the " "filename to :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:2251 +#: ../../c-api/init_config.rst:2250 msgid "Otherwise, prepend an empty string to :data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:2253 +#: ../../c-api/init_config.rst:2252 msgid "" "If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be " "modified by the :mod:`site` module. If :c:member:`~PyConfig." @@ -3335,47 +3335,47 @@ msgid "" "data:`sys.path`." msgstr "" -#: ../../c-api/init_config.rst:2259 +#: ../../c-api/init_config.rst:2258 msgid "The following configuration files are used by the path configuration:" msgstr "" -#: ../../c-api/init_config.rst:2261 +#: ../../c-api/init_config.rst:2260 msgid "``pyvenv.cfg``" msgstr "``pyvenv.cfg``" -#: ../../c-api/init_config.rst:2262 +#: ../../c-api/init_config.rst:2261 msgid "``._pth`` file (ex: ``python._pth``)" msgstr "" -#: ../../c-api/init_config.rst:2263 +#: ../../c-api/init_config.rst:2262 msgid "``pybuilddir.txt`` (Unix only)" msgstr "" -#: ../../c-api/init_config.rst:2265 +#: ../../c-api/init_config.rst:2264 msgid "If a ``._pth`` file is present:" msgstr "" -#: ../../c-api/init_config.rst:2267 +#: ../../c-api/init_config.rst:2266 msgid "Set :c:member:`~PyConfig.isolated` to ``1``." msgstr "" -#: ../../c-api/init_config.rst:2268 +#: ../../c-api/init_config.rst:2267 msgid "Set :c:member:`~PyConfig.use_environment` to ``0``." msgstr "" -#: ../../c-api/init_config.rst:2269 +#: ../../c-api/init_config.rst:2268 msgid "Set :c:member:`~PyConfig.site_import` to ``0``." msgstr "" -#: ../../c-api/init_config.rst:2270 +#: ../../c-api/init_config.rst:2269 msgid "Set :c:member:`~PyConfig.user_site_directory` to ``0`` (since 3.15)." msgstr "" -#: ../../c-api/init_config.rst:2271 +#: ../../c-api/init_config.rst:2270 msgid "Set :c:member:`~PyConfig.safe_path` to ``1``." msgstr "" -#: ../../c-api/init_config.rst:2273 +#: ../../c-api/init_config.rst:2272 msgid "" "If :c:member:`~PyConfig.home` is not set and a ``pyvenv.cfg`` file is " "present in the same directory as :c:member:`~PyConfig.executable`, or its " @@ -3386,120 +3386,120 @@ msgid "" "more information." msgstr "" -#: ../../c-api/init_config.rst:2281 +#: ../../c-api/init_config.rst:2280 msgid "" "The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" "`PyConfig.base_executable`." msgstr "" -#: ../../c-api/init_config.rst:2286 +#: ../../c-api/init_config.rst:2285 msgid "" ":c:member:`~PyConfig.prefix`, and :c:member:`~PyConfig.exec_prefix`, are now " "set to the ``pyvenv.cfg`` directory. This was previously done by :mod:" "`site`, therefore affected by :option:`-S`." msgstr "" -#: ../../c-api/init_config.rst:2293 +#: ../../c-api/init_config.rst:2292 msgid "" ":c:member:`~PyConfig.user_site_directory` is now set to ``0`` when a ``." "_pth`` file is present." msgstr "" -#: ../../c-api/init_config.rst:2298 +#: ../../c-api/init_config.rst:2297 msgid "Py_GetArgcArgv()" msgstr "Py_GetArgcArgv()" -#: ../../c-api/init_config.rst:2302 +#: ../../c-api/init_config.rst:2301 msgid "Get the original command line arguments, before Python modified them." msgstr "" -#: ../../c-api/init_config.rst:2304 +#: ../../c-api/init_config.rst:2303 msgid "See also :c:member:`PyConfig.orig_argv` member." msgstr "" -#: ../../c-api/init_config.rst:2308 +#: ../../c-api/init_config.rst:2307 msgid "Multi-Phase Initialization Private Provisional API" msgstr "" -#: ../../c-api/init_config.rst:2310 +#: ../../c-api/init_config.rst:2309 msgid "" "This section is a private provisional API introducing multi-phase " "initialization, the core feature of :pep:`432`:" msgstr "" -#: ../../c-api/init_config.rst:2313 +#: ../../c-api/init_config.rst:2312 msgid "\"Core\" initialization phase, \"bare minimum Python\":" msgstr "" -#: ../../c-api/init_config.rst:2315 +#: ../../c-api/init_config.rst:2314 msgid "Builtin types;" msgstr "" -#: ../../c-api/init_config.rst:2316 +#: ../../c-api/init_config.rst:2315 msgid "Builtin exceptions;" msgstr "" -#: ../../c-api/init_config.rst:2317 +#: ../../c-api/init_config.rst:2316 msgid "Builtin and frozen modules;" msgstr "" -#: ../../c-api/init_config.rst:2318 +#: ../../c-api/init_config.rst:2317 msgid "" "The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " "doesn't exist yet)." msgstr "" -#: ../../c-api/init_config.rst:2321 +#: ../../c-api/init_config.rst:2320 msgid "\"Main\" initialization phase, Python is fully initialized:" msgstr "" -#: ../../c-api/init_config.rst:2323 +#: ../../c-api/init_config.rst:2322 msgid "Install and configure :mod:`importlib`;" msgstr "" -#: ../../c-api/init_config.rst:2324 +#: ../../c-api/init_config.rst:2323 msgid "Apply the :ref:`Path Configuration `;" msgstr "" -#: ../../c-api/init_config.rst:2325 +#: ../../c-api/init_config.rst:2324 msgid "Install signal handlers;" msgstr "" -#: ../../c-api/init_config.rst:2326 +#: ../../c-api/init_config.rst:2325 msgid "" "Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" "data:`sys.path`);" msgstr "" -#: ../../c-api/init_config.rst:2328 +#: ../../c-api/init_config.rst:2327 msgid "" "Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" msgstr "" -#: ../../c-api/init_config.rst:2329 +#: ../../c-api/init_config.rst:2328 msgid "Import the :mod:`site` module;" msgstr "" -#: ../../c-api/init_config.rst:2330 +#: ../../c-api/init_config.rst:2329 msgid "etc." msgstr "" -#: ../../c-api/init_config.rst:2332 +#: ../../c-api/init_config.rst:2331 msgid "Private provisional API:" msgstr "" -#: ../../c-api/init_config.rst:2336 +#: ../../c-api/init_config.rst:2335 msgid "" "If set to ``0``, :c:func:`Py_InitializeFromConfig` stops at the \"Core\" " "initialization phase." msgstr "" -#: ../../c-api/init_config.rst:2341 +#: ../../c-api/init_config.rst:2340 msgid "" "Move to the \"Main\" initialization phase, finish the Python initialization." msgstr "" -#: ../../c-api/init_config.rst:2343 +#: ../../c-api/init_config.rst:2342 msgid "" "No module is imported during the \"Core\" phase and the ``importlib`` module " "is not configured: the :ref:`Path Configuration ` is only " @@ -3508,14 +3508,14 @@ msgid "" "maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." msgstr "" -#: ../../c-api/init_config.rst:2349 +#: ../../c-api/init_config.rst:2348 msgid "" "It may become possible to calculate the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is " "one of the :pep:`432` motivation." msgstr "" -#: ../../c-api/init_config.rst:2353 +#: ../../c-api/init_config.rst:2352 msgid "" "The \"Core\" phase is not properly defined: what should be and what should " "not be available at this phase is not specified yet. The API is marked as " @@ -3523,13 +3523,13 @@ msgid "" "until a proper public API is designed." msgstr "" -#: ../../c-api/init_config.rst:2358 +#: ../../c-api/init_config.rst:2357 msgid "" "Example running Python code between \"Core\" and \"Main\" initialization " "phases::" msgstr "" -#: ../../c-api/init_config.rst:2361 +#: ../../c-api/init_config.rst:2360 msgid "" "void init_python(void)\n" "{\n" diff --git a/c-api/interp-lifecycle.po b/c-api/interp-lifecycle.po index b9d3b68c6..347285b1b 100644 --- a/c-api/interp-lifecycle.po +++ b/c-api/interp-lifecycle.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2026-02-25 14:46+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/intro.po b/c-api/intro.po index d568a278c..97dbaf007 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: qqfunc, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1063,17 +1063,18 @@ msgstr "" msgid "" "Conversely, when a calling function passes in a reference to an object, " "there are two possibilities: the function *steals* a reference to the " -"object, or it does not. *Stealing a reference* means that when you pass a " -"reference to a function, that function assumes that it now owns that " -"reference, and you are not responsible for it any longer." +"object, or it does not." msgstr "" -"逆に、ある関数呼び出しで、あるオブジェクトへの参照を呼び出される関数に渡す際" -"には、二つの可能性: 関数がオブジェクトへの参照を *盗み取る* (steal) 場合と、" -"そうでない場合があります。*参照を盗む* とは、関数に参照を渡したときに、参照の" -"所有者がその関数になったと仮定し、関数の呼び出し元には所有権がなくなるという" -"ことです。" -#: ../../c-api/intro.rst:748 +#: ../../c-api/intro.rst:742 +msgid "" +"*Stealing a reference* means that when you pass a reference to a function, " +"that function assumes that it now owns that reference. Since the new owner " +"can use :c:func:`!Py_DECREF` at its discretion, you (the caller) must not " +"use that reference after the call." +msgstr "" + +#: ../../c-api/intro.rst:751 msgid "" "Few functions steal references; the two notable exceptions are :c:func:" "`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " @@ -1093,7 +1094,7 @@ msgstr "" "コードは以下のようになります (とりあえず例外処理のことは忘れておきます; もっ" "とよい書き方を後で示します)::" -#: ../../c-api/intro.rst:756 +#: ../../c-api/intro.rst:759 msgid "" "PyObject *t;\n" "\n" @@ -1103,7 +1104,7 @@ msgid "" "PyTuple_SetItem(t, 2, PyUnicode_FromString(\"three\"));" msgstr "" -#: ../../c-api/intro.rst:763 +#: ../../c-api/intro.rst:766 msgid "" "Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately " "stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object " @@ -1115,7 +1116,7 @@ msgstr "" "い場合は、参照盗む関数を呼び出す前に、 :c:func:`Py_INCREF` を利用してもう一つ" "の参照を取得してください。" -#: ../../c-api/intro.rst:768 +#: ../../c-api/intro.rst:771 msgid "" "Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple " "items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to " @@ -1128,7 +1129,7 @@ msgstr "" "タプルの値を入れていくつもりなら、 :c:func:`PyTuple_SetItem` だけしか使えませ" "ん。" -#: ../../c-api/intro.rst:773 +#: ../../c-api/intro.rst:776 msgid "" "Equivalent code for populating a list can be written using :c:func:" "`PyList_New` and :c:func:`PyList_SetItem`." @@ -1136,7 +1137,7 @@ msgstr "" "同じく、リストに値を入れていくコードは :c:func:`PyList_New` と :c:func:" "`PyList_SetItem` で書けます。" -#: ../../c-api/intro.rst:776 +#: ../../c-api/intro.rst:779 msgid "" "However, in practice, you will rarely use these ways of creating and " "populating a tuple or list. There's a generic function, :c:func:" @@ -1150,7 +1151,7 @@ msgstr "" "基づいて C の値から生成できます。例えば、上の二種類のコードブロックは、以下の" "ように置き換えられます (エラーチェックにも配慮しています)::" -#: ../../c-api/intro.rst:782 +#: ../../c-api/intro.rst:785 msgid "" "PyObject *tuple, *list;\n" "\n" @@ -1162,7 +1163,7 @@ msgstr "" "tuple = Py_BuildValue(\"(iis)\", 1, 2, \"three\");\n" "list = Py_BuildValue(\"[iis]\", 1, 2, \"three\");" -#: ../../c-api/intro.rst:787 +#: ../../c-api/intro.rst:790 msgid "" "It is much more common to use :c:func:`PyObject_SetItem` and friends with " "items whose references you are only borrowing, like arguments that were " @@ -1173,7 +1174,7 @@ msgid "" "sequence) to a given item::" msgstr "" -#: ../../c-api/intro.rst:794 +#: ../../c-api/intro.rst:797 msgid "" "int\n" "set_all(PyObject *target, PyObject *item)\n" @@ -1197,7 +1198,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:817 +#: ../../c-api/intro.rst:820 msgid "" "The situation is slightly different for function return values. While " "passing a reference to most functions does not change your ownership " @@ -1218,7 +1219,7 @@ msgstr "" "`PySequence_GetItem` のように、オブジェクトに対する参照を返す汎用の関数は、常" "に新たな参照を返します (呼び出し側が参照の所有者になります)。" -#: ../../c-api/intro.rst:826 +#: ../../c-api/intro.rst:829 msgid "" "It is important to realize that whether you own a reference returned by a " "function depends on which function you call only --- *the plumage* (the type " @@ -1236,7 +1237,7 @@ msgstr "" "この関数は全く同じ引数をとります) を使って取り出すと、返されたオブジェクトに" "対する参照を得ます。" -#: ../../c-api/intro.rst:838 +#: ../../c-api/intro.rst:841 msgid "" "Here is an example of how you could write a function that computes the sum " "of the items in a list of integers; once using :c:func:`PyList_GetItem`, " @@ -1246,7 +1247,7 @@ msgstr "" "書けるかを示した例です; 一つは :c:func:`PyList_GetItem` を使っていて、もう一" "つは :c:func:`PySequence_GetItem` を使っています。 ::" -#: ../../c-api/intro.rst:842 +#: ../../c-api/intro.rst:845 msgid "" "long\n" "sum_list(PyObject *list)\n" @@ -1271,7 +1272,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:868 +#: ../../c-api/intro.rst:871 msgid "" "long\n" "sum_sequence(PyObject *sequence)\n" @@ -1302,11 +1303,11 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:902 +#: ../../c-api/intro.rst:905 msgid "Types" msgstr "型" -#: ../../c-api/intro.rst:904 +#: ../../c-api/intro.rst:907 msgid "" "There are few other data types that play a significant role in the Python/C " "API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" @@ -1323,7 +1324,7 @@ msgstr "" "属性を記述したり、複素数の値を記述したりするために構造体をいくつか使っていま" "す。これらの型については、その型を使う関数とともに説明してゆきます。" -#: ../../c-api/intro.rst:914 +#: ../../c-api/intro.rst:917 msgid "" "A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " "C99 doesn't define such a thing directly (size_t is an unsigned integral " @@ -1331,11 +1332,11 @@ msgid "" "positive value of type :c:type:`Py_ssize_t`." msgstr "" -#: ../../c-api/intro.rst:923 +#: ../../c-api/intro.rst:926 msgid "Exceptions" msgstr "例外" -#: ../../c-api/intro.rst:925 +#: ../../c-api/intro.rst:928 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -1348,7 +1349,7 @@ msgstr "" "具合に、トップレベルのインタプリタ層まで自動的に伝播します。インタプリタ層" "は、スタックトレースバックと合わせて例外をユーザに報告します。" -#: ../../c-api/intro.rst:933 +#: ../../c-api/intro.rst:936 msgid "" "For C programmers, however, error checking always has to be explicit. All " "functions in the Python/C API can raise exceptions, unless an explicit claim " @@ -1373,7 +1374,7 @@ msgstr "" "で、 :c:func:`PyErr_Occurred` で明示的にエラーテストを行う必要があります。こ" "れらの例外は常に明示的にドキュメント化されます。" -#: ../../c-api/intro.rst:948 +#: ../../c-api/intro.rst:951 msgid "" "Exception state is maintained in per-thread storage (this is equivalent to " "using global storage in an unthreaded application). A thread can be in one " @@ -1396,7 +1397,7 @@ msgstr "" "い) 例外を設定するための関数で、 :c:func:`PyErr_Clear` は例外状態情報を消し去" "る関数です。" -#: ../../c-api/intro.rst:958 +#: ../../c-api/intro.rst:961 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " @@ -1418,7 +1419,7 @@ msgstr "" "ンタプリタのメインループに到達するまで、例外が関数の間で受け渡しされている間" "だけです。" -#: ../../c-api/intro.rst:970 +#: ../../c-api/intro.rst:973 msgid "" "Note that starting with Python 1.5, the preferred, thread-safe way to access " "the exception state from Python code is to call the function :func:`sys." @@ -1442,7 +1443,7 @@ msgstr "" "グを抑止しています; また、トレースバック内のスタックフレームで参照されている" "オブジェクトがしばしば不必要に寿命を永らえていたのをなくしています。" -#: ../../c-api/intro.rst:981 +#: ../../c-api/intro.rst:984 msgid "" "As a general principle, a function that calls another function to perform " "some task should check whether the called function raised an exception, and " @@ -1460,7 +1461,7 @@ msgstr "" "送出されたばかりの例外を上書きしてしまい、エラーの原因そのものに関する重要な" "情報を失うことになります。" -#: ../../c-api/intro.rst:990 +#: ../../c-api/intro.rst:993 msgid "" "A simple example of detecting exceptions and passing them on is shown in " "the :c:func:`!sum_sequence` example above. It so happens that this example " @@ -1469,7 +1470,7 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: ../../c-api/intro.rst:996 +#: ../../c-api/intro.rst:999 msgid "" "def incr_item(dict, key):\n" " try:\n" @@ -1479,11 +1480,11 @@ msgid "" " dict[key] = item + 1" msgstr "" -#: ../../c-api/intro.rst:1005 +#: ../../c-api/intro.rst:1008 msgid "Here is the corresponding C code, in all its glory::" msgstr "以下は対応するコードを C で完璧に書いたものです::" -#: ../../c-api/intro.rst:1007 +#: ../../c-api/intro.rst:1010 msgid "" "int\n" "incr_item(PyObject *dict, PyObject *key)\n" @@ -1529,7 +1530,7 @@ msgid "" "}" msgstr "" -#: ../../c-api/intro.rst:1057 +#: ../../c-api/intro.rst:1060 msgid "" "This example represents an endorsed use of the ``goto`` statement in C! It " "illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" @@ -1552,11 +1553,11 @@ msgstr "" "敗) で初期化しておいて、最後の関数呼び出しまでうまくいった場合にのみ ``0`` " "(成功) に設定します。" -#: ../../c-api/intro.rst:1071 +#: ../../c-api/intro.rst:1074 msgid "Embedding Python" msgstr "Python の埋め込み" -#: ../../c-api/intro.rst:1073 +#: ../../c-api/intro.rst:1076 msgid "" "The one important task that only embedders (as opposed to extension writers) " "of the Python interpreter have to worry about is the initialization, and " @@ -1568,7 +1569,7 @@ msgstr "" "(initialization)、そしておそらくは終了処理 (finalization) です。インタプリタ" "のほとんどの機能は、インタプリタの起動後しか使えません。" -#: ../../c-api/intro.rst:1086 +#: ../../c-api/intro.rst:1089 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -1580,7 +1581,7 @@ msgstr "" "`builtins`, :mod:`__main__`, および :mod:`sys` を作成します。また、モジュール" "検索パス (``sys.path``) の初期化も行います。" -#: ../../c-api/intro.rst:1091 +#: ../../c-api/intro.rst:1094 msgid "" ":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." "argv``). If this variable is needed by Python code that will be executed " @@ -1588,7 +1589,7 @@ msgid "" "must be set: see :ref:`Python Initialization Configuration `." msgstr "" -#: ../../c-api/intro.rst:1096 +#: ../../c-api/intro.rst:1099 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -1608,7 +1609,7 @@ msgstr "" "レクトリからの相対で、 :file:`lib/python{X.Y}` という名前のディレクトリを探し" "ます。" -#: ../../c-api/intro.rst:1105 +#: ../../c-api/intro.rst:1108 msgid "" "For instance, if the Python executable is found in :file:`/usr/local/bin/" "python`, it will assume that the libraries are in :file:`/usr/local/lib/" @@ -1626,7 +1627,7 @@ msgstr "" "`PYTHONPATH` を設定して追加のディレクトリを標準モジュール検索パスの前に挿入し" "たりできます。" -#: ../../c-api/intro.rst:1113 +#: ../../c-api/intro.rst:1116 msgid "" "The embedding application can steer the search by setting :c:member:" "`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. " @@ -1634,7 +1635,7 @@ msgid "" "is still inserted in front of the standard path." msgstr "" -#: ../../c-api/intro.rst:1121 +#: ../../c-api/intro.rst:1124 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " "application may want to start over (make another call to :c:func:" @@ -1658,11 +1659,11 @@ msgstr "" "モリを *解放するわけではない* ことに注意してください。例えば、拡張モジュール" "によって確保されたメモリは、現在のところ解放する事ができません。" -#: ../../c-api/intro.rst:1135 +#: ../../c-api/intro.rst:1138 msgid "Debugging Builds" msgstr "デバッグ版ビルド (Debugging Builds)" -#: ../../c-api/intro.rst:1137 +#: ../../c-api/intro.rst:1140 msgid "" "Python can be built with several macros to enable extra checks of the " "interpreter and extension modules. These checks tend to add a large amount " @@ -1673,7 +1674,7 @@ msgstr "" "大きなオーバーヘッドを生じる傾向があります。なので、デフォルトでは有効にされ" "ていません。" -#: ../../c-api/intro.rst:1141 +#: ../../c-api/intro.rst:1144 msgid "" "A full list of the various types of debugging builds is in the file :file:" "`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " @@ -1688,21 +1689,21 @@ msgstr "" "ロファイリングが利用可能です。よく使われるビルドについてのみ、この節の残りの" "部分で説明します。" -#: ../../c-api/intro.rst:1149 +#: ../../c-api/intro.rst:1152 msgid "" "Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined " "produces what is generally meant by :ref:`a debug build of Python `." msgstr "" -#: ../../c-api/intro.rst:1152 +#: ../../c-api/intro.rst:1155 msgid "" "On Unix, :c:macro:`!Py_DEBUG` can be enabled by adding :option:`--with-" "pydebug` to the :file:`./configure` command. This will also disable compiler " "optimization." msgstr "" -#: ../../c-api/intro.rst:1155 +#: ../../c-api/intro.rst:1158 msgid "" "On Windows, selecting a debug build (e.g., by passing the :option:`-d` " "option to :file:`PCbuild/build.bat`) automatically enables :c:macro:`!" @@ -1711,29 +1712,23 @@ msgid "" "macro:`!Py_DEBUG`." msgstr "" -#: ../../c-api/intro.rst:1160 +#: ../../c-api/intro.rst:1163 msgid "" "In addition to the reference count debugging described below, extra checks " "are performed. See :ref:`Python Debug Build ` for more details." msgstr "" -#: ../../c-api/intro.rst:1163 +#: ../../c-api/intro.rst:1166 msgid "" -"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" +"Defining ``Py_TRACE_REFS`` enables reference tracing (see the :option:" "`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " "circular doubly linked list of active objects is maintained by adding two " "extra fields to every :c:type:`PyObject`. Total allocations are tracked as " "well. Upon exit, all existing references are printed. (In interactive mode " "this happens after every statement run by the interpreter.)" msgstr "" -":c:macro:`Py_TRACE_REFS` を宣言すると、参照トレースが有効になります (:option:" -"`configure --with-trace-refs オプション <--with-trace-refs>` を参照してくださ" -"い)。全ての :c:type:`PyObject` に二つのフィールドを追加することで、使用中のオ" -"ブジェクトの循環二重連結リストが管理されます。全ての割り当て(allocation)がト" -"レースされます。終了時に、全ての残っているオブジェクトが表示されます。 (イン" -"タラクティブモードでは、インタプリタによる文の実行のたびに表示されます。)" -#: ../../c-api/intro.rst:1170 +#: ../../c-api/intro.rst:1173 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." @@ -1741,49 +1736,49 @@ msgstr "" "より詳しい情報については、Pythonのソース配布(source distribution)の中の :" "file:`Misc/SpecialBuilds.txt` を参照してください。" -#: ../../c-api/intro.rst:1177 +#: ../../c-api/intro.rst:1180 msgid "Recommended third party tools" msgstr "おすすめのサードパーティツール" -#: ../../c-api/intro.rst:1179 +#: ../../c-api/intro.rst:1182 msgid "" "The following third party tools offer both simpler and more sophisticated " "approaches to creating C, C++ and Rust extensions for Python:" msgstr "" -#: ../../c-api/intro.rst:1182 +#: ../../c-api/intro.rst:1185 msgid "`Cython `_" msgstr "" -#: ../../c-api/intro.rst:1183 +#: ../../c-api/intro.rst:1186 msgid "`cffi `_" msgstr "" -#: ../../c-api/intro.rst:1184 +#: ../../c-api/intro.rst:1187 msgid "`HPy `_" msgstr "" -#: ../../c-api/intro.rst:1185 +#: ../../c-api/intro.rst:1188 msgid "`nanobind `_ (C++)" msgstr "" -#: ../../c-api/intro.rst:1186 +#: ../../c-api/intro.rst:1189 msgid "`Numba `_" msgstr "" -#: ../../c-api/intro.rst:1187 +#: ../../c-api/intro.rst:1190 msgid "`pybind11 `_ (C++)" msgstr "" -#: ../../c-api/intro.rst:1188 +#: ../../c-api/intro.rst:1191 msgid "`PyO3 `_ (Rust)" msgstr "" -#: ../../c-api/intro.rst:1189 +#: ../../c-api/intro.rst:1192 msgid "`SWIG `_" msgstr "" -#: ../../c-api/intro.rst:1191 +#: ../../c-api/intro.rst:1194 msgid "" "Using tools such as these can help avoid writing code that is tightly bound " "to a particular version of CPython, avoid reference counting errors, and " @@ -1794,7 +1789,7 @@ msgid "" "sources." msgstr "" -#: ../../c-api/intro.rst:1198 +#: ../../c-api/intro.rst:1201 msgid "" "These projects are not supported by the same people who maintain Python, and " "issues need to be raised with the projects directly. Remember to check that " @@ -1802,7 +1797,7 @@ msgid "" "outdated." msgstr "" -#: ../../c-api/intro.rst:1205 +#: ../../c-api/intro.rst:1208 msgid "" "`Python Packaging User Guide: Binary Extensions `_" @@ -1810,7 +1805,7 @@ msgstr "" "`Python Packaging User Guide: Binary Extensions `_" -#: ../../c-api/intro.rst:1206 +#: ../../c-api/intro.rst:1209 msgid "" "The Python Packaging User Guide not only covers several available tools that " "simplify the creation of binary extensions, but also discusses the various " @@ -1836,94 +1831,94 @@ msgstr "" msgid "Py_DECREF (C function)" msgstr "" -#: ../../c-api/intro.rst:744 +#: ../../c-api/intro.rst:747 msgid "PyList_SetItem (C function)" msgstr "" -#: ../../c-api/intro.rst:744 +#: ../../c-api/intro.rst:747 msgid "PyTuple_SetItem (C function)" msgstr "" -#: ../../c-api/intro.rst:815 +#: ../../c-api/intro.rst:818 msgid "set_all()" msgstr "set_all()" -#: ../../c-api/intro.rst:834 +#: ../../c-api/intro.rst:837 msgid "PyList_GetItem (C function)" msgstr "" -#: ../../c-api/intro.rst:834 +#: ../../c-api/intro.rst:837 msgid "PySequence_GetItem (C function)" msgstr "" -#: ../../c-api/intro.rst:864 +#: ../../c-api/intro.rst:867 msgid "sum_list()" msgstr "sum_list()" -#: ../../c-api/intro.rst:896 ../../c-api/intro.rst:988 +#: ../../c-api/intro.rst:899 ../../c-api/intro.rst:991 msgid "sum_sequence()" msgstr "sum_sequence()" -#: ../../c-api/intro.rst:931 +#: ../../c-api/intro.rst:934 msgid "PyErr_Occurred (C function)" msgstr "" -#: ../../c-api/intro.rst:944 +#: ../../c-api/intro.rst:947 msgid "PyErr_SetString (C function)" msgstr "" -#: ../../c-api/intro.rst:944 ../../c-api/intro.rst:1052 +#: ../../c-api/intro.rst:947 ../../c-api/intro.rst:1055 msgid "PyErr_Clear (C function)" msgstr "" -#: ../../c-api/intro.rst:968 +#: ../../c-api/intro.rst:971 msgid "exc_info (in module sys)" msgstr "exc_info (sys モジュール)" -#: ../../c-api/intro.rst:1003 ../../c-api/intro.rst:1050 +#: ../../c-api/intro.rst:1006 ../../c-api/intro.rst:1053 msgid "incr_item()" msgstr "incr_item()" -#: ../../c-api/intro.rst:1052 +#: ../../c-api/intro.rst:1055 msgid "PyErr_ExceptionMatches (C function)" msgstr "" -#: ../../c-api/intro.rst:1052 +#: ../../c-api/intro.rst:1055 msgid "Py_XDECREF (C function)" msgstr "" -#: ../../c-api/intro.rst:1078 +#: ../../c-api/intro.rst:1081 msgid "Py_Initialize (C function)" msgstr "" -#: ../../c-api/intro.rst:1078 +#: ../../c-api/intro.rst:1081 msgid "module" msgstr "module" -#: ../../c-api/intro.rst:1078 +#: ../../c-api/intro.rst:1081 msgid "builtins" msgstr "builtins" -#: ../../c-api/intro.rst:1078 +#: ../../c-api/intro.rst:1081 msgid "__main__" msgstr "__main__" -#: ../../c-api/intro.rst:1078 +#: ../../c-api/intro.rst:1081 msgid "sys" msgstr "sys" -#: ../../c-api/intro.rst:1078 +#: ../../c-api/intro.rst:1081 msgid "search" msgstr "検索" -#: ../../c-api/intro.rst:1078 +#: ../../c-api/intro.rst:1081 msgid "path" msgstr "パス" -#: ../../c-api/intro.rst:1078 +#: ../../c-api/intro.rst:1081 msgid "path (in module sys)" msgstr "path (sys モジュール)" -#: ../../c-api/intro.rst:1119 +#: ../../c-api/intro.rst:1122 msgid "Py_IsInitialized (C function)" msgstr "" diff --git a/c-api/iter.po b/c-api/iter.po index f12655dee..419938a55 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/iterator.po b/c-api/iterator.po index d4c66563c..f224833b7 100644 --- a/c-api/iterator.po +++ b/c-api/iterator.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/lifecycle.po b/c-api/lifecycle.po index 0ed8e9b44..ef63d6e80 100644 --- a/c-api/lifecycle.po +++ b/c-api/lifecycle.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-03 17:25+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -46,29 +46,29 @@ msgid "" "condition that must be true for *B* to occur after *A*." msgstr "" -#: ../../c-api/lifecycle.rst:55 ../../c-api/lifecycle.rst:62 +#: ../../c-api/lifecycle.rst:55 msgid "Diagram showing events in an object's life. Explained in detail below." msgstr "" -#: ../../c-api/lifecycle.rst:70 +#: ../../c-api/lifecycle.rst:63 msgid "Explanation:" msgstr "" -#: ../../c-api/lifecycle.rst:72 +#: ../../c-api/lifecycle.rst:65 msgid "When a new object is constructed by calling its type:" msgstr "" -#: ../../c-api/lifecycle.rst:74 +#: ../../c-api/lifecycle.rst:67 msgid ":c:member:`~PyTypeObject.tp_new` is called to create a new object." msgstr "" -#: ../../c-api/lifecycle.rst:75 +#: ../../c-api/lifecycle.rst:68 msgid "" ":c:member:`~PyTypeObject.tp_alloc` is directly called by :c:member:" "`~PyTypeObject.tp_new` to allocate the memory for the new object." msgstr "" -#: ../../c-api/lifecycle.rst:78 +#: ../../c-api/lifecycle.rst:71 msgid "" ":c:member:`~PyTypeObject.tp_init` initializes the newly created object. :c:" "member:`!tp_init` can be called again to re-initialize an object, if " @@ -76,15 +76,15 @@ msgid "" "example by Python code calling :py:meth:`~object.__new__`." msgstr "" -#: ../../c-api/lifecycle.rst:83 +#: ../../c-api/lifecycle.rst:76 msgid "After :c:member:`!tp_init` completes, the object is ready to use." msgstr "" -#: ../../c-api/lifecycle.rst:84 +#: ../../c-api/lifecycle.rst:77 msgid "Some time after the last reference to an object is removed:" msgstr "" -#: ../../c-api/lifecycle.rst:86 +#: ../../c-api/lifecycle.rst:79 msgid "" "If an object is not marked as *finalized*, it might be finalized by marking " "it as *finalized* and calling its :c:member:`~PyTypeObject.tp_finalize` " @@ -93,21 +93,21 @@ msgid "" "that :c:member:`~PyTypeObject.tp_finalize` is always called." msgstr "" -#: ../../c-api/lifecycle.rst:92 +#: ../../c-api/lifecycle.rst:85 msgid "" "If the object is marked as finalized, :c:member:`~PyTypeObject.tp_clear` " "might be called by the garbage collector to clear references held by the " "object. It is *not* called when the object's reference count reaches zero." msgstr "" -#: ../../c-api/lifecycle.rst:96 +#: ../../c-api/lifecycle.rst:89 msgid "" ":c:member:`~PyTypeObject.tp_dealloc` is called to destroy the object. To " "avoid code duplication, :c:member:`~PyTypeObject.tp_dealloc` typically calls " "into :c:member:`~PyTypeObject.tp_clear` to free up the object's references." msgstr "" -#: ../../c-api/lifecycle.rst:100 +#: ../../c-api/lifecycle.rst:93 msgid "" "When :c:member:`~PyTypeObject.tp_dealloc` finishes object destruction, it " "directly calls :c:member:`~PyTypeObject.tp_free` (usually set to :c:func:" @@ -115,7 +115,7 @@ msgid "" "for the type) to deallocate the memory." msgstr "" -#: ../../c-api/lifecycle.rst:105 +#: ../../c-api/lifecycle.rst:98 msgid "" "The :c:member:`~PyTypeObject.tp_finalize` function is permitted to add a " "reference to the object if desired. If it does, the object is " @@ -130,7 +130,7 @@ msgid "" "both of these behaviors may change in the future." msgstr "" -#: ../../c-api/lifecycle.rst:118 +#: ../../c-api/lifecycle.rst:111 msgid "" ":c:member:`~PyTypeObject.tp_dealloc` can optionally call :c:member:" "`~PyTypeObject.tp_finalize` via :c:func:`PyObject_CallFinalizerFromDealloc` " @@ -140,7 +140,7 @@ msgid "" "documentation for example code." msgstr "" -#: ../../c-api/lifecycle.rst:125 +#: ../../c-api/lifecycle.rst:118 msgid "" "If the object is a member of a :term:`cyclic isolate` and either :c:member:" "`~PyTypeObject.tp_clear` fails to break the reference cycle or the cyclic " @@ -150,20 +150,20 @@ msgid "" "\"leak\"). See :data:`gc.garbage`." msgstr "" -#: ../../c-api/lifecycle.rst:132 +#: ../../c-api/lifecycle.rst:125 msgid "" "If the object is marked as supporting garbage collection (the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:`~PyTypeObject.tp_flags`), the " "following events are also possible:" msgstr "" -#: ../../c-api/lifecycle.rst:136 +#: ../../c-api/lifecycle.rst:129 msgid "" "The garbage collector occasionally calls :c:member:`~PyTypeObject." "tp_traverse` to identify :term:`cyclic isolates `." msgstr "" -#: ../../c-api/lifecycle.rst:139 +#: ../../c-api/lifecycle.rst:132 msgid "" "When the garbage collector discovers a :term:`cyclic isolate`, it finalizes " "one of the objects in the group by marking it as *finalized* and calling " @@ -172,7 +172,7 @@ msgid "" "been finalized." msgstr "" -#: ../../c-api/lifecycle.rst:144 +#: ../../c-api/lifecycle.rst:137 msgid "" ":c:member:`~PyTypeObject.tp_finalize` is permitted to resurrect the object " "by adding a reference from outside the :term:`cyclic isolate`. The new " @@ -181,7 +181,7 @@ msgid "" "longer isolated)." msgstr "" -#: ../../c-api/lifecycle.rst:149 +#: ../../c-api/lifecycle.rst:142 msgid "" "When the garbage collector discovers a :term:`cyclic isolate` and all of the " "objects in the group have already been marked as *finalized*, the garbage " @@ -191,11 +191,11 @@ msgid "" "all of the objects have been cleared." msgstr "" -#: ../../c-api/lifecycle.rst:158 +#: ../../c-api/lifecycle.rst:151 msgid "Cyclic Isolate Destruction" msgstr "" -#: ../../c-api/lifecycle.rst:160 +#: ../../c-api/lifecycle.rst:153 msgid "" "Listed below are the stages of life of a hypothetical :term:`cyclic isolate` " "that continues to exist after each member object is finalized or cleared. " @@ -206,14 +206,14 @@ msgid "" "(see :c:member:`~PyTypeObject.tp_finalize`)." msgstr "" -#: ../../c-api/lifecycle.rst:168 +#: ../../c-api/lifecycle.rst:161 msgid "" "**Reachable** (not yet a cyclic isolate): All objects are in their normal, " "reachable state. A reference cycle could exist, but an external reference " "means the objects are not yet isolated." msgstr "" -#: ../../c-api/lifecycle.rst:171 +#: ../../c-api/lifecycle.rst:164 msgid "" "**Unreachable but consistent:** The final reference from outside the cyclic " "group of objects has been removed, causing the objects to become isolated " @@ -223,7 +223,7 @@ msgid "" "because the next run might not scan every object)." msgstr "" -#: ../../c-api/lifecycle.rst:177 +#: ../../c-api/lifecycle.rst:170 msgid "" "**Mix of finalized and not finalized:** Objects in a cyclic isolate are " "finalized one at a time, which means that there is a period of time when the " @@ -234,13 +234,13 @@ msgid "" "an arbitrary subset of its referents." msgstr "" -#: ../../c-api/lifecycle.rst:184 +#: ../../c-api/lifecycle.rst:177 msgid "" "**All finalized:** All objects in a cyclic isolate are finalized before any " "of them are cleared." msgstr "" -#: ../../c-api/lifecycle.rst:186 +#: ../../c-api/lifecycle.rst:179 msgid "" "**Mix of finalized and cleared:** The objects can be cleared serially or " "concurrently (but with the :term:`GIL` held); either way, some will finish " @@ -248,7 +248,7 @@ msgid "" "a subset of its referents. :pep:`442` calls this stage \"cyclic trash\"." msgstr "" -#: ../../c-api/lifecycle.rst:190 +#: ../../c-api/lifecycle.rst:183 msgid "" "**Leaked:** If a cyclic isolate still exists after all objects in the group " "have been finalized and cleared, then the objects remain indefinitely " @@ -258,7 +258,7 @@ msgid "" "required." msgstr "" -#: ../../c-api/lifecycle.rst:197 +#: ../../c-api/lifecycle.rst:190 msgid "" "If :c:member:`~PyTypeObject.tp_clear` did not exist, then Python would have " "no way to safely break a reference cycle. Simply destroying an object in a " @@ -270,7 +270,7 @@ msgid "" "`~PyTypeObject.tp_dealloc` is called to complete the destruction." msgstr "" -#: ../../c-api/lifecycle.rst:206 +#: ../../c-api/lifecycle.rst:199 msgid "" "Unlike clearing, finalization is not a phase of destruction. A finalized " "object must still behave properly by continuing to fulfill its design " @@ -282,7 +282,7 @@ msgid "" "`~PyTypeObject.tp_dealloc`." msgstr "" -#: ../../c-api/lifecycle.rst:214 +#: ../../c-api/lifecycle.rst:207 msgid "" "The finalization step is not necessary to safely reclaim the objects in a " "cyclic isolate, but its existence makes it easier to design types that " @@ -294,29 +294,29 @@ msgid "" "only non-cleared (but potentially finalized) objects." msgstr "" -#: ../../c-api/lifecycle.rst:223 +#: ../../c-api/lifecycle.rst:216 msgid "To summarize the possible interactions:" msgstr "" -#: ../../c-api/lifecycle.rst:225 +#: ../../c-api/lifecycle.rst:218 msgid "" "A non-finalized object might have references to or from non-finalized and " "finalized objects, but not to or from cleared objects." msgstr "" -#: ../../c-api/lifecycle.rst:227 +#: ../../c-api/lifecycle.rst:220 msgid "" "A finalized object might have references to or from non-finalized, " "finalized, and cleared objects." msgstr "" -#: ../../c-api/lifecycle.rst:229 +#: ../../c-api/lifecycle.rst:222 msgid "" "A cleared object might have references to or from finalized and cleared " "objects, but not to or from non-finalized objects." msgstr "" -#: ../../c-api/lifecycle.rst:232 +#: ../../c-api/lifecycle.rst:225 msgid "" "Without any reference cycles, an object can be simply destroyed once its " "last reference is deleted; the finalization and clearing steps are not " @@ -330,15 +330,15 @@ msgid "" "change in a future version." msgstr "" -#: ../../c-api/lifecycle.rst:244 +#: ../../c-api/lifecycle.rst:237 msgid "Functions" msgstr "関数" -#: ../../c-api/lifecycle.rst:246 +#: ../../c-api/lifecycle.rst:239 msgid "To allocate and free memory, see :ref:`allocating-objects`." msgstr "" -#: ../../c-api/lifecycle.rst:251 +#: ../../c-api/lifecycle.rst:244 msgid "" "Finalizes the object as described in :c:member:`~PyTypeObject.tp_finalize`. " "Call this function (or :c:func:`PyObject_CallFinalizerFromDealloc`) instead " @@ -349,7 +349,7 @@ msgid "" "change in the future." msgstr "" -#: ../../c-api/lifecycle.rst:264 +#: ../../c-api/lifecycle.rst:257 msgid "" "Same as :c:func:`PyObject_CallFinalizer` but meant to be called at the " "beginning of the object's destructor (:c:member:`~PyTypeObject.tp_dealloc`). " @@ -359,6 +359,6 @@ msgid "" "continue normally." msgstr "" -#: ../../c-api/lifecycle.rst:275 +#: ../../c-api/lifecycle.rst:268 msgid ":c:member:`~PyTypeObject.tp_dealloc` for example code." msgstr "" diff --git a/c-api/list.po b/c-api/list.po index ba485f983..c6171c6f1 100644 --- a/c-api/list.po +++ b/c-api/list.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -123,13 +123,12 @@ msgstr "" #: ../../c-api/list.rst:105 msgid "" -"This function \"steals\" a reference to *item* and discards a reference to " -"an item already in the list at the affected position." +"This function \":term:`steals `\" a reference to *item*, even on " +"error. On success, it discards a reference to an item already in the list at " +"the affected position (unless it was ``NULL``)." msgstr "" -"この関数は *item* への参照を \"盗み取り\" ます。また、変更先のインデクスにす" -"でに別の要素が入っている場合、その要素に対する参照を放棄します。" -#: ../../c-api/list.rst:111 +#: ../../c-api/list.rst:113 msgid "" "Macro form of :c:func:`PyList_SetItem` without error checking. This is " "normally only used to fill in new lists where there is no previous content." @@ -138,24 +137,20 @@ msgstr "" "のマクロは、新たなリストのまだ要素を入れたことのない位置に要素を入れるときに" "のみ使います。" -#: ../../c-api/list.rst:114 +#: ../../c-api/list.rst:116 msgid "" "Bounds checking is performed as an assertion if Python is built in :ref:" "`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "" -#: ../../c-api/list.rst:120 +#: ../../c-api/list.rst:122 msgid "" -"This macro \"steals\" a reference to *item*, and, unlike :c:func:" -"`PyList_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in *list* at position *i* will be leaked." +"This macro \":term:`steals `\" a reference to *item*, and, unlike :c:" +"func:`PyList_SetItem`, does *not* discard a reference to any item that is " +"being replaced; any reference in *list* at position *i* will be leaked." msgstr "" -"このマクロは *item* への参照を \"盗み取り\" ます。また、 :c:func:" -"`PyList_SetItem` と違って、要素の置き換えが生じても置き換えられるオブジェクト" -"への参照を放棄 *しません* ; その結果、 *list* 中の位置 *i* で参照されていたオ" -"ブジェクトがメモリリークを引き起こします。" -#: ../../c-api/list.rst:127 +#: ../../c-api/list.rst:129 msgid "" "In the :term:`free-threaded build`, this macro has no internal " "synchronization. It is normally only used to fill in new lists where no " @@ -163,7 +158,7 @@ msgid "" "func:`PyList_SetItem` instead, which uses a :term:`per-object lock`." msgstr "" -#: ../../c-api/list.rst:136 +#: ../../c-api/list.rst:138 msgid "" "Insert the item *item* into list *list* in front of index *index*. Return " "``0`` if successful; return ``-1`` and set an exception if unsuccessful. " @@ -173,7 +168,7 @@ msgstr "" "と ``0`` を返します。失敗すると ``-1`` を返し、例外をセットします。``list." "insert(index, item)`` に類似した機能です。" -#: ../../c-api/list.rst:143 +#: ../../c-api/list.rst:145 msgid "" "Append the object *item* at the end of list *list*. Return ``0`` if " "successful; return ``-1`` and set an exception if unsuccessful. Analogous " @@ -183,7 +178,7 @@ msgstr "" "す; 失敗すると ``-1`` を返し、例外をセットします。``list.append(item)`` に類" "似した機能です。" -#: ../../c-api/list.rst:150 +#: ../../c-api/list.rst:152 msgid "" "Return a list of the objects in *list* containing the objects *between* " "*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. " @@ -196,7 +191,7 @@ msgstr "" "``list[low:high]`` に類似した機能です。\n" "ただし、リストの末尾からのインデックスはサポートされていません。" -#: ../../c-api/list.rst:157 +#: ../../c-api/list.rst:159 msgid "" "Set the slice of *list* between *low* and *high* to the contents of " "*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may " @@ -211,27 +206,27 @@ msgstr "" "成功した場合には ``0`` を、失敗した場合には ``-1`` を返します。\n" "ただし、リストの末尾からのインデックスはサポートされていません。" -#: ../../c-api/list.rst:165 +#: ../../c-api/list.rst:167 msgid "" "In the :term:`free-threaded build`, when *itemlist* is a :class:`list`, both " "*list* and *itemlist* are locked for the duration of the operation. For " "other iterables (or ``NULL``), only *list* is locked." msgstr "" -#: ../../c-api/list.rst:172 +#: ../../c-api/list.rst:174 msgid "" "Extend *list* with the contents of *iterable*. This is the same as " "``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` and " "analogous to ``list.extend(iterable)`` or ``list += iterable``." msgstr "" -#: ../../c-api/list.rst:176 +#: ../../c-api/list.rst:178 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" -#: ../../c-api/list.rst:183 +#: ../../c-api/list.rst:185 msgid "" "In the :term:`free-threaded build`, when *iterable* is a :class:`list`, :" "class:`set`, :class:`dict`, or dict view, both *list* and *iterable* (or its " @@ -240,20 +235,20 @@ msgid "" "another thread." msgstr "" -#: ../../c-api/list.rst:192 +#: ../../c-api/list.rst:194 msgid "" "Remove all items from *list*. This is the same as ``PyList_SetSlice(list, " "0, PY_SSIZE_T_MAX, NULL)`` and analogous to ``list.clear()`` or ``del " "list[:]``." msgstr "" -#: ../../c-api/list.rst:196 +#: ../../c-api/list.rst:198 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" -#: ../../c-api/list.rst:204 +#: ../../c-api/list.rst:206 msgid "" "Sort the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is equivalent to ``list.sort()``." @@ -261,7 +256,7 @@ msgstr "" "*list* の内容をインプレースでソートします。成功した場合には ``0`` を、失敗し" "た場合には ``-1`` を返します。``list.sort()`` と同じです。" -#: ../../c-api/list.rst:209 +#: ../../c-api/list.rst:211 msgid "" "In the :term:`free-threaded build`, element comparison via :meth:`~object." "__lt__` can execute arbitrary Python code, during which the :term:`per-" @@ -269,7 +264,7 @@ msgid "" "class:`int`, :class:`float`), the lock is not released during comparison." msgstr "" -#: ../../c-api/list.rst:218 +#: ../../c-api/list.rst:220 msgid "" "Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is the equivalent of ``list.reverse()``." @@ -277,7 +272,7 @@ msgstr "" "*list* の要素をインプレースで反転します。成功した場合には ``0`` を、失敗した" "場合には ``-1`` を返します。``list.reverse()`` と同じです。" -#: ../../c-api/list.rst:226 +#: ../../c-api/list.rst:228 msgid "" "Return a new tuple object containing the contents of *list*; equivalent to " "``tuple(list)``." @@ -293,7 +288,7 @@ msgstr "object" msgid "list" msgstr "list" -#: ../../c-api/list.rst:51 ../../c-api/list.rst:224 +#: ../../c-api/list.rst:51 ../../c-api/list.rst:226 msgid "built-in function" msgstr "組み込み関数" @@ -301,6 +296,6 @@ msgstr "組み込み関数" msgid "len" msgstr "len" -#: ../../c-api/list.rst:224 +#: ../../c-api/list.rst:226 msgid "tuple" msgstr "tuple" diff --git a/c-api/long.po b/c-api/long.po index 8d5cf31ad..f47892cf3 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-07 15:19+0000\n" +"POT-Creation-Date: 2026-08-29 17:28+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/mapping.po b/c-api/mapping.po index 05c4ca405..a848ea40e 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/marshal.po b/c-api/marshal.po index df7a44cb5..33e3a700f 100644 --- a/c-api/marshal.po +++ b/c-api/marshal.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/memory.po b/c-api/memory.po index 64feb631e..573e0a7af 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/memoryview.po b/c-api/memoryview.po index 9b5e28047..493066e7f 100644 --- a/c-api/memoryview.po +++ b/c-api/memoryview.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/method.po b/c-api/method.po index fd225b8fc..9b2293d79 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/module.po b/c-api/module.po index fd85e1214..17f8eab06 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-17 16:52+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: qqfunc, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -604,7 +604,7 @@ msgid "" "Use :c:func:`PyModule_GetStateSize` to retrieve the size of a given module." msgstr "" -#: ../../c-api/module.rst:468 ../../c-api/module.rst:491 +#: ../../c-api/module.rst:468 msgid "" "Use :c:member:`PyModuleDef.m_size` instead to support previous versions." msgstr "" @@ -632,6 +632,11 @@ msgid "" "c:func:`PyModule_GetState`) is ``NULL``." msgstr "" +#: ../../c-api/module.rst:491 +msgid "" +"Use :c:member:`PyModuleDef.m_traverse` instead to support previous versions." +msgstr "" + #: ../../c-api/module.rst:495 msgid "" ":c:member:`Slot ID ` for a clear function to call during GC " @@ -1232,10 +1237,10 @@ msgstr "" #: ../../c-api/module.rst:977 msgid "" -"Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to " -"*value*. It can be called with a result of function that returns a new " -"reference without bothering to check its result or even saving it to a " -"variable." +"Similar to :c:func:`PyModule_AddObjectRef`, but \":term:`steals `\" a " +"reference to *value* (even on error). It can be called with a result of " +"function that returns a new reference without bothering to check its result " +"or even saving it to a variable." msgstr "" #: ../../c-api/module.rst:984 @@ -1247,8 +1252,8 @@ msgstr "" #: ../../c-api/module.rst:993 msgid "" -"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " -"*value* on success (if it returns ``0``)." +"Similar to :c:func:`PyModule_AddObjectRef`, but :term:`steals ` a " +"reference to *value* on success (if it returns ``0``)." msgstr "" #: ../../c-api/module.rst:996 diff --git a/c-api/monitoring.po b/c-api/monitoring.po index 774ce35e6..d8f79afb2 100644 --- a/c-api/monitoring.po +++ b/c-api/monitoring.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/none.po b/c-api/none.po index a1af843ba..e060ad383 100644 --- a/c-api/none.po +++ b/c-api/none.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/number.po b/c-api/number.po index 16bad68c2..d3b3e5ce1 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/object.po b/c-api/object.po index 153d0f339..f51168236 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/objimpl.po b/c-api/objimpl.po index 0636ffabc..c6b24da20 100644 --- a/c-api/objimpl.po +++ b/c-api/objimpl.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/perfmaps.po b/c-api/perfmaps.po index 7dcc3262d..e7b8b72d0 100644 --- a/c-api/perfmaps.po +++ b/c-api/perfmaps.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/picklebuffer.po b/c-api/picklebuffer.po index 45fc2ae87..ac150b767 100644 --- a/c-api/picklebuffer.po +++ b/c-api/picklebuffer.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-11-17 14:16+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/profiling.po b/c-api/profiling.po index c3d354a1f..566bc89c9 100644 --- a/c-api/profiling.po +++ b/c-api/profiling.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2026-02-25 14:46+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/refcounting.po b/c-api/refcounting.po index e8700d75b..d4723a2ce 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/reflection.po b/c-api/reflection.po index 7a0e82a64..c75d07acc 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/sequence.po b/c-api/sequence.po index b903197b2..ffeff8cc3 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -100,14 +100,9 @@ msgstr "" msgid "" "Assign object *v* to the *i*\\ th element of *o*. Raise an exception and " "return ``-1`` on failure; return ``0`` on success. This is the equivalent " -"of the Python statement ``o[i] = v``. This function *does not* steal a " -"reference to *v*." +"of the Python statement ``o[i] = v``. This function *does not* \":term:" +"`steal`\" a reference to *v*." msgstr "" -"*o* の *i* 番目の要素に *v* を代入します。\n" -"失敗すると、例外を送出し ``-1`` を返します;\n" -"成功すると ``0`` を返します。\n" -"これは Python の文 ``o[i] = v`` と同じです。\n" -"この関数は *v* への参照を *盗み取りません* 。" #: ../../c-api/sequence.rst:72 msgid "" diff --git a/c-api/set.po b/c-api/set.po index 936dbf4f6..c382f1c81 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/slice.po b/c-api/slice.po index ab9b0aa92..b734e9d40 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/stable.po b/c-api/stable.po index 0637fef55..d21d262fb 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/structures.po b/c-api/structures.po index 20ff20610..997ef7a87 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -573,21 +573,15 @@ msgstr "" msgid "" "The method will be passed the type object as the first parameter rather than " "an instance of the type. This is used to create *class methods*, similar to " -"what is created when using the :func:`classmethod` built-in function." +"what is created when using the :deco:`classmethod` built-in decorator." msgstr "" -"メソッドの最初の引数には、型のインスタンスではなく型オブジェクトが渡されま" -"す。このフラグは組み込み関数 :func:`classmethod` を使って生成するのと同じ *ク" -"ラスメソッド (class method)* を生成するために使われます。" #: ../../c-api/structures.rst:465 msgid "" "The method will be passed ``NULL`` as the first parameter rather than an " "instance of the type. This is used to create *static methods*, similar to " -"what is created when using the :func:`staticmethod` built-in function." +"what is created when using the :deco:`staticmethod` built-in decorator." msgstr "" -"メソッドの最初の引数には、型のインスタンスではなく ``NULL`` が渡されます。こ" -"のフラグは、 :func:`staticmethod` を使って生成するのと同じ *静的メソッド " -"(static method)* を生成するために使われます。" #: ../../c-api/structures.rst:469 msgid "" diff --git a/c-api/subinterpreters.po b/c-api/subinterpreters.po index 2f0a3864e..b4e5e1c7b 100644 --- a/c-api/subinterpreters.po +++ b/c-api/subinterpreters.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2026-02-25 14:46+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/synchronization.po b/c-api/synchronization.po index 091864988..12b6343c9 100644 --- a/c-api/synchronization.po +++ b/c-api/synchronization.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2026-02-25 14:46+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/sys.po b/c-api/sys.po index f7e8e4457..9c3301822 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/threads.po b/c-api/threads.po index 3478e525f..afffbccb9 100644 --- a/c-api/threads.po +++ b/c-api/threads.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2026-02-25 14:46+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -340,16 +340,101 @@ msgid ":pep:`788`" msgstr "" #: ../../c-api/threads.rst:248 +msgid "Reusing a thread state across repeated calls" +msgstr "" + +#: ../../c-api/threads.rst:250 +msgid "" +"Creating and destroying a :c:type:`PyThreadState` is not free, and is more " +"expensive on a :term:`free-threaded build`. A foreign thread that calls " +"into the interpreter many times -- for example, a worker thread in a native " +"thread pool -- should avoid creating a fresh thread state on every entry and " +"destroying it on every exit. Instead, set up one thread state when the " +"thread starts (or lazily on its first call into Python), attach and detach " +"it around each call, and tear it down once when the thread exits." +msgstr "" + +#: ../../c-api/threads.rst:258 +msgid "" +"Manage the thread state explicitly with :c:func:`PyThreadState_New`, " +"attaching and detaching it with :c:func:`PyEval_RestoreThread` and :c:func:" +"`PyEval_SaveThread`. This happens in three distinct phases, at different " +"points in the thread's life." +msgstr "" + +#: ../../c-api/threads.rst:263 +msgid "" +"When the thread starts, create one thread state for it. ``interp`` is the " +"target interpreter, captured by the code that created this thread while it " +"held an attached thread state (for example via :c:func:" +"`PyInterpreterState_Get`)::" +msgstr "" + +#: ../../c-api/threads.rst:267 +msgid "PyThreadState *tstate = PyThreadState_New(interp);" +msgstr "" + +#: ../../c-api/threads.rst:269 +msgid "" +"Then, on each call into Python -- which may happen many times over the " +"thread's life -- attach the thread state, make the Python C API calls that " +"require it, and detach again so the thread does not hold the GIL while off " +"doing non-Python work::" +msgstr "" + +#: ../../c-api/threads.rst:274 +msgid "" +"PyEval_RestoreThread(tstate);\n" +"result = CallSomeFunction(); /* your Python C API calls go here */\n" +"PyEval_SaveThread();" +msgstr "" + +#: ../../c-api/threads.rst:278 +msgid "" +"When the thread is finished calling into Python, destroy the thread state " +"once::" +msgstr "" + +#: ../../c-api/threads.rst:280 +msgid "" +"PyEval_RestoreThread(tstate);\n" +"PyThreadState_Clear(tstate);\n" +"PyThreadState_DeleteCurrent();" +msgstr "" + +#: ../../c-api/threads.rst:284 +msgid "" +"The general-purpose entry points for calling in from a foreign thread -- :c:" +"func:`PyThreadState_Ensure` and the older :c:func:`PyGILState_Ensure` -- do " +"*not* guarantee a persistent thread state: their thread-state lifetime is " +"deliberately implementation-defined, so a matched acquire/release pair may " +"create and destroy a thread state each time. Use :c:func:" +"`PyThreadState_New`, as shown here, whenever you specifically want to reuse " +"one thread state across calls." +msgstr "" + +#: ../../c-api/threads.rst:292 +msgid "" +"The code that created the foreign thread must arrange for the shutdown " +"sequence to run before the thread exits, and before :c:func:`Py_FinalizeEx` " +"is called. If interpreter finalization begins first, the shutdown :c:func:" +"`PyEval_RestoreThread` call will hang the thread rather than return (see :" +"ref:`cautions-regarding-runtime-finalization`). If the thread exits without " +"running the shutdown sequence, the thread state is leaked for the remainder " +"of the process." +msgstr "" + +#: ../../c-api/threads.rst:303 msgid "Attaching/detaching thread states" msgstr "" -#: ../../c-api/threads.rst:252 +#: ../../c-api/threads.rst:307 msgid "" "Ensure that the thread has an attached thread state for the interpreter " "protected by *guard*, and thus can safely invoke that interpreter." msgstr "" -#: ../../c-api/threads.rst:256 +#: ../../c-api/threads.rst:311 msgid "" "It is OK to call this function if the thread already has an attached thread " "state, as long as there is a subsequent call to :c:func:" @@ -357,25 +442,25 @@ msgid "" "to this function are permitted)." msgstr "" -#: ../../c-api/threads.rst:261 +#: ../../c-api/threads.rst:316 msgid "" "The function's effect (if any) will be reversed by the matching call to :c:" "func:`PyThreadState_Release`." msgstr "" -#: ../../c-api/threads.rst:264 +#: ../../c-api/threads.rst:319 msgid "" "On error, this function returns ``NULL`` *without* an exception set. Do not " "call :c:func:`!PyThreadState_Release` in this case." msgstr "" -#: ../../c-api/threads.rst:267 +#: ../../c-api/threads.rst:322 msgid "" "On success, this function returns a pointer value that must be passed to the " "matching call to :c:func:`!PyThreadState_Release`." msgstr "" -#: ../../c-api/threads.rst:270 +#: ../../c-api/threads.rst:325 msgid "" "The conditions in which this function creates a new :term:`thread state` are " "considered unstable and implementation-dependent. If you need to control the " @@ -387,13 +472,13 @@ msgid "" "similar state will be retained across Python versions." msgstr "" -#: ../../c-api/threads.rst:281 +#: ../../c-api/threads.rst:336 msgid "" "The exact behavior of whether this function creates a new thread state is " "described below, but be aware that this may change in the future." msgstr "" -#: ../../c-api/threads.rst:284 +#: ../../c-api/threads.rst:339 msgid "" "First, this function checks if an attached thread state is present. If there " "is, this function then checks if the interpreter of that thread state " @@ -402,7 +487,7 @@ msgid "" "``PyThreadState_Ensure`` call and returns." msgstr "" -#: ../../c-api/threads.rst:290 +#: ../../c-api/threads.rst:345 msgid "" "If there is no attached thread state, then this function checks if any " "thread state has been used by the current OS thread. (This is returned by :c:" @@ -411,18 +496,18 @@ msgid "" "re-attached and marked as used." msgstr "" -#: ../../c-api/threads.rst:296 +#: ../../c-api/threads.rst:351 msgid "" "Otherwise, if both of the above cases fail, a new thread state is created " "for *guard*. It is then attached and marked as owned by " "``PyThreadState_Ensure``." msgstr "" -#: ../../c-api/threads.rst:304 +#: ../../c-api/threads.rst:359 msgid "Get an attached thread state for the interpreter referenced by *view*." msgstr "" -#: ../../c-api/threads.rst:306 +#: ../../c-api/threads.rst:361 msgid "" "The behavior and return value are the same as for :c:func:" "`PyThreadState_Ensure`; additionally, if the function succeeds, the " @@ -430,38 +515,38 @@ msgid "" "be released upon the corresponding :c:func:`PyThreadState_Release` call." msgstr "" -#: ../../c-api/threads.rst:316 +#: ../../c-api/threads.rst:371 msgid "" "Undo a :c:func:`PyThreadState_Ensure` or :c:func:" "`PyThreadState_EnsureFromView` call." msgstr "" -#: ../../c-api/threads.rst:319 +#: ../../c-api/threads.rst:374 msgid "" "This must be called exactly once for each successful *Ensure* call, with " "*token* set to that call's return value." msgstr "" -#: ../../c-api/threads.rst:322 +#: ../../c-api/threads.rst:377 msgid "" "The state that was attached before the corresponding *Ensure* call (if any) " "will be attached when :c:func:`PyThreadState_Release` returns." msgstr "" -#: ../../c-api/threads.rst:325 +#: ../../c-api/threads.rst:380 msgid "" "The exact behavior of whether this function deletes a thread state is " "considered unstable and implementation-dependent." msgstr "" -#: ../../c-api/threads.rst:330 +#: ../../c-api/threads.rst:385 msgid "" "Currently, this function will decrement an internal counter on the attached " "thread state. If this counter ever reaches below zero, this function emits a " "fatal error (via :c:func:`Py_FatalError`)." msgstr "" -#: ../../c-api/threads.rst:334 +#: ../../c-api/threads.rst:389 msgid "" "If the attached thread state is owned by ``PyThreadState_Ensure``, then the " "attached thread state will be deallocated and deleted upon the internal " @@ -469,17 +554,17 @@ msgid "" "zero." msgstr "" -#: ../../c-api/threads.rst:342 +#: ../../c-api/threads.rst:397 msgid "" "An opaque token retrieved from a :c:func:`PyThreadState_Ensure` call and " "passed to a corresponding :c:func:`PyThreadState_Release` call." msgstr "" -#: ../../c-api/threads.rst:350 +#: ../../c-api/threads.rst:405 msgid "GIL-state APIs" msgstr "" -#: ../../c-api/threads.rst:352 +#: ../../c-api/threads.rst:407 msgid "" "The following APIs are generally not compatible with subinterpreters and " "will hang the process during interpreter finalization (see :ref:`cautions-" @@ -488,21 +573,21 @@ msgid "" "threads>`." msgstr "" -#: ../../c-api/threads.rst:361 +#: ../../c-api/threads.rst:416 msgid "" "The type of the value returned by :c:func:`PyGILState_Ensure` and passed to :" "c:func:`PyGILState_Release`." msgstr "" -#: ../../c-api/threads.rst:366 +#: ../../c-api/threads.rst:421 msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." msgstr "" -#: ../../c-api/threads.rst:370 +#: ../../c-api/threads.rst:425 msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." msgstr "" -#: ../../c-api/threads.rst:375 +#: ../../c-api/threads.rst:430 msgid "" "Ensure that the current thread is ready to call the Python C API regardless " "of the current state of Python, or of the :term:`attached thread state`. " @@ -515,7 +600,7 @@ msgid "" "is acceptable." msgstr "" -#: ../../c-api/threads.rst:385 +#: ../../c-api/threads.rst:440 msgid "" "The return value is an opaque \"handle\" to the :term:`attached thread " "state` when :c:func:`PyGILState_Ensure` was called, and must be passed to :c:" @@ -525,13 +610,13 @@ msgid "" "to :c:func:`PyGILState_Release`." msgstr "" -#: ../../c-api/threads.rst:392 +#: ../../c-api/threads.rst:447 msgid "" "When the function returns, there will be an :term:`attached thread state` " "and the thread will be able to call arbitrary Python code." msgstr "" -#: ../../c-api/threads.rst:395 +#: ../../c-api/threads.rst:450 msgid "" "This function has no way to return an error. As such, errors are either " "fatal (that is, they send ``SIGABRT`` and crash the process; see :c:func:" @@ -539,14 +624,14 @@ msgid "" "interpreter finalization)." msgstr "" -#: ../../c-api/threads.rst:401 +#: ../../c-api/threads.rst:456 msgid "" "Calling this function when the interpreter is finalizing will infinitely " "hang the thread, which may cause deadlocks. :ref:`cautions-regarding-runtime-" "finalization` for more details." msgstr "" -#: ../../c-api/threads.rst:405 +#: ../../c-api/threads.rst:460 msgid "" "In addition, this function generally does not work with subinterpreters when " "used from foreign threads, because this function has no way of knowing which " @@ -554,20 +639,20 @@ msgid "" "interpreter)." msgstr "" -#: ../../c-api/threads.rst:410 ../../c-api/threads.rst:570 -#: ../../c-api/threads.rst:764 +#: ../../c-api/threads.rst:465 ../../c-api/threads.rst:625 +#: ../../c-api/threads.rst:819 msgid "" "Hangs the current thread, rather than terminating it, if called while the " "interpreter is finalizing." msgstr "" -#: ../../c-api/threads.rst:414 +#: ../../c-api/threads.rst:469 msgid "" "Use :c:func:`PyThreadState_Ensure` or :c:func:`PyThreadState_EnsureFromView` " "instead." msgstr "" -#: ../../c-api/threads.rst:421 +#: ../../c-api/threads.rst:476 msgid "" "Release any resources previously acquired. After this call, Python's state " "will be the same as it was prior to the corresponding :c:func:" @@ -575,7 +660,7 @@ msgid "" "caller, hence the use of the GIL-state API)." msgstr "" -#: ../../c-api/threads.rst:426 +#: ../../c-api/threads.rst:481 msgid "" "Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" "func:`PyGILState_Release` on the same thread." @@ -583,39 +668,39 @@ msgstr "" ":c:func:`PyGILState_Ensure` を呼び出す場合は、必ず同一スレッド内で対応する :" "c:func:`PyGILState_Release` を呼び出してください。" -#: ../../c-api/threads.rst:429 +#: ../../c-api/threads.rst:484 msgid "Use :c:func:`PyThreadState_Release` instead." msgstr "" -#: ../../c-api/threads.rst:435 +#: ../../c-api/threads.rst:490 msgid "" "Get the :term:`thread state` that was most recently :term:`attached " "` for this thread. (If the most recent thread state " "has been deleted, this returns ``NULL``.)" msgstr "" -#: ../../c-api/threads.rst:439 +#: ../../c-api/threads.rst:494 msgid "If the caller has an attached thread state, it is returned." msgstr "" -#: ../../c-api/threads.rst:441 +#: ../../c-api/threads.rst:496 msgid "" "In other terms, this function returns the thread state that will be used by :" "c:func:`PyGILState_Ensure`. If this returns ``NULL``, then " "``PyGILState_Ensure`` will create a new thread state." msgstr "" -#: ../../c-api/threads.rst:445 +#: ../../c-api/threads.rst:500 msgid "This function cannot fail." msgstr "" -#: ../../c-api/threads.rst:447 +#: ../../c-api/threads.rst:502 msgid "" "Use :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked` " "instead." msgstr "" -#: ../../c-api/threads.rst:454 +#: ../../c-api/threads.rst:509 msgid "" "Return ``1`` if the current thread has an :term:`attached thread state` that " "matches the thread state returned by :c:func:" @@ -623,25 +708,25 @@ msgid "" "or it otherwise doesn't match, then this returns ``0``." msgstr "" -#: ../../c-api/threads.rst:459 +#: ../../c-api/threads.rst:514 msgid "" "If the current Python process has ever created a subinterpreter, this " "function will *always* return ``1``." msgstr "" -#: ../../c-api/threads.rst:462 +#: ../../c-api/threads.rst:517 msgid "This is mainly a helper/diagnostic function." msgstr "" -#: ../../c-api/threads.rst:466 +#: ../../c-api/threads.rst:521 msgid "Use ``PyThreadState_GetUnchecked() != NULL`` instead." msgstr "" -#: ../../c-api/threads.rst:473 +#: ../../c-api/threads.rst:528 msgid "Cautions about fork()" msgstr "" -#: ../../c-api/threads.rst:475 +#: ../../c-api/threads.rst:530 msgid "" "Another important thing to note about threads is their behaviour in the face " "of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a " @@ -650,7 +735,7 @@ msgid "" "CPython's runtime." msgstr "" -#: ../../c-api/threads.rst:481 +#: ../../c-api/threads.rst:536 msgid "" "The fact that only the \"current\" thread remains means any locks held by " "other threads will never be released. Python solves this for :func:`os.fork` " @@ -667,7 +752,7 @@ msgid "" "locks, but is not always able to." msgstr "" -#: ../../c-api/threads.rst:496 +#: ../../c-api/threads.rst:551 msgid "" "The fact that all other threads go away also means that CPython's runtime " "state there must be cleaned up properly, which :func:`os.fork` does. This " @@ -680,40 +765,40 @@ msgid "" "called immediately after." msgstr "" -#: ../../c-api/threads.rst:509 +#: ../../c-api/threads.rst:564 msgid "High-level APIs" msgstr "高水準 API" -#: ../../c-api/threads.rst:511 +#: ../../c-api/threads.rst:566 msgid "" "These are the most commonly used types and functions when writing multi-" "threaded C extensions." msgstr "" -#: ../../c-api/threads.rst:517 +#: ../../c-api/threads.rst:572 msgid "" "This data structure represents the state of a single thread. The only " "public data member is:" msgstr "" -#: ../../c-api/threads.rst:522 +#: ../../c-api/threads.rst:577 msgid "This thread's interpreter state." msgstr "" -#: ../../c-api/threads.rst:533 +#: ../../c-api/threads.rst:588 msgid "Deprecated function which does nothing." msgstr "" -#: ../../c-api/threads.rst:535 +#: ../../c-api/threads.rst:590 msgid "" "In Python 3.6 and older, this function created the GIL if it didn't exist." msgstr "" -#: ../../c-api/threads.rst:537 +#: ../../c-api/threads.rst:592 msgid "The function now does nothing." msgstr "" -#: ../../c-api/threads.rst:540 +#: ../../c-api/threads.rst:595 msgid "" "This function is now called by :c:func:`Py_Initialize()`, so you don't have " "to call it yourself anymore." @@ -721,27 +806,27 @@ msgstr "" "この関数は :c:func:`Py_Initialize()` から呼び出されるようになり、わざわざ呼び" "出す必要はもう無くなりました。" -#: ../../c-api/threads.rst:544 +#: ../../c-api/threads.rst:599 msgid "" "This function cannot be called before :c:func:`Py_Initialize()` anymore." msgstr "" "この関数は :c:func:`Py_Initialize()` より前に呼び出すことができなくなりまし" "た。" -#: ../../c-api/threads.rst:554 +#: ../../c-api/threads.rst:609 msgid "" "Detach the :term:`attached thread state` and return it. The thread will have " "no :term:`thread state` upon returning." msgstr "" -#: ../../c-api/threads.rst:560 +#: ../../c-api/threads.rst:615 msgid "" "Set the :term:`attached thread state` to *tstate*. The passed :term:`thread " "state` **should not** be :term:`attached `, otherwise " "deadlock ensues. *tstate* will be attached upon returning." msgstr "" -#: ../../c-api/threads.rst:565 ../../c-api/threads.rst:754 +#: ../../c-api/threads.rst:620 ../../c-api/threads.rst:809 msgid "" "Calling this function from a thread when the runtime is finalizing will hang " "the thread until the program exits, even if the thread was not created by " @@ -749,7 +834,7 @@ msgid "" "details." msgstr "" -#: ../../c-api/threads.rst:576 +#: ../../c-api/threads.rst:631 msgid "" "Return the :term:`attached thread state`. If the thread has no attached " "thread state, (such as when inside of :c:macro:`Py_BEGIN_ALLOW_THREADS` " @@ -757,152 +842,152 @@ msgid "" "``NULL``)." msgstr "" -#: ../../c-api/threads.rst:581 +#: ../../c-api/threads.rst:636 msgid "See also :c:func:`PyThreadState_GetUnchecked`." msgstr "" -#: ../../c-api/threads.rst:585 +#: ../../c-api/threads.rst:640 msgid "" "Similar to :c:func:`PyThreadState_Get`, but don't kill the process with a " "fatal error if it is NULL. The caller is responsible to check if the result " "is NULL." msgstr "" -#: ../../c-api/threads.rst:589 +#: ../../c-api/threads.rst:644 msgid "" "In Python 3.5 to 3.12, the function was private and known as " "``_PyThreadState_UncheckedGet()``." msgstr "" -#: ../../c-api/threads.rst:596 +#: ../../c-api/threads.rst:651 msgid "" "Set the :term:`attached thread state` to *tstate*, and return the :term:" "`thread state` that was attached prior to calling." msgstr "" -#: ../../c-api/threads.rst:599 +#: ../../c-api/threads.rst:654 msgid "" "This function is safe to call without an :term:`attached thread state`; it " "will simply return ``NULL`` indicating that there was no prior thread state." msgstr "" -#: ../../c-api/threads.rst:603 +#: ../../c-api/threads.rst:658 msgid ":c:func:`PyEval_ReleaseThread`" msgstr "" -#: ../../c-api/threads.rst:606 +#: ../../c-api/threads.rst:661 msgid "" "Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " "if the runtime is finalizing." msgstr "" -#: ../../c-api/threads.rst:611 +#: ../../c-api/threads.rst:666 msgid "Low-level APIs" msgstr "低水準 API" -#: ../../c-api/threads.rst:615 +#: ../../c-api/threads.rst:670 msgid "" "Create a new thread state object belonging to the given interpreter object. " "An :term:`attached thread state` is not needed." msgstr "" -#: ../../c-api/threads.rst:620 +#: ../../c-api/threads.rst:675 msgid "" "Reset all information in a :term:`thread state` object. *tstate* must be :" "term:`attached `" msgstr "" -#: ../../c-api/threads.rst:623 +#: ../../c-api/threads.rst:678 msgid "" "This function now calls the :c:member:`!PyThreadState.on_delete` callback. " "Previously, that happened in :c:func:`PyThreadState_Delete`." msgstr "" -#: ../../c-api/threads.rst:627 +#: ../../c-api/threads.rst:682 msgid "The :c:member:`!PyThreadState.on_delete` callback was removed." msgstr "" -#: ../../c-api/threads.rst:633 +#: ../../c-api/threads.rst:688 msgid "" "Destroy a :term:`thread state` object. *tstate* should not be :term:" "`attached ` to any thread. *tstate* must have been " "reset with a previous call to :c:func:`PyThreadState_Clear`." msgstr "" -#: ../../c-api/threads.rst:641 +#: ../../c-api/threads.rst:696 msgid "" "Detach the :term:`attached thread state` (which must have been reset with a " "previous call to :c:func:`PyThreadState_Clear`) and then destroy it." msgstr "" -#: ../../c-api/threads.rst:644 +#: ../../c-api/threads.rst:699 msgid "" "No :term:`thread state` will be :term:`attached ` " "upon returning." msgstr "" -#: ../../c-api/threads.rst:649 +#: ../../c-api/threads.rst:704 msgid "Get the current frame of the Python thread state *tstate*." msgstr "" -#: ../../c-api/threads.rst:651 +#: ../../c-api/threads.rst:706 msgid "" "Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " "executing." msgstr "" -#: ../../c-api/threads.rst:654 +#: ../../c-api/threads.rst:709 msgid "See also :c:func:`PyEval_GetFrame`." msgstr "" -#: ../../c-api/threads.rst:656 ../../c-api/threads.rst:665 -#: ../../c-api/threads.rst:674 +#: ../../c-api/threads.rst:711 ../../c-api/threads.rst:720 +#: ../../c-api/threads.rst:729 msgid "" "*tstate* must not be ``NULL``, and must be :term:`attached `." msgstr "" -#: ../../c-api/threads.rst:663 +#: ../../c-api/threads.rst:718 msgid "" "Get the unique :term:`thread state` identifier of the Python thread state " "*tstate*." msgstr "" -#: ../../c-api/threads.rst:672 +#: ../../c-api/threads.rst:727 msgid "Get the interpreter of the Python thread state *tstate*." msgstr "" -#: ../../c-api/threads.rst:681 +#: ../../c-api/threads.rst:736 msgid "Suspend tracing and profiling in the Python thread state *tstate*." msgstr "" -#: ../../c-api/threads.rst:683 +#: ../../c-api/threads.rst:738 msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." msgstr "" -#: ../../c-api/threads.rst:690 +#: ../../c-api/threads.rst:745 msgid "" "Resume tracing and profiling in the Python thread state *tstate* suspended " "by the :c:func:`PyThreadState_EnterTracing` function." msgstr "" -#: ../../c-api/threads.rst:693 +#: ../../c-api/threads.rst:748 msgid "" "See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." msgstr "" -#: ../../c-api/threads.rst:701 +#: ../../c-api/threads.rst:756 msgid "" "Set the stack protection start address and stack protection size of a Python " "thread state." msgstr "" -#: ../../c-api/threads.rst:704 +#: ../../c-api/threads.rst:759 msgid "" "On success, return ``0``. On failure, set an exception and return ``-1``." msgstr "" -#: ../../c-api/threads.rst:707 +#: ../../c-api/threads.rst:762 msgid "" "CPython implements :ref:`recursion control ` for C code by " "raising :py:exc:`RecursionError` when it notices that the machine execution " @@ -915,31 +1000,31 @@ msgid "" "change." msgstr "" -#: ../../c-api/threads.rst:716 +#: ../../c-api/threads.rst:771 msgid "" "Call :c:func:`~PyUnstable_ThreadState_SetStackProtection` either before or " "after changing the stack. Do not call any other Python C API between the " "call and the stack change." msgstr "" -#: ../../c-api/threads.rst:721 +#: ../../c-api/threads.rst:776 msgid "" "See :c:func:`PyUnstable_ThreadState_ResetStackProtection` for undoing this " "operation." msgstr "" -#: ../../c-api/threads.rst:728 +#: ../../c-api/threads.rst:783 msgid "" "Reset the stack protection start address and stack protection size of a " "Python thread state to the operating system defaults." msgstr "" -#: ../../c-api/threads.rst:731 +#: ../../c-api/threads.rst:786 msgid "" "See :c:func:`PyUnstable_ThreadState_SetStackProtection` for an explanation." msgstr "" -#: ../../c-api/threads.rst:738 +#: ../../c-api/threads.rst:793 msgid "" "Return a dictionary in which extensions can store thread-specific state " "information. Each extension should use a unique key to use to store state " @@ -949,25 +1034,25 @@ msgid "" "thread state is attached." msgstr "" -#: ../../c-api/threads.rst:748 +#: ../../c-api/threads.rst:803 msgid "" ":term:`Attach ` *tstate* to the current thread, which " "must not be ``NULL`` or already :term:`attached `." msgstr "" -#: ../../c-api/threads.rst:751 +#: ../../c-api/threads.rst:806 msgid "" "The calling thread must not already have an :term:`attached thread state`." msgstr "" -#: ../../c-api/threads.rst:759 +#: ../../c-api/threads.rst:814 msgid "" "Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:" "`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the " "current thread if called while the interpreter is finalizing." msgstr "" -#: ../../c-api/threads.rst:768 +#: ../../c-api/threads.rst:823 msgid "" ":c:func:`PyEval_RestoreThread` is a higher-level function which is always " "available (even when threads have not been initialized)." @@ -975,14 +1060,14 @@ msgstr "" ":c:func:`PyEval_RestoreThread` はいつでも (スレッドが初期化されたいないときで" "も) 利用可能な高レベル関数です。" -#: ../../c-api/threads.rst:774 +#: ../../c-api/threads.rst:829 msgid "" "Detach the :term:`attached thread state`. The *tstate* argument, which must " "not be ``NULL``, is only used to check that it represents the :term:" "`attached thread state` --- if it isn't, a fatal error is reported." msgstr "" -#: ../../c-api/threads.rst:779 +#: ../../c-api/threads.rst:834 msgid "" ":c:func:`PyEval_SaveThread` is a higher-level function which is always " "available (even when threads have not been initialized)." @@ -990,11 +1075,11 @@ msgstr "" ":c:func:`PyEval_SaveThread` はより高レベルな関数で常に (スレッドが初期化され" "ていないときでも) 利用できます。" -#: ../../c-api/threads.rst:784 +#: ../../c-api/threads.rst:839 msgid "Asynchronous notifications" msgstr "" -#: ../../c-api/threads.rst:786 +#: ../../c-api/threads.rst:841 msgid "" "A mechanism is provided to make asynchronous notifications to the main " "interpreter thread. These notifications take the form of a function pointer " @@ -1003,7 +1088,7 @@ msgstr "" "インタプリタのメインスレッドに非同期な通知を行うために提供されている仕組みで" "す。これらの通知は関数ポインタと void ポインタ引数という形態を取ります。" -#: ../../c-api/threads.rst:793 +#: ../../c-api/threads.rst:848 msgid "" "Schedule a function to be called from the main interpreter thread. On " "success, ``0`` is returned and *func* is queued for being called in the main " @@ -1013,7 +1098,7 @@ msgstr "" "``0`` が返り、*func* はメインスレッドの呼び出しキューに詰められます。失敗する" "と、例外をセットせずに ``-1`` が返ります。" -#: ../../c-api/threads.rst:797 +#: ../../c-api/threads.rst:852 msgid "" "When successfully queued, *func* will be *eventually* called from the main " "interpreter thread with the argument *arg*. It will be called " @@ -1025,17 +1110,17 @@ msgstr "" "Python コードに対して非同期に呼び出されますが、次の両方の条件に合致したときに" "呼び出されます:" -#: ../../c-api/threads.rst:802 +#: ../../c-api/threads.rst:857 msgid "on a :term:`bytecode` boundary;" msgstr ":term:`bytecode` 境界上にいるとき、" -#: ../../c-api/threads.rst:803 +#: ../../c-api/threads.rst:858 msgid "" "with the main thread holding an :term:`attached thread state` (*func* can " "therefore use the full C API)." msgstr "" -#: ../../c-api/threads.rst:806 +#: ../../c-api/threads.rst:861 msgid "" "*func* must return ``0`` on success, or ``-1`` on failure with an exception " "set. *func* won't be interrupted to perform another asynchronous " @@ -1043,7 +1128,7 @@ msgid "" "if the :term:`thread state ` is detached." msgstr "" -#: ../../c-api/threads.rst:811 +#: ../../c-api/threads.rst:866 msgid "" "This function doesn't need an :term:`attached thread state`. However, to " "call this function in a subinterpreter, the caller must have an :term:" @@ -1051,7 +1136,7 @@ msgid "" "be called from the wrong interpreter." msgstr "" -#: ../../c-api/threads.rst:816 +#: ../../c-api/threads.rst:871 msgid "" "This is a low-level function, only useful for very special cases. There is " "no guarantee that *func* will be called as quick as possible. If the main " @@ -1061,7 +1146,7 @@ msgid "" "`PyThreadState_EnsureFromView`." msgstr "" -#: ../../c-api/threads.rst:825 +#: ../../c-api/threads.rst:880 msgid "" "If this function is called in a subinterpreter, the function *func* is now " "scheduled to be called from the subinterpreter, rather than being called " @@ -1069,48 +1154,48 @@ msgid "" "scheduled calls." msgstr "" -#: ../../c-api/threads.rst:831 +#: ../../c-api/threads.rst:886 msgid "" "This function now always schedules *func* to be run in the main interpreter." msgstr "" -#: ../../c-api/threads.rst:838 +#: ../../c-api/threads.rst:893 msgid "" "Execute all pending calls. This is usually executed automatically by the " "interpreter." msgstr "" -#: ../../c-api/threads.rst:841 +#: ../../c-api/threads.rst:896 msgid "" "This function returns ``0`` on success, and returns ``-1`` with an exception " "set on failure." msgstr "" -#: ../../c-api/threads.rst:844 +#: ../../c-api/threads.rst:899 msgid "" "If this is not called in the main thread of the main interpreter, this " "function does nothing and returns ``0``. The caller must hold an :term:" "`attached thread state`." msgstr "" -#: ../../c-api/threads.rst:850 +#: ../../c-api/threads.rst:905 msgid "This function only runs pending calls in the main interpreter." msgstr "" -#: ../../c-api/threads.rst:856 +#: ../../c-api/threads.rst:911 msgid "" "Schedule an exception to be raised asynchronously in a thread. If the thread " "has a previously scheduled exception, it is overwritten." msgstr "" -#: ../../c-api/threads.rst:859 +#: ../../c-api/threads.rst:914 msgid "" "The *id* argument is the thread id of the target thread, as returned by :c:" "func:`PyThread_get_thread_ident`. *exc* is the class of the exception to be " "raised, or ``NULL`` to clear the pending exception (if any)." msgstr "" -#: ../../c-api/threads.rst:864 +#: ../../c-api/threads.rst:919 msgid "" "Return the number of affected thread states. This is normally ``1`` if *id* " "is found, even when no change was made (the given *exc* was already pending, " @@ -1118,15 +1203,15 @@ msgid "" "found, return ``0``. This raises no exceptions." msgstr "" -#: ../../c-api/threads.rst:870 +#: ../../c-api/threads.rst:925 msgid "" "To prevent naive misuse, you must write your own C extension to call this. " "This function must be called with an :term:`attached thread state`. This " -"function does not steal any references to *exc*. This function does not " -"necessarily interrupt system calls such as :py:func:`~time.sleep`." +"function does not :term:`steal` any references to *exc*. This function does " +"not necessarily interrupt system calls such as :py:func:`~time.sleep`." msgstr "" -#: ../../c-api/threads.rst:876 +#: ../../c-api/threads.rst:931 msgid "" "The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" "`unsigned long`." @@ -1134,105 +1219,105 @@ msgstr "" "*id* 引数の型が :c:expr:`long` から :c:expr:`unsigned long` へ変更されまし" "た。" -#: ../../c-api/threads.rst:882 +#: ../../c-api/threads.rst:937 msgid "Operating system thread APIs" msgstr "" -#: ../../c-api/threads.rst:886 +#: ../../c-api/threads.rst:941 msgid "Sentinel value for an invalid thread ID." msgstr "" -#: ../../c-api/threads.rst:888 +#: ../../c-api/threads.rst:943 msgid "This is currently equivalent to ``(unsigned long)-1``." msgstr "" -#: ../../c-api/threads.rst:893 +#: ../../c-api/threads.rst:948 msgid "" "Start function *func* in a new thread with argument *arg*. The resulting " "thread is not intended to be joined." msgstr "" -#: ../../c-api/threads.rst:896 +#: ../../c-api/threads.rst:951 msgid "*func* must not be ``NULL``, but *arg* may be ``NULL``." msgstr "" -#: ../../c-api/threads.rst:898 +#: ../../c-api/threads.rst:953 msgid "" "On success, this function returns the identifier of the new thread; on " "failure, this returns :c:macro:`PYTHREAD_INVALID_THREAD_ID`." msgstr "" -#: ../../c-api/threads.rst:901 ../../c-api/threads.rst:986 -#: ../../c-api/threads.rst:994 +#: ../../c-api/threads.rst:956 ../../c-api/threads.rst:1041 +#: ../../c-api/threads.rst:1049 msgid "The caller does not need to hold an :term:`attached thread state`." msgstr "" -#: ../../c-api/threads.rst:906 +#: ../../c-api/threads.rst:961 msgid "Return the identifier of the current thread, which will never be zero." msgstr "" -#: ../../c-api/threads.rst:908 ../../c-api/threads.rst:941 +#: ../../c-api/threads.rst:963 ../../c-api/threads.rst:996 msgid "" "This function cannot fail, and the caller does not need to hold an :term:" "`attached thread state`." msgstr "" -#: ../../c-api/threads.rst:912 +#: ../../c-api/threads.rst:967 msgid "" ":py:func:`threading.get_ident` and :py:attr:`threading.Thread.ident` expose " "this identifier to Python." msgstr "" -#: ../../c-api/threads.rst:918 +#: ../../c-api/threads.rst:973 msgid "" "Get general information about the current thread in the form of a :ref:" "`struct sequence ` object. This information is " "accessible as :py:attr:`sys.thread_info` in Python." msgstr "" -#: ../../c-api/threads.rst:922 +#: ../../c-api/threads.rst:977 msgid "" "On success, this returns a new :term:`strong reference` to the thread " "information; on failure, this returns ``NULL`` with an exception set." msgstr "" -#: ../../c-api/threads.rst:925 +#: ../../c-api/threads.rst:980 msgid "The caller must hold an :term:`attached thread state`." msgstr "" -#: ../../c-api/threads.rst:930 +#: ../../c-api/threads.rst:985 msgid "This macro is defined when the system supports native thread IDs." msgstr "" -#: ../../c-api/threads.rst:935 +#: ../../c-api/threads.rst:990 msgid "" "Get the native identifier of the current thread as it was assigned by the " "operating system's kernel, which will never be less than zero." msgstr "" -#: ../../c-api/threads.rst:938 +#: ../../c-api/threads.rst:993 msgid "" "This function is only available when :c:macro:`PY_HAVE_THREAD_NATIVE_ID` is " "defined." msgstr "" -#: ../../c-api/threads.rst:945 +#: ../../c-api/threads.rst:1000 msgid ":py:func:`threading.get_native_id`" msgstr "" -#: ../../c-api/threads.rst:950 +#: ../../c-api/threads.rst:1005 msgid "" "Terminate the current thread. This function is generally considered unsafe " "and should be avoided. It is kept solely for backwards compatibility." msgstr "" -#: ../../c-api/threads.rst:953 +#: ../../c-api/threads.rst:1008 msgid "" "This function is only safe to call if all functions in the full call stack " "are written to safely allow it." msgstr "" -#: ../../c-api/threads.rst:958 +#: ../../c-api/threads.rst:1013 msgid "" "If the current system uses POSIX threads (also known as \"pthreads\"), this " "calls :manpage:`pthread_exit(3)`, which attempts to unwind the stack and " @@ -1241,34 +1326,34 @@ msgid "" "systems, such as macOS, do unwinding." msgstr "" -#: ../../c-api/threads.rst:964 +#: ../../c-api/threads.rst:1019 msgid "" "On Windows, this function calls ``_endthreadex()``, which kills the thread " "without calling C++ destructors." msgstr "" -#: ../../c-api/threads.rst:967 +#: ../../c-api/threads.rst:1022 msgid "In any case, there is a risk of corruption on the thread's stack." msgstr "" -#: ../../c-api/threads.rst:974 +#: ../../c-api/threads.rst:1029 msgid "" "Initialize ``PyThread*`` APIs. Python executes this function automatically, " "so there's little need to call it from an extension module." msgstr "" -#: ../../c-api/threads.rst:980 +#: ../../c-api/threads.rst:1035 msgid "Set the stack size of the current thread to *size* bytes." msgstr "" -#: ../../c-api/threads.rst:982 +#: ../../c-api/threads.rst:1037 msgid "" "This function returns ``0`` on success, ``-1`` if *size* is invalid, or " "``-2`` if the system does not support changing the stack size. This function " "does not set exceptions." msgstr "" -#: ../../c-api/threads.rst:991 +#: ../../c-api/threads.rst:1046 msgid "" "Return the stack size of the current thread in bytes, or ``0`` if the " "system's default stack size is in use." @@ -1310,26 +1395,26 @@ msgstr "" msgid "PyEval_SaveThread (C function)" msgstr "" -#: ../../c-api/threads.rst:527 +#: ../../c-api/threads.rst:582 msgid "PyEval_AcquireThread()" msgstr "PyEval_AcquireThread()" -#: ../../c-api/threads.rst:527 +#: ../../c-api/threads.rst:582 msgid "PyEval_ReleaseThread()" msgstr "PyEval_ReleaseThread()" -#: ../../c-api/threads.rst:527 +#: ../../c-api/threads.rst:582 msgid "PyEval_SaveThread()" msgstr "PyEval_SaveThread()" -#: ../../c-api/threads.rst:527 +#: ../../c-api/threads.rst:582 msgid "PyEval_RestoreThread()" msgstr "PyEval_RestoreThread()" -#: ../../c-api/threads.rst:549 +#: ../../c-api/threads.rst:604 msgid "module" msgstr "module" -#: ../../c-api/threads.rst:549 +#: ../../c-api/threads.rst:604 msgid "_thread" msgstr "_thread" diff --git a/c-api/time.po b/c-api/time.po index 62aa6b848..ee9f47beb 100644 --- a/c-api/time.po +++ b/c-api/time.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: qqfunc, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/tls.po b/c-api/tls.po index d5b15a9b0..75aaa7132 100644 --- a/c-api/tls.po +++ b/c-api/tls.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2026-02-25 14:46+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/tuple.po b/c-api/tuple.po index a337b6792..9e12fab9e 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -142,45 +142,40 @@ msgstr "" #: ../../c-api/tuple.rst:107 msgid "" -"This function \"steals\" a reference to *o* and discards a reference to an " -"item already in the tuple at the affected position." +"This function \":term:`steals `\" a reference to *o* and discards a " +"reference to an item already in the tuple at the affected position (unless " +"it was NULL)." msgstr "" -"この関数は *o* への参照を \"盗み取り\" ます。また、変更先のインデクスにすでに" -"別の要素が入っている場合、その要素に対する参照を放棄します。" -#: ../../c-api/tuple.rst:113 +#: ../../c-api/tuple.rst:114 msgid "" "Like :c:func:`PyTuple_SetItem`, but does no error checking, and should " "*only* be used to fill in brand new tuples, using it on an existing tuple is " "thread-unsafe." msgstr "" -#: ../../c-api/tuple.rst:116 ../../c-api/tuple.rst:243 -#: ../../c-api/tuple.rst:261 +#: ../../c-api/tuple.rst:117 ../../c-api/tuple.rst:244 +#: ../../c-api/tuple.rst:262 msgid "" "Bounds checking is performed as an assertion if Python is built in :ref:" "`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "" -#: ../../c-api/tuple.rst:121 +#: ../../c-api/tuple.rst:122 msgid "" -"This function \"steals\" a reference to *o*, and, unlike :c:func:" -"`PyTuple_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in the tuple at position *pos* will be leaked." +"This function \":term:`steals `\" a reference to *o*, and, unlike :c:" +"func:`PyTuple_SetItem`, does *not* discard a reference to any item that is " +"being replaced; any reference in the tuple at position *pos* will be leaked." msgstr "" -"この関数は *o* への参照を \"盗み取り\" ます。また、 :c:func:" -"`PyTuple_SetItem` と違って、要素の置き換えが生じても置き換えられるオブジェク" -"トへの参照を放棄 *しません* ; その結果、タプル中の位置 *pos* で参照されていた" -"オブジェクトがメモリリークを引き起こします。" -#: ../../c-api/tuple.rst:128 +#: ../../c-api/tuple.rst:129 msgid "" "This macro should *only* be used on tuples that are newly created. Using " "this macro on a tuple that is already in use (or in other words, has a " "refcount > 1) could lead to undefined behavior." msgstr "" -#: ../../c-api/tuple.rst:135 +#: ../../c-api/tuple.rst:136 msgid "" "Can be used to resize a tuple. *newsize* will be the new length of the " "tuple. Because tuples are *supposed* to be immutable, this should only be " @@ -204,24 +199,24 @@ msgstr "" "ます。失敗すると ``-1`` を返し、 ``*p`` を ``NULL`` に設定して、 :exc:" "`MemoryError` または :exc:`SystemError` を送出します。" -#: ../../c-api/tuple.rst:150 +#: ../../c-api/tuple.rst:151 msgid "Struct Sequence Objects" msgstr "Struct Sequence オブジェクト" -#: ../../c-api/tuple.rst:152 +#: ../../c-api/tuple.rst:153 msgid "" "A struct sequence object is a :term:`named tuple`, that is, a sequence whose " "items can also be accessed through attributes. It is similar to :func:" "`collections.namedtuple`, but provides a slightly different interface." msgstr "" -#: ../../c-api/tuple.rst:157 +#: ../../c-api/tuple.rst:158 msgid "" "To create a struct sequence, you first have to create a specific struct " "sequence type." msgstr "" -#: ../../c-api/tuple.rst:162 +#: ../../c-api/tuple.rst:163 msgid "" "Create a new struct sequence type from the data in *desc*, described below. " "Instances of the resulting type can be created with :c:func:" @@ -230,44 +225,44 @@ msgstr "" "後述の *desc* 中のデータから新しい struct sequence 型を生成します。返される型" "のインスタンスは :c:func:`PyStructSequence_New` で生成できます。" -#: ../../c-api/tuple.rst:165 ../../c-api/tuple.rst:234 +#: ../../c-api/tuple.rst:166 ../../c-api/tuple.rst:235 msgid "Return ``NULL`` with an exception set on failure." msgstr "" -#: ../../c-api/tuple.rst:170 +#: ../../c-api/tuple.rst:171 msgid "Initializes a struct sequence type *type* from *desc* in place." msgstr "" "struct sequence 型である *type* を *desc* をもとにその場で初期化します。" -#: ../../c-api/tuple.rst:175 +#: ../../c-api/tuple.rst:176 msgid "" "Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and " "``-1`` with an exception set on failure." msgstr "" -#: ../../c-api/tuple.rst:183 +#: ../../c-api/tuple.rst:184 msgid "Contains the meta information of a struct sequence type to create." msgstr "生成するstruct sequence 型のメタデータを保持します。" -#: ../../c-api/tuple.rst:187 +#: ../../c-api/tuple.rst:188 msgid "" "Fully qualified name of the type; null-terminated UTF-8 encoded. The name " "must contain the module name." msgstr "" -#: ../../c-api/tuple.rst:192 +#: ../../c-api/tuple.rst:193 msgid "Pointer to docstring for the type or ``NULL`` to omit." msgstr "" -#: ../../c-api/tuple.rst:196 +#: ../../c-api/tuple.rst:197 msgid "Pointer to ``NULL``-terminated array with field names of the new type." msgstr "" -#: ../../c-api/tuple.rst:200 +#: ../../c-api/tuple.rst:201 msgid "Number of fields visible to the Python side (if used as tuple)." msgstr "" -#: ../../c-api/tuple.rst:205 +#: ../../c-api/tuple.rst:206 msgid "" "Describes a field of a struct sequence. As a struct sequence is modeled as a " "tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" @@ -276,25 +271,25 @@ msgid "" "described." msgstr "" -#: ../../c-api/tuple.rst:213 +#: ../../c-api/tuple.rst:214 msgid "" "Name for the field or ``NULL`` to end the list of named fields, set to :c:" "data:`PyStructSequence_UnnamedField` to leave unnamed." msgstr "" -#: ../../c-api/tuple.rst:218 +#: ../../c-api/tuple.rst:219 msgid "Field docstring or ``NULL`` to omit." msgstr "" -#: ../../c-api/tuple.rst:223 +#: ../../c-api/tuple.rst:224 msgid "Special value for a field name to leave it unnamed." msgstr "フィールド名を名前がないままするための特殊な値。" -#: ../../c-api/tuple.rst:225 +#: ../../c-api/tuple.rst:226 msgid "The type was changed from ``char *``." msgstr "型が ``char *`` から変更されました。" -#: ../../c-api/tuple.rst:231 +#: ../../c-api/tuple.rst:232 msgid "" "Creates an instance of *type*, which must have been created with :c:func:" "`PyStructSequence_NewType`." @@ -302,22 +297,22 @@ msgstr "" "*type* のインスタンスを生成します。 *type* は :c:func:" "`PyStructSequence_NewType` によって事前に生成していなければなりません。" -#: ../../c-api/tuple.rst:239 +#: ../../c-api/tuple.rst:240 msgid "" "Return the object at position *pos* in the struct sequence pointed to by " "*p*. The returned reference is borrowed from the struct sequence *p* (that " "is: it is only valid as long as you hold a reference to *p*)." msgstr "" -#: ../../c-api/tuple.rst:249 +#: ../../c-api/tuple.rst:250 msgid "Alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: ../../c-api/tuple.rst:251 +#: ../../c-api/tuple.rst:252 msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`." msgstr "" -#: ../../c-api/tuple.rst:257 +#: ../../c-api/tuple.rst:258 msgid "" "Sets the field at index *pos* of the struct sequence *p* to value *o*. " "Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " @@ -327,15 +322,15 @@ msgstr "" "func:`PyTuple_SET_ITEM` のように、生成したてのインスタンスに対してのみ使用す" "べきです。" -#: ../../c-api/tuple.rst:266 -msgid "This function \"steals\" a reference to *o*." -msgstr "この関数は *o* への参照を \"盗み取り\" ます。" +#: ../../c-api/tuple.rst:267 +msgid "This function \":term:`steals `\" a reference to *o*." +msgstr "" -#: ../../c-api/tuple.rst:271 +#: ../../c-api/tuple.rst:272 msgid "Alias to :c:func:`PyStructSequence_SetItem`." msgstr "" -#: ../../c-api/tuple.rst:273 +#: ../../c-api/tuple.rst:274 msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`." msgstr "" diff --git a/c-api/type.po b/c-api/type.po index 0ddb284dc..1e4e197f2 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-19 16:29+0000\n" +"POT-Creation-Date: 2026-08-31 19:47+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -847,7 +847,8 @@ msgstr "" #: ../../c-api/type.rst:641 msgid "" -"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." +"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize` is " +"zero)." msgstr "" #: ../../c-api/type.rst:643 @@ -925,7 +926,7 @@ msgstr "" #: ../../c-api/type.rst:702 msgid "" -"When not targetting older Python versions, pefer :c:macro:`!Py_tp_bases`." +"When not targeting older Python versions, prefer :c:macro:`!Py_tp_bases`." msgstr "" #: ../../c-api/type.rst:704 diff --git a/c-api/typehints.po b/c-api/typehints.po index 1ee36286a..f718eef25 100644 --- a/c-api/typehints.po +++ b/c-api/typehints.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index e1298c025..c2afb88a0 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-19 16:29+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Cheesecake, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1353,17 +1353,17 @@ msgstr "" #: ../../c-api/typeobj.rst:1568 ../../c-api/typeobj.rst:1582 #: ../../c-api/typeobj.rst:1728 ../../c-api/typeobj.rst:1795 #: ../../c-api/typeobj.rst:1831 ../../c-api/typeobj.rst:1858 -#: ../../c-api/typeobj.rst:1883 ../../c-api/typeobj.rst:1898 -#: ../../c-api/typeobj.rst:1915 ../../c-api/typeobj.rst:1931 -#: ../../c-api/typeobj.rst:1963 ../../c-api/typeobj.rst:1995 -#: ../../c-api/typeobj.rst:2023 ../../c-api/typeobj.rst:2043 -#: ../../c-api/typeobj.rst:2072 ../../c-api/typeobj.rst:2118 -#: ../../c-api/typeobj.rst:2137 ../../c-api/typeobj.rst:2179 -#: ../../c-api/typeobj.rst:2204 ../../c-api/typeobj.rst:2244 -#: ../../c-api/typeobj.rst:2269 ../../c-api/typeobj.rst:2282 -#: ../../c-api/typeobj.rst:2292 ../../c-api/typeobj.rst:2309 -#: ../../c-api/typeobj.rst:2326 ../../c-api/typeobj.rst:2342 -#: ../../c-api/typeobj.rst:2486 ../../c-api/typeobj.rst:2546 +#: ../../c-api/typeobj.rst:1884 ../../c-api/typeobj.rst:1899 +#: ../../c-api/typeobj.rst:1916 ../../c-api/typeobj.rst:1932 +#: ../../c-api/typeobj.rst:1964 ../../c-api/typeobj.rst:1996 +#: ../../c-api/typeobj.rst:2024 ../../c-api/typeobj.rst:2044 +#: ../../c-api/typeobj.rst:2073 ../../c-api/typeobj.rst:2119 +#: ../../c-api/typeobj.rst:2138 ../../c-api/typeobj.rst:2180 +#: ../../c-api/typeobj.rst:2205 ../../c-api/typeobj.rst:2245 +#: ../../c-api/typeobj.rst:2270 ../../c-api/typeobj.rst:2283 +#: ../../c-api/typeobj.rst:2293 ../../c-api/typeobj.rst:2310 +#: ../../c-api/typeobj.rst:2327 ../../c-api/typeobj.rst:2343 +#: ../../c-api/typeobj.rst:2487 ../../c-api/typeobj.rst:2547 msgid "**Inheritance:**" msgstr "**継承:**" @@ -1410,9 +1410,9 @@ msgstr "" #: ../../c-api/typeobj.rst:529 ../../c-api/typeobj.rst:818 #: ../../c-api/typeobj.rst:945 ../../c-api/typeobj.rst:1045 #: ../../c-api/typeobj.rst:1067 ../../c-api/typeobj.rst:1860 -#: ../../c-api/typeobj.rst:1885 ../../c-api/typeobj.rst:2025 -#: ../../c-api/typeobj.rst:2045 ../../c-api/typeobj.rst:2120 -#: ../../c-api/typeobj.rst:2246 ../../c-api/typeobj.rst:2488 +#: ../../c-api/typeobj.rst:1886 ../../c-api/typeobj.rst:2026 +#: ../../c-api/typeobj.rst:2046 ../../c-api/typeobj.rst:2121 +#: ../../c-api/typeobj.rst:2247 ../../c-api/typeobj.rst:2489 msgid "This field is inherited by subtypes." msgstr "サブタイプはこのフィールドを継承します。" @@ -1813,7 +1813,7 @@ msgid "" msgstr "" #: ../../c-api/typeobj.rst:822 ../../c-api/typeobj.rst:1739 -#: ../../c-api/typeobj.rst:2501 +#: ../../c-api/typeobj.rst:2502 msgid "" ":ref:`life-cycle` for details about how this slot relates to other slots." msgstr "" @@ -2002,10 +2002,10 @@ msgstr "" #: ../../c-api/typeobj.rst:1069 ../../c-api/typeobj.rst:1096 #: ../../c-api/typeobj.rst:1124 ../../c-api/typeobj.rst:1169 #: ../../c-api/typeobj.rst:1804 ../../c-api/typeobj.rst:1838 -#: ../../c-api/typeobj.rst:1967 ../../c-api/typeobj.rst:2000 -#: ../../c-api/typeobj.rst:2079 ../../c-api/typeobj.rst:2122 -#: ../../c-api/typeobj.rst:2144 ../../c-api/typeobj.rst:2185 -#: ../../c-api/typeobj.rst:2215 ../../c-api/typeobj.rst:2248 +#: ../../c-api/typeobj.rst:1968 ../../c-api/typeobj.rst:2001 +#: ../../c-api/typeobj.rst:2080 ../../c-api/typeobj.rst:2123 +#: ../../c-api/typeobj.rst:2145 ../../c-api/typeobj.rst:2186 +#: ../../c-api/typeobj.rst:2216 ../../c-api/typeobj.rst:2249 msgid "**Default:**" msgstr "**デフォルト**" @@ -3200,17 +3200,13 @@ msgstr "" #: ../../c-api/typeobj.rst:1872 msgid "" -"When the iterator is exhausted, it must return ``NULL``; a :exc:" -"`StopIteration` exception may or may not be set. When another error occurs, " -"it must return ``NULL`` too. Its presence signals that the instances of " -"this type are iterators." +"When the iterator is :term:`exhausted`, the ``tp_iternext`` function must " +"return ``NULL``; a :exc:`StopIteration` exception may or may not be set. " +"When another error occurs, it must return ``NULL`` too. The presence of " +"``tp_iternext`` signals that the instances of this type are iterators." msgstr "" -"イテレータの要素がなくなると、この関数は ``NULL`` を返さなければなりませ" -"ん。 :exc:`StopIteration` 例外は設定してもしなくても良いです。その他のエラー" -"が発生したときも、 ``NULL`` を返さなければなりません。このフィールドがある" -"と、この型のインスタンスがイテレータであることを示します。" -#: ../../c-api/typeobj.rst:1877 +#: ../../c-api/typeobj.rst:1878 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " @@ -3220,11 +3216,11 @@ msgstr "" "ばならず、その関数は (新たなイテレータインスタンスではなく) イテレータインス" "タンス自体を返さねばなりません。" -#: ../../c-api/typeobj.rst:1881 +#: ../../c-api/typeobj.rst:1882 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "この関数のシグネチャは :c:func:`PyIter_Next` と同じです。" -#: ../../c-api/typeobj.rst:1892 +#: ../../c-api/typeobj.rst:1893 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." @@ -3233,7 +3229,7 @@ msgstr "" "type:`PyMethodDef` 構造体からなる、 ``NULL`` で終端された静的な配列を指しま" "す。" -#: ../../c-api/typeobj.rst:1895 +#: ../../c-api/typeobj.rst:1896 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." @@ -3241,7 +3237,7 @@ msgstr "" "配列の各要素ごとに、メソッドデスクリプタの入った、要素が型の辞書 (下記の :c:" "member:`~PyTypeObject.tp_dict` 参照) に追加されます。" -#: ../../c-api/typeobj.rst:1900 +#: ../../c-api/typeobj.rst:1901 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." @@ -3249,7 +3245,7 @@ msgstr "" "サブタイプはこのフィールドを継承しません (メソッドは別個のメカニズムで継承さ" "れています)。" -#: ../../c-api/typeobj.rst:1908 +#: ../../c-api/typeobj.rst:1909 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " @@ -3259,7 +3255,7 @@ msgstr "" "ロット) を宣言している :c:type:`PyMemberDef` 構造体からなる、 ``NULL`` で終端" "された静的な配列を指します。" -#: ../../c-api/typeobj.rst:1912 +#: ../../c-api/typeobj.rst:1913 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." @@ -3267,7 +3263,7 @@ msgstr "" "配列の各要素ごとに、メンバデスクリプタの入った要素が型の辞書 (下記の :c:" "member:`~PyTypeObject.tp_dict` 参照) に追加されます。" -#: ../../c-api/typeobj.rst:1917 +#: ../../c-api/typeobj.rst:1918 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." @@ -3275,7 +3271,7 @@ msgstr "" "サブタイプはこのフィールドを継承しません (メンバは別個のメカニズムで継承され" "ています)。" -#: ../../c-api/typeobj.rst:1925 +#: ../../c-api/typeobj.rst:1926 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " @@ -3285,7 +3281,7 @@ msgstr "" "ている :c:type:`PyGetSetDef` 構造体からなる、 ``NULL`` で終端された静的な配列" "を指します。" -#: ../../c-api/typeobj.rst:1928 +#: ../../c-api/typeobj.rst:1929 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." @@ -3293,7 +3289,7 @@ msgstr "" "配列の各要素ごとに、 getter/setter デスクリプタの入った、要素が型の辞書 (下記" "の :c:member:`~PyTypeObject.tp_dict` 参照) に追加されます。" -#: ../../c-api/typeobj.rst:1933 +#: ../../c-api/typeobj.rst:1934 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." @@ -3301,7 +3297,7 @@ msgstr "" "サブタイプはこのフィールドを継承しません (算出属性は別個のメカニズムで継承さ" "れています)。" -#: ../../c-api/typeobj.rst:1939 +#: ../../c-api/typeobj.rst:1940 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -3313,11 +3309,11 @@ msgstr "" "います; 多重継承はメタタイプの呼び出しによる動的な型オブジェクトの生成を必要" "とします。" -#: ../../c-api/typeobj.rst:1943 +#: ../../c-api/typeobj.rst:1944 msgid "For the corresponding slot ID, see :c:macro:`Py_tp_base`." msgstr "" -#: ../../c-api/typeobj.rst:1949 +#: ../../c-api/typeobj.rst:1950 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -3325,7 +3321,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: ../../c-api/typeobj.rst:1954 +#: ../../c-api/typeobj.rst:1955 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "data:`PyBaseObject_Type` is not required to produce an address constant. " @@ -3333,17 +3329,17 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: ../../c-api/typeobj.rst:1960 +#: ../../c-api/typeobj.rst:1961 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: ../../c-api/typeobj.rst:1965 +#: ../../c-api/typeobj.rst:1966 msgid "This field is not inherited by subtypes (obviously)." msgstr "(当たり前ですが) サブタイプはこのフィールドを継承しません。" -#: ../../c-api/typeobj.rst:1969 +#: ../../c-api/typeobj.rst:1970 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." @@ -3351,12 +3347,12 @@ msgstr "" "このフィールドのデフォルト値は (Python プログラマは :class:`object` 型として" "知っている) ``&PyBaseObject_Type`` になります。" -#: ../../c-api/typeobj.rst:1975 +#: ../../c-api/typeobj.rst:1976 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" "型の辞書は :c:func:`PyType_Ready` によってこのフィールドに収められます。" -#: ../../c-api/typeobj.rst:1977 +#: ../../c-api/typeobj.rst:1978 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " @@ -3367,20 +3363,20 @@ msgid "" "be treated as read-only." msgstr "" -#: ../../c-api/typeobj.rst:1985 +#: ../../c-api/typeobj.rst:1986 msgid "" "Some types may not store their dictionary in this slot. Use :c:func:" "`PyType_GetDict` to retrieve the dictionary for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1991 +#: ../../c-api/typeobj.rst:1992 msgid "" "Internals detail: For static builtin types, this is always ``NULL``. " "Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" "func:`PyType_GetDict` to get the dict for an arbitrary type." msgstr "" -#: ../../c-api/typeobj.rst:1997 +#: ../../c-api/typeobj.rst:1998 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." @@ -3388,13 +3384,13 @@ msgstr "" "サブタイプはこのフィールドを継承しません (が、この辞書内で定義されている属性" "は異なるメカニズムで継承されます)。" -#: ../../c-api/typeobj.rst:2002 +#: ../../c-api/typeobj.rst:2003 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: ../../c-api/typeobj.rst:2007 +#: ../../c-api/typeobj.rst:2008 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." @@ -3402,42 +3398,42 @@ msgstr "" ":c:member:`~PyTypeObject.tp_dict` に :c:func:`PyDict_SetItem` を使ったり、辞" "書 C-API で編集するのは安全ではありません。" -#: ../../c-api/typeobj.rst:2015 +#: ../../c-api/typeobj.rst:2016 msgid "An optional pointer to a \"descriptor get\" function." msgstr "オプションのポインタで、デスクリプタの get 関数を指します。" -#: ../../c-api/typeobj.rst:2017 ../../c-api/typeobj.rst:2035 -#: ../../c-api/typeobj.rst:2101 ../../c-api/typeobj.rst:2133 -#: ../../c-api/typeobj.rst:2158 +#: ../../c-api/typeobj.rst:2018 ../../c-api/typeobj.rst:2036 +#: ../../c-api/typeobj.rst:2102 ../../c-api/typeobj.rst:2134 +#: ../../c-api/typeobj.rst:2159 msgid "The function signature is::" msgstr "関数のシグネチャは次のとおりです ::" -#: ../../c-api/typeobj.rst:2019 +#: ../../c-api/typeobj.rst:2020 msgid "PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);" msgstr "" -#: ../../c-api/typeobj.rst:2032 +#: ../../c-api/typeobj.rst:2033 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" "オプションのポインタで、デスクリプタの値の設定と削除を行う関数を指します。" -#: ../../c-api/typeobj.rst:2037 +#: ../../c-api/typeobj.rst:2038 msgid "int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value);" msgstr "" -#: ../../c-api/typeobj.rst:2039 +#: ../../c-api/typeobj.rst:2040 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "値を削除するには、*value* 引数に ``NULL`` を設定します。" -#: ../../c-api/typeobj.rst:2050 +#: ../../c-api/typeobj.rst:2051 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " "should be used instead, if at all possible." msgstr "" -#: ../../c-api/typeobj.rst:2053 +#: ../../c-api/typeobj.rst:2054 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -3449,7 +3445,7 @@ msgstr "" "オフセットが入ります; このオフセット値は :c:func:`PyObject_GenericGetAttr` が" "使います。" -#: ../../c-api/typeobj.rst:2058 +#: ../../c-api/typeobj.rst:2059 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." @@ -3457,13 +3453,13 @@ msgstr "" "このフィールドを :c:member:`~PyTypeObject.tp_dict` と混同しないようにしてくだ" "さい; これは型オブジェクト自身の属性の辞書です。" -#: ../../c-api/typeobj.rst:2061 +#: ../../c-api/typeobj.rst:2062 msgid "" "The value specifies the offset of the dictionary from the start of the " "instance structure." msgstr "" -#: ../../c-api/typeobj.rst:2063 +#: ../../c-api/typeobj.rst:2064 msgid "" "The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" "only. To get the pointer to the dictionary call :c:func:" @@ -3472,13 +3468,13 @@ msgid "" "to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" -#: ../../c-api/typeobj.rst:2069 +#: ../../c-api/typeobj.rst:2070 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and :c:" "member:`~PyTypeObject.tp_dictoffset`." msgstr "" -#: ../../c-api/typeobj.rst:2074 +#: ../../c-api/typeobj.rst:2075 msgid "" "This field is inherited by subtypes. A subtype should not override this " "offset; doing so could be unsafe, if C code tries to access the dictionary " @@ -3486,25 +3482,25 @@ msgid "" "`Py_TPFLAGS_MANAGED_DICT`." msgstr "" -#: ../../c-api/typeobj.rst:2081 +#: ../../c-api/typeobj.rst:2082 msgid "" "This slot has no default. For :ref:`static types `, if the " "field is ``NULL`` then no :attr:`~object.__dict__` gets created for " "instances." msgstr "" -#: ../../c-api/typeobj.rst:2084 +#: ../../c-api/typeobj.rst:2085 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject.tp_dictoffset` " "will be set to ``-1``, to indicate that it is unsafe to use this field." msgstr "" -#: ../../c-api/typeobj.rst:2094 +#: ../../c-api/typeobj.rst:2095 msgid "An optional pointer to an instance initialization function." msgstr "オプションのポインタで、インスタンス初期化関数を指します。" -#: ../../c-api/typeobj.rst:2096 +#: ../../c-api/typeobj.rst:2097 msgid "" "This function corresponds to the :meth:`~object.__init__` method of " "classes. Like :meth:`!__init__`, it is possible to create an instance " @@ -3512,18 +3508,18 @@ msgid "" "instance by calling its :meth:`!__init__` method again." msgstr "" -#: ../../c-api/typeobj.rst:2103 +#: ../../c-api/typeobj.rst:2104 msgid "int tp_init(PyObject *self, PyObject *args, PyObject *kwds);" msgstr "" -#: ../../c-api/typeobj.rst:2105 +#: ../../c-api/typeobj.rst:2106 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" "`~object.__init__`." msgstr "" -#: ../../c-api/typeobj.rst:2109 +#: ../../c-api/typeobj.rst:2110 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -3542,53 +3538,53 @@ msgstr "" "`~PyTypeObject.tp_new` が元の型のサブタイプのインスタンスを返す場合、サブタイ" "プの :c:member:`~PyTypeObject.tp_init` が呼び出されます。" -#: ../../c-api/typeobj.rst:2116 +#: ../../c-api/typeobj.rst:2117 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" "成功のときには ``0`` を、エラー時には例外をセットして ``-1`` を返します。" -#: ../../c-api/typeobj.rst:2124 +#: ../../c-api/typeobj.rst:2125 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" -#: ../../c-api/typeobj.rst:2131 +#: ../../c-api/typeobj.rst:2132 msgid "An optional pointer to an instance allocation function." msgstr "オプションのポインタで、インスタンスのメモリ確保関数を指します。" -#: ../../c-api/typeobj.rst:2135 +#: ../../c-api/typeobj.rst:2136 msgid "PyObject *tp_alloc(PyTypeObject *self, Py_ssize_t nitems);" msgstr "" -#: ../../c-api/typeobj.rst:2139 +#: ../../c-api/typeobj.rst:2140 msgid "" "Static subtypes inherit this slot, which will be :c:func:" "`PyType_GenericAlloc` if inherited from :class:`object`." msgstr "" -#: ../../c-api/typeobj.rst:2142 ../../c-api/typeobj.rst:2213 +#: ../../c-api/typeobj.rst:2143 ../../c-api/typeobj.rst:2214 msgid ":ref:`Heap subtypes ` do not inherit this slot." msgstr "" -#: ../../c-api/typeobj.rst:2146 +#: ../../c-api/typeobj.rst:2147 msgid "" "For heap subtypes, this field is always set to :c:func:`PyType_GenericAlloc`." msgstr "" -#: ../../c-api/typeobj.rst:2149 ../../c-api/typeobj.rst:2221 +#: ../../c-api/typeobj.rst:2150 ../../c-api/typeobj.rst:2222 msgid "For static subtypes, this slot is inherited (see above)." msgstr "" -#: ../../c-api/typeobj.rst:2156 +#: ../../c-api/typeobj.rst:2157 msgid "An optional pointer to an instance creation function." msgstr "オプションのポインタで、インスタンス生成関数を指します。" -#: ../../c-api/typeobj.rst:2160 +#: ../../c-api/typeobj.rst:2161 msgid "" "PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds);" msgstr "" -#: ../../c-api/typeobj.rst:2162 +#: ../../c-api/typeobj.rst:2163 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -3601,7 +3597,7 @@ msgstr "" "`~PyTypeObject.tp_new` 関数を呼び出すときに使う型と同じである必要はないことに" "注意してください; その型の (無関係ではない) サブタイプのこともあります。" -#: ../../c-api/typeobj.rst:2168 +#: ../../c-api/typeobj.rst:2169 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -3620,13 +3616,13 @@ msgstr "" "tp_new` で行い、一方、変更可能な型ではほとんどの初期化を :c:member:" "`~PyTypeObject.tp_init` に回すべきです。" -#: ../../c-api/typeobj.rst:2176 +#: ../../c-api/typeobj.rst:2177 msgid "" "Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " "creating instances of the type in Python." msgstr "" -#: ../../c-api/typeobj.rst:2181 +#: ../../c-api/typeobj.rst:2182 msgid "" "This field is inherited by subtypes, except it is not inherited by :ref:" "`static types ` whose :c:member:`~PyTypeObject.tp_base` is " @@ -3636,7 +3632,7 @@ msgstr "" "`~PyTypeObject.tp_base` が ``NULL`` か ``&PyBaseObject_Type`` になっている :" "ref:`静的な型 ` では継承しません。" -#: ../../c-api/typeobj.rst:2187 +#: ../../c-api/typeobj.rst:2188 msgid "" "For :ref:`static types ` this field has no default. This means " "if the slot is defined as ``NULL``, the type cannot be called to create new " @@ -3644,24 +3640,24 @@ msgid "" "factory function." msgstr "" -#: ../../c-api/typeobj.rst:2197 +#: ../../c-api/typeobj.rst:2198 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" "オプションのポインタで、インスタンスのメモリ解放関数を指します。シグネチャは" "以下の通りです::" -#: ../../c-api/typeobj.rst:2199 +#: ../../c-api/typeobj.rst:2200 msgid "void tp_free(void *self);" msgstr "" -#: ../../c-api/typeobj.rst:2201 +#: ../../c-api/typeobj.rst:2202 msgid "" "This function must free the memory allocated by :c:member:`~PyTypeObject." "tp_alloc`." msgstr "" -#: ../../c-api/typeobj.rst:2206 +#: ../../c-api/typeobj.rst:2207 msgid "" "Static subtypes inherit this slot, which will be :c:func:`PyObject_Free` if " "inherited from :class:`object`. Exception: If the type supports garbage " @@ -3670,19 +3666,19 @@ msgid "" "this slot is not inherited but instead defaults to :c:func:`PyObject_GC_Del`." msgstr "" -#: ../../c-api/typeobj.rst:2217 +#: ../../c-api/typeobj.rst:2218 msgid "" "For :ref:`heap subtypes `, this slot defaults to a deallocator " "suitable to match :c:func:`PyType_GenericAlloc` and the value of the :c:" "macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" -#: ../../c-api/typeobj.rst:2228 +#: ../../c-api/typeobj.rst:2229 msgid "An optional pointer to a function called by the garbage collector." msgstr "" "オプションのポインタで、ガベージコレクタから呼び出される関数を指します。" -#: ../../c-api/typeobj.rst:2230 +#: ../../c-api/typeobj.rst:2231 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " @@ -3694,11 +3690,11 @@ msgid "" "instance. The signature is::" msgstr "" -#: ../../c-api/typeobj.rst:2238 +#: ../../c-api/typeobj.rst:2239 msgid "int tp_is_gc(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:2240 +#: ../../c-api/typeobj.rst:2241 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" "`PyType_Type`, defines this function to distinguish between statically and :" @@ -3708,40 +3704,40 @@ msgstr "" "`PyType_Type` は、型のメモリ確保が静的か :ref:`動的 ` かを区別す" "るためにこの関数を定義しています。)" -#: ../../c-api/typeobj.rst:2250 +#: ../../c-api/typeobj.rst:2251 msgid "" "This slot has no default. If this field is ``NULL``, :c:macro:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: ../../c-api/typeobj.rst:2256 +#: ../../c-api/typeobj.rst:2257 msgid "Tuple of base types." msgstr "基底型からなるタプルです。" -#: ../../c-api/typeobj.rst:2258 ../../c-api/typeobj.rst:2279 +#: ../../c-api/typeobj.rst:2259 ../../c-api/typeobj.rst:2280 msgid "" "This field should be set to ``NULL`` and treated as read-only. Python will " "fill it in when the type is :c:func:`initialized `." msgstr "" -#: ../../c-api/typeobj.rst:2261 +#: ../../c-api/typeobj.rst:2262 msgid "For the corresponding slot ID, see :c:macro:`Py_tp_bases`." msgstr "" -#: ../../c-api/typeobj.rst:2265 +#: ../../c-api/typeobj.rst:2266 msgid "" "Multiple inheritance does not work well for statically defined types. If you " "set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " "will only be inherited from the first base." msgstr "" -#: ../../c-api/typeobj.rst:2271 ../../c-api/typeobj.rst:2294 -#: ../../c-api/typeobj.rst:2311 ../../c-api/typeobj.rst:2328 -#: ../../c-api/typeobj.rst:2344 +#: ../../c-api/typeobj.rst:2272 ../../c-api/typeobj.rst:2295 +#: ../../c-api/typeobj.rst:2312 ../../c-api/typeobj.rst:2329 +#: ../../c-api/typeobj.rst:2345 msgid "This field is not inherited." msgstr "このフィールドは継承されません。" -#: ../../c-api/typeobj.rst:2276 +#: ../../c-api/typeobj.rst:2277 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." @@ -3750,7 +3746,7 @@ msgstr "" "じまり、 :class:`object` で終わります。メソッド解決順序 (Method Resolution " "Order) に従って並んでいます。" -#: ../../c-api/typeobj.rst:2284 +#: ../../c-api/typeobj.rst:2285 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." @@ -3758,34 +3754,34 @@ msgstr "" "このフィールドは継承されません; フィールドの値は :c:func:`PyType_Ready` で毎" "回計算されます。" -#: ../../c-api/typeobj.rst:2290 +#: ../../c-api/typeobj.rst:2291 msgid "Unused. Internal use only." msgstr "未使用のフィールドです。内部でのみ利用されます。" -#: ../../c-api/typeobj.rst:2299 +#: ../../c-api/typeobj.rst:2300 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" -#: ../../c-api/typeobj.rst:2301 +#: ../../c-api/typeobj.rst:2302 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~type." "__subclasses__`." msgstr "" -#: ../../c-api/typeobj.rst:2306 +#: ../../c-api/typeobj.rst:2307 msgid "" "For some types, this field does not hold a valid :c:expr:`PyObject*`. The " "type was changed to :c:expr:`void*` to indicate this." msgstr "" -#: ../../c-api/typeobj.rst:2316 +#: ../../c-api/typeobj.rst:2317 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "この型オブジェクトに対する弱参照からなるリストの先頭です。" -#: ../../c-api/typeobj.rst:2321 +#: ../../c-api/typeobj.rst:2322 msgid "" "Internals detail: For the static builtin types this is always ``NULL``, even " "if weakrefs are added. Instead, the weakrefs for each are stored on " @@ -3793,31 +3789,31 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" -#: ../../c-api/typeobj.rst:2335 +#: ../../c-api/typeobj.rst:2336 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" "このフィールドは廃止されました。:c:member:`~PyTypeObject.tp_finalize` を代わ" "りに利用してください。" -#: ../../c-api/typeobj.rst:2340 +#: ../../c-api/typeobj.rst:2341 msgid "Used to index into the method cache. Internal use only." msgstr "" "メソッドキャッシュへのインデックスとして使われます。内部使用だけのための関数" "です。" -#: ../../c-api/typeobj.rst:2351 +#: ../../c-api/typeobj.rst:2352 msgid "" "An optional pointer to an instance finalization function. This is the C " "implementation of the :meth:`~object.__del__` special method. Its signature " "is::" msgstr "" -#: ../../c-api/typeobj.rst:2355 +#: ../../c-api/typeobj.rst:2356 msgid "void tp_finalize(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:2357 +#: ../../c-api/typeobj.rst:2358 msgid "" "The primary purpose of finalization is to perform any non-trivial cleanup " "that must be performed before the object is destroyed, while the object and " @@ -3825,7 +3821,7 @@ msgid "" "consistent state. The finalizer is allowed to execute arbitrary Python code." msgstr "" -#: ../../c-api/typeobj.rst:2363 +#: ../../c-api/typeobj.rst:2364 msgid "" "Before Python automatically finalizes an object, some of the object's direct " "or indirect referents might have themselves been automatically finalized. " @@ -3833,14 +3829,14 @@ msgid "" "member:`~PyTypeObject.tp_clear`) yet." msgstr "" -#: ../../c-api/typeobj.rst:2368 +#: ../../c-api/typeobj.rst:2369 msgid "" "Other non-finalized objects might still be using a finalized object, so the " "finalizer must leave the object in a sane state (e.g., invariants are still " "met)." msgstr "" -#: ../../c-api/typeobj.rst:2374 +#: ../../c-api/typeobj.rst:2375 msgid "" "After Python automatically finalizes an object, Python might start " "automatically clearing (:c:member:`~PyTypeObject.tp_clear`) the object and " @@ -3849,7 +3845,7 @@ msgid "" "cleared referents." msgstr "" -#: ../../c-api/typeobj.rst:2382 +#: ../../c-api/typeobj.rst:2383 msgid "" "An object is not guaranteed to be automatically finalized before its " "destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called. It is " @@ -3858,25 +3854,25 @@ msgid "" "finalized before destruction." msgstr "" -#: ../../c-api/typeobj.rst:2390 +#: ../../c-api/typeobj.rst:2391 msgid "" "The :c:member:`~PyTypeObject.tp_finalize` function can be called from any " "thread, although the :term:`GIL` will be held." msgstr "" -#: ../../c-api/typeobj.rst:2395 +#: ../../c-api/typeobj.rst:2396 msgid "" "The :c:member:`!tp_finalize` function can be called during shutdown, after " "some global variables have been deleted. See the documentation of the :meth:" "`~object.__del__` method for details." msgstr "" -#: ../../c-api/typeobj.rst:2399 +#: ../../c-api/typeobj.rst:2400 msgid "" "When Python finalizes an object, it behaves like the following algorithm:" msgstr "" -#: ../../c-api/typeobj.rst:2401 +#: ../../c-api/typeobj.rst:2402 msgid "" "Python might mark the object as *finalized*. Currently, Python always marks " "objects whose type supports garbage collection (i.e., the :c:macro:" @@ -3884,13 +3880,13 @@ msgid "" "never marks other types of objects; this might change in a future version." msgstr "" -#: ../../c-api/typeobj.rst:2406 +#: ../../c-api/typeobj.rst:2407 msgid "" "If the object is not marked as *finalized* and its :c:member:`!tp_finalize` " "finalizer function is non-``NULL``, the finalizer function is called." msgstr "" -#: ../../c-api/typeobj.rst:2409 +#: ../../c-api/typeobj.rst:2410 msgid "" "If the finalizer function was called and the finalizer made the object " "reachable (i.e., there is a reference to the object and it is not a member " @@ -3900,7 +3896,7 @@ msgid "" "make it reachable, i.e., the object is (still) a member of a cyclic isolate." msgstr "" -#: ../../c-api/typeobj.rst:2416 +#: ../../c-api/typeobj.rst:2417 msgid "" "If the finalizer resurrected the object, the object's pending destruction is " "canceled and the object's *finalized* mark might be removed if present. " @@ -3908,7 +3904,7 @@ msgid "" "future version." msgstr "" -#: ../../c-api/typeobj.rst:2421 +#: ../../c-api/typeobj.rst:2422 msgid "" "*Automatic finalization* refers to any finalization performed by Python " "except via calls to :c:func:`PyObject_CallFinalizer` or :c:func:" @@ -3916,14 +3912,14 @@ msgid "" "or how often an object is automatically finalized, except:" msgstr "" -#: ../../c-api/typeobj.rst:2426 +#: ../../c-api/typeobj.rst:2427 msgid "" "Python will not automatically finalize an object if it is reachable, i.e., " "there is a reference to it and it is not a member of a :term:`cyclic " "isolate`." msgstr "" -#: ../../c-api/typeobj.rst:2429 +#: ../../c-api/typeobj.rst:2430 msgid "" "Python will not automatically finalize an object if finalizing it would not " "mark the object as *finalized*. Currently, this applies to objects whose " @@ -3933,53 +3929,53 @@ msgid "" "`PyObject_CallFinalizerFromDealloc`." msgstr "" -#: ../../c-api/typeobj.rst:2435 +#: ../../c-api/typeobj.rst:2436 msgid "" "Python will not automatically finalize any two members of a :term:`cyclic " "isolate` concurrently." msgstr "" -#: ../../c-api/typeobj.rst:2437 +#: ../../c-api/typeobj.rst:2438 msgid "" "Python will not automatically finalize an object after it has automatically " "cleared (:c:member:`~PyTypeObject.tp_clear`) the object." msgstr "" -#: ../../c-api/typeobj.rst:2439 +#: ../../c-api/typeobj.rst:2440 msgid "" "If an object is a member of a :term:`cyclic isolate`, Python will not " "automatically finalize it after automatically clearing (see :c:member:" "`~PyTypeObject.tp_clear`) any other member." msgstr "" -#: ../../c-api/typeobj.rst:2442 +#: ../../c-api/typeobj.rst:2443 msgid "" "Python will automatically finalize every member of a :term:`cyclic isolate` " "before it automatically clears (see :c:member:`~PyTypeObject.tp_clear`) any " "of them." msgstr "" -#: ../../c-api/typeobj.rst:2445 +#: ../../c-api/typeobj.rst:2446 msgid "" "If Python is going to automatically clear an object (:c:member:" "`~PyTypeObject.tp_clear`), it will automatically finalize the object first." msgstr "" -#: ../../c-api/typeobj.rst:2449 +#: ../../c-api/typeobj.rst:2450 msgid "" "Python currently only automatically finalizes objects that are members of a :" "term:`cyclic isolate`, but future versions might finalize objects regularly " "before their destruction." msgstr "" -#: ../../c-api/typeobj.rst:2453 +#: ../../c-api/typeobj.rst:2454 msgid "" "To manually finalize an object, do not call this function directly; call :c:" "func:`PyObject_CallFinalizer` or :c:func:`PyObject_CallFinalizerFromDealloc` " "instead." msgstr "" -#: ../../c-api/typeobj.rst:2457 +#: ../../c-api/typeobj.rst:2458 msgid "" ":c:member:`~PyTypeObject.tp_finalize` should leave the current exception " "status unchanged. The recommended way to write a non-trivial finalizer is " @@ -3990,7 +3986,7 @@ msgid "" "`PyErr_WriteUnraisable` or :c:func:`PyErr_FormatUnraisable`. For example::" msgstr "" -#: ../../c-api/typeobj.rst:2466 +#: ../../c-api/typeobj.rst:2467 msgid "" "static void\n" "foo_finalize(PyObject *self)\n" @@ -4013,26 +4009,26 @@ msgid "" "}" msgstr "" -#: ../../c-api/typeobj.rst:2494 +#: ../../c-api/typeobj.rst:2495 msgid "" "Before version 3.8 it was necessary to set the :c:macro:" "`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " "This is no longer required." msgstr "" -#: ../../c-api/typeobj.rst:2500 +#: ../../c-api/typeobj.rst:2501 msgid ":pep:`442`: \"Safe object finalization\"" msgstr "" -#: ../../c-api/typeobj.rst:2503 +#: ../../c-api/typeobj.rst:2504 msgid ":c:func:`PyObject_CallFinalizer`" msgstr "" -#: ../../c-api/typeobj.rst:2504 +#: ../../c-api/typeobj.rst:2505 msgid ":c:func:`PyObject_CallFinalizerFromDealloc`" msgstr "" -#: ../../c-api/typeobj.rst:2511 +#: ../../c-api/typeobj.rst:2512 msgid "" "A :ref:`vectorcall function ` to use for calls of this type " "object (rather than instances). In other words, ``tp_vectorcall`` can be " @@ -4040,13 +4036,13 @@ msgid "" "of *type*." msgstr "" -#: ../../c-api/typeobj.rst:2516 +#: ../../c-api/typeobj.rst:2517 msgid "" "As with any vectorcall function, if ``tp_vectorcall`` is ``NULL``, the " "*tp_call* protocol (``Py_TYPE(type)->tp_call``) is used instead." msgstr "" -#: ../../c-api/typeobj.rst:2521 +#: ../../c-api/typeobj.rst:2522 msgid "" "The :ref:`vectorcall protocol ` requires that the vectorcall " "function has the same behavior as the corresponding ``tp_call``. This means " @@ -4054,27 +4050,27 @@ msgid "" ">tp_call``." msgstr "" -#: ../../c-api/typeobj.rst:2526 +#: ../../c-api/typeobj.rst:2527 msgid "" "Specifically, if *type* uses the default metaclass, ``type->tp_vectorcall`` " "must behave the same as :c:expr:`PyType_Type->tp_call`, which:" msgstr "" -#: ../../c-api/typeobj.rst:2530 +#: ../../c-api/typeobj.rst:2531 msgid "calls ``type->tp_new``," msgstr "" -#: ../../c-api/typeobj.rst:2532 +#: ../../c-api/typeobj.rst:2533 msgid "" "if the result is a subclass of *type*, calls ``type->tp_init`` on the result " "of ``tp_new``, and" msgstr "" -#: ../../c-api/typeobj.rst:2535 +#: ../../c-api/typeobj.rst:2536 msgid "returns the result of ``tp_new``." msgstr "" -#: ../../c-api/typeobj.rst:2537 +#: ../../c-api/typeobj.rst:2538 msgid "" "Typically, ``tp_vectorcall`` is overridden to optimize this process for " "specific :c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject." @@ -4083,66 +4079,66 @@ msgid "" "__init__`, respectively)." msgstr "" -#: ../../c-api/typeobj.rst:2548 +#: ../../c-api/typeobj.rst:2549 msgid "This field is never inherited." msgstr "このフィールドは決して継承されません。" -#: ../../c-api/typeobj.rst:2550 +#: ../../c-api/typeobj.rst:2551 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" "(このフィールドは3.8から存在していますが、3.9以降でしか利用できません)" -#: ../../c-api/typeobj.rst:2555 +#: ../../c-api/typeobj.rst:2556 msgid "Internal. Do not use." msgstr "" -#: ../../c-api/typeobj.rst:2563 +#: ../../c-api/typeobj.rst:2564 msgid "Static Types" msgstr "" -#: ../../c-api/typeobj.rst:2565 +#: ../../c-api/typeobj.rst:2566 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" -#: ../../c-api/typeobj.rst:2569 +#: ../../c-api/typeobj.rst:2570 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: ../../c-api/typeobj.rst:2571 +#: ../../c-api/typeobj.rst:2572 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: ../../c-api/typeobj.rst:2573 +#: ../../c-api/typeobj.rst:2574 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: ../../c-api/typeobj.rst:2575 +#: ../../c-api/typeobj.rst:2576 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: ../../c-api/typeobj.rst:2579 +#: ../../c-api/typeobj.rst:2580 msgid "" "Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " "` as an opaque struct, any extension modules using static " "types must be compiled for a specific Python minor version." msgstr "" -#: ../../c-api/typeobj.rst:2587 +#: ../../c-api/typeobj.rst:2588 msgid "Heap Types" msgstr "" -#: ../../c-api/typeobj.rst:2589 +#: ../../c-api/typeobj.rst:2590 msgid "" "An alternative to :ref:`static types ` is *heap-allocated " "types*, or *heap types* for short, which correspond closely to classes " @@ -4150,18 +4146,18 @@ msgid "" "`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" -#: ../../c-api/typeobj.rst:2594 +#: ../../c-api/typeobj.rst:2595 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" "func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" "`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." msgstr "" -#: ../../c-api/typeobj.rst:2602 +#: ../../c-api/typeobj.rst:2603 msgid "Number Object Structures" msgstr "数値オブジェクト構造体" -#: ../../c-api/typeobj.rst:2606 +#: ../../c-api/typeobj.rst:2607 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " @@ -4172,11 +4168,11 @@ msgstr "" "以下のそれぞれの関数は :ref:`number` で解説されている似た名前の関数から利用さ" "れます。" -#: ../../c-api/typeobj.rst:2612 ../../c-api/typeobj.rst:3084 +#: ../../c-api/typeobj.rst:2613 ../../c-api/typeobj.rst:3085 msgid "Here is the structure definition::" msgstr "以下は構造体の定義です::" -#: ../../c-api/typeobj.rst:2614 +#: ../../c-api/typeobj.rst:2615 msgid "" "typedef struct {\n" " binaryfunc nb_add;\n" @@ -4222,7 +4218,7 @@ msgid "" "} PyNumberMethods;" msgstr "" -#: ../../c-api/typeobj.rst:2659 +#: ../../c-api/typeobj.rst:2660 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -4237,18 +4233,18 @@ msgstr "" "ば、二項関数と三項関数は ``Py_NotImplemented`` を返さなければならず、他のエ" "ラーが起こった場合は、``NULL`` を返して例外を設定しなければなりません。" -#: ../../c-api/typeobj.rst:2668 +#: ../../c-api/typeobj.rst:2669 msgid "" "The :c:member:`~PyNumberMethods.nb_reserved` field should always be " "``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " "Python 3.0.1." msgstr "" -#: ../../c-api/typeobj.rst:2819 +#: ../../c-api/typeobj.rst:2820 msgid "Mapping Object Structures" msgstr "マップオブジェクト構造体" -#: ../../c-api/typeobj.rst:2823 +#: ../../c-api/typeobj.rst:2824 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" @@ -4257,7 +4253,7 @@ msgstr "" "持しています。\n" "以下の3つのメンバを持っています:" -#: ../../c-api/typeobj.rst:2830 +#: ../../c-api/typeobj.rst:2831 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " @@ -4267,7 +4263,7 @@ msgstr "" "それらと同じシグネチャを持っています。オブジェクトが定義された長さを持たない" "場合は、このスロットは ``NULL`` に設定されることがあります。" -#: ../../c-api/typeobj.rst:2838 +#: ../../c-api/typeobj.rst:2839 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -4279,7 +4275,7 @@ msgstr "" "スロットは :c:func:`PyMapping_Check` が ``1`` を返すためには必要で、そうでな" "ければ ``NULL`` の場合があります。" -#: ../../c-api/typeobj.rst:2848 +#: ../../c-api/typeobj.rst:2849 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" "`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:" @@ -4289,11 +4285,11 @@ msgid "" "deletion." msgstr "" -#: ../../c-api/typeobj.rst:2859 +#: ../../c-api/typeobj.rst:2860 msgid "Sequence Object Structures" msgstr "シーケンスオブジェクト構造体" -#: ../../c-api/typeobj.rst:2863 +#: ../../c-api/typeobj.rst:2864 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." @@ -4301,7 +4297,7 @@ msgstr "" "この構造体はシーケンス型プロトコルを実装するために使われる関数群へのポインタ" "を保持しています。" -#: ../../c-api/typeobj.rst:2870 +#: ../../c-api/typeobj.rst:2871 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -4309,7 +4305,7 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: ../../c-api/typeobj.rst:2879 +#: ../../c-api/typeobj.rst:2880 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " @@ -4319,7 +4315,7 @@ msgstr "" "す。また、 ``+`` 演算子でも、 :c:member:`~PyNumberMethods.nb_add` スロットに" "よる数値加算を試した後に利用されます。" -#: ../../c-api/typeobj.rst:2887 +#: ../../c-api/typeobj.rst:2888 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " @@ -4329,7 +4325,7 @@ msgstr "" "す。また、 ``*`` 演算でも、 :c:member:`~PyNumberMethods.nb_multiply` スロット" "による数値乗算を試したあとに利用されます。" -#: ../../c-api/typeobj.rst:2895 +#: ../../c-api/typeobj.rst:2896 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -4338,7 +4334,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: ../../c-api/typeobj.rst:2901 +#: ../../c-api/typeobj.rst:2902 msgid "" "Negative indexes are handled as follows: if the :c:member:" "`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence " @@ -4347,7 +4343,7 @@ msgid "" "index is passed as is to the function." msgstr "" -#: ../../c-api/typeobj.rst:2910 +#: ../../c-api/typeobj.rst:2911 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -4356,7 +4352,7 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: ../../c-api/typeobj.rst:2921 +#: ../../c-api/typeobj.rst:2922 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" @@ -4367,7 +4363,7 @@ msgstr "" "PySequence_Contains` はシンプルにマッチするオブジェクトを見つけるまでシーケン" "スを巡回します。" -#: ../../c-api/typeobj.rst:2930 +#: ../../c-api/typeobj.rst:2931 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -4377,7 +4373,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: ../../c-api/typeobj.rst:2941 +#: ../../c-api/typeobj.rst:2942 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -4387,11 +4383,11 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: ../../c-api/typeobj.rst:2952 +#: ../../c-api/typeobj.rst:2953 msgid "Buffer Object Structures" msgstr "バッファオブジェクト構造体 (buffer object structure)" -#: ../../c-api/typeobj.rst:2956 +#: ../../c-api/typeobj.rst:2957 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " @@ -4402,17 +4398,17 @@ msgstr "" "そのプロトコルは、エクスポーターオブジェクトが如何にして、その内部データをコ" "ンシューマオブジェクトに渡すかを定義します。" -#: ../../c-api/typeobj.rst:2964 ../../c-api/typeobj.rst:3033 -#: ../../c-api/typeobj.rst:3097 ../../c-api/typeobj.rst:3110 -#: ../../c-api/typeobj.rst:3124 ../../c-api/typeobj.rst:3136 +#: ../../c-api/typeobj.rst:2965 ../../c-api/typeobj.rst:3034 +#: ../../c-api/typeobj.rst:3098 ../../c-api/typeobj.rst:3111 +#: ../../c-api/typeobj.rst:3125 ../../c-api/typeobj.rst:3137 msgid "The signature of this function is::" msgstr "この関数のシグネチャは以下の通りです::" -#: ../../c-api/typeobj.rst:2966 +#: ../../c-api/typeobj.rst:2967 msgid "int (PyObject *exporter, Py_buffer *view, int flags);" msgstr "" -#: ../../c-api/typeobj.rst:2968 +#: ../../c-api/typeobj.rst:2969 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " @@ -4422,64 +4418,64 @@ msgstr "" "求を処理します。ステップ(3) を除いて、この関数の実装では以下のステップを行わ" "なければなりません:" -#: ../../c-api/typeobj.rst:2972 +#: ../../c-api/typeobj.rst:2973 msgid "" "Check if the request can be met. If not, raise :exc:`BufferError`, set " "``view->obj`` to ``NULL`` and return ``-1``." msgstr "" -#: ../../c-api/typeobj.rst:2975 +#: ../../c-api/typeobj.rst:2976 msgid "Fill in the requested fields." msgstr "要求されたフィールドを埋めます。" -#: ../../c-api/typeobj.rst:2977 +#: ../../c-api/typeobj.rst:2978 msgid "Increment an internal counter for the number of exports." msgstr "エクスポートした回数を保持する内部カウンタをインクリメントします。" -#: ../../c-api/typeobj.rst:2979 +#: ../../c-api/typeobj.rst:2980 msgid "Set ``view->obj`` to *exporter* and increment ``view->obj``." msgstr "" -#: ../../c-api/typeobj.rst:2981 +#: ../../c-api/typeobj.rst:2982 msgid "Return ``0``." msgstr "``0`` を返します。" -#: ../../c-api/typeobj.rst:2983 ../../c-api/typeobj.rst:3046 +#: ../../c-api/typeobj.rst:2984 ../../c-api/typeobj.rst:3047 msgid "**Thread safety:**" msgstr "" -#: ../../c-api/typeobj.rst:2985 +#: ../../c-api/typeobj.rst:2986 msgid "In the :term:`free-threaded build`, implementations must ensure:" msgstr "" -#: ../../c-api/typeobj.rst:2987 +#: ../../c-api/typeobj.rst:2988 msgid "The export counter increment in step (3) is atomic." msgstr "" -#: ../../c-api/typeobj.rst:2989 +#: ../../c-api/typeobj.rst:2990 msgid "" "The underlying buffer data remains valid and at a stable memory location for " "the lifetime of all exports." msgstr "" -#: ../../c-api/typeobj.rst:2992 +#: ../../c-api/typeobj.rst:2993 msgid "" "For objects that support resizing or reallocation (such as :class:" "`bytearray`), the export counter is checked atomically before such " "operations, and :exc:`BufferError` is raised if exports exist." msgstr "" -#: ../../c-api/typeobj.rst:2996 +#: ../../c-api/typeobj.rst:2997 msgid "The function is safe to call concurrently from multiple threads." msgstr "" -#: ../../c-api/typeobj.rst:2998 +#: ../../c-api/typeobj.rst:2999 msgid "" "See also :ref:`thread-safety-memoryview` for the Python-level thread safety " "guarantees of :class:`memoryview` objects." msgstr "" -#: ../../c-api/typeobj.rst:3001 +#: ../../c-api/typeobj.rst:3002 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" @@ -4487,19 +4483,19 @@ msgstr "" "*exporter* がバッファプロバイダのチェインかツリーの一部であれば、2つの主要な" "方式が使用できます:" -#: ../../c-api/typeobj.rst:3004 +#: ../../c-api/typeobj.rst:3005 msgid "" "Re-export: Each member of the tree acts as the exporting object and sets " "``view->obj`` to a new reference to itself." msgstr "" -#: ../../c-api/typeobj.rst:3007 +#: ../../c-api/typeobj.rst:3008 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " "Here, ``view->obj`` will be a new reference to the root object." msgstr "" -#: ../../c-api/typeobj.rst:3011 +#: ../../c-api/typeobj.rst:3012 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -4510,7 +4506,7 @@ msgstr "" "明されており、エクスポートが特定の要求に対しどう対応しなければならないかの規" "則は、 :ref:`バッファ要求のタイプ ` の節にあります。" -#: ../../c-api/typeobj.rst:3016 +#: ../../c-api/typeobj.rst:3017 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -4524,7 +4520,7 @@ msgstr "" "strides` 、 :c:member:`~Py_buffer.suboffsets` 、 :c:member:`~Py_buffer." "internal` はコンシューマからは読み出し専用です。" -#: ../../c-api/typeobj.rst:3023 +#: ../../c-api/typeobj.rst:3024 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." @@ -4532,7 +4528,7 @@ msgstr "" ":c:func:`PyBuffer_FillInfo` は、全てのリクエストタイプを正しく扱う際に、単純" "なバイトバッファを公開する簡単な方法を提供します。" -#: ../../c-api/typeobj.rst:3026 +#: ../../c-api/typeobj.rst:3027 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." @@ -4540,11 +4536,11 @@ msgstr "" ":c:func:`PyObject_GetBuffer` は、この関数をラップするコンシューマ向けのイン" "ターフェースです。" -#: ../../c-api/typeobj.rst:3035 +#: ../../c-api/typeobj.rst:3036 msgid "void (PyObject *exporter, Py_buffer *view);" msgstr "" -#: ../../c-api/typeobj.rst:3037 +#: ../../c-api/typeobj.rst:3038 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -4556,31 +4552,31 @@ msgstr "" "構いません。そうでない場合は、この関数の標準的な実装は、以下の任意の処理手順 " "(optional step) を行います:" -#: ../../c-api/typeobj.rst:3042 +#: ../../c-api/typeobj.rst:3043 msgid "Decrement an internal counter for the number of exports." msgstr "エクスポートした回数を保持する内部カウンタをデクリメントします。" -#: ../../c-api/typeobj.rst:3044 +#: ../../c-api/typeobj.rst:3045 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" "カウンタが ``0`` の場合は、*view* に関連付けられた全てのメモリを解放します。" -#: ../../c-api/typeobj.rst:3048 +#: ../../c-api/typeobj.rst:3049 msgid "In the :term:`free-threaded build`:" msgstr "" -#: ../../c-api/typeobj.rst:3050 +#: ../../c-api/typeobj.rst:3051 msgid "The export counter decrement in step (1) must be atomic." msgstr "" -#: ../../c-api/typeobj.rst:3052 +#: ../../c-api/typeobj.rst:3053 msgid "" "Resource cleanup when the counter reaches zero must be done atomically, as " "the final release may race with concurrent releases from other threads and " -"dellocation must only happen once." +"deallocation must only happen once." msgstr "" -#: ../../c-api/typeobj.rst:3056 +#: ../../c-api/typeobj.rst:3057 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -4592,14 +4588,14 @@ msgstr "" "コンシューマが *view* 引数としてオリジナルのバッファのコピーを渡しているであ" "ろう間、変わらないことが保証されています。" -#: ../../c-api/typeobj.rst:3062 +#: ../../c-api/typeobj.rst:3063 msgid "" "This function MUST NOT decrement ``view->obj``, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: ../../c-api/typeobj.rst:3067 +#: ../../c-api/typeobj.rst:3068 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." @@ -4607,11 +4603,11 @@ msgstr "" ":c:func:`PyBuffer_Release` は、この関数をラップするコンシューマ向けのインター" "フェースです。" -#: ../../c-api/typeobj.rst:3075 +#: ../../c-api/typeobj.rst:3076 msgid "Async Object Structures" msgstr "async オブジェクト構造体" -#: ../../c-api/typeobj.rst:3081 +#: ../../c-api/typeobj.rst:3082 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." @@ -4619,7 +4615,7 @@ msgstr "" "この構造体は :term:`awaitable` オブジェクトと :term:`asynchronous iterator` " "オブジェクトを実装するのに必要な関数へのポインタを保持しています。" -#: ../../c-api/typeobj.rst:3086 +#: ../../c-api/typeobj.rst:3087 msgid "" "typedef struct {\n" " unaryfunc am_await;\n" @@ -4629,11 +4625,11 @@ msgid "" "} PyAsyncMethods;" msgstr "" -#: ../../c-api/typeobj.rst:3099 +#: ../../c-api/typeobj.rst:3100 msgid "PyObject *am_await(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:3101 +#: ../../c-api/typeobj.rst:3102 msgid "" "The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " "must return ``1`` for it." @@ -4642,24 +4638,24 @@ msgstr "" "つまりこのオブジェクトに対して :c:func:`PyIter_Check` が ``1`` を返さなければ" "なりません。" -#: ../../c-api/typeobj.rst:3104 +#: ../../c-api/typeobj.rst:3105 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" "オブジェクトが :term:`awaitable` でない場合、このスロットを ``NULL`` に設定し" "ます。" -#: ../../c-api/typeobj.rst:3112 +#: ../../c-api/typeobj.rst:3113 msgid "PyObject *am_aiter(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:3114 +#: ../../c-api/typeobj.rst:3115 msgid "" "Must return an :term:`asynchronous iterator` object. See :meth:`~object." "__anext__` for details." msgstr "" -#: ../../c-api/typeobj.rst:3117 +#: ../../c-api/typeobj.rst:3118 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." @@ -4667,30 +4663,30 @@ msgstr "" "オブジェクトが非同期反復処理のプロトコルを実装していない場合、このスロットを " "``NULL`` に設定します。" -#: ../../c-api/typeobj.rst:3126 +#: ../../c-api/typeobj.rst:3127 msgid "PyObject *am_anext(PyObject *self);" msgstr "" -#: ../../c-api/typeobj.rst:3128 +#: ../../c-api/typeobj.rst:3129 msgid "" "Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for " "details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:3138 +#: ../../c-api/typeobj.rst:3139 msgid "PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result);" msgstr "" -#: ../../c-api/typeobj.rst:3140 +#: ../../c-api/typeobj.rst:3141 msgid "" "See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." msgstr "" -#: ../../c-api/typeobj.rst:3149 +#: ../../c-api/typeobj.rst:3150 msgid "Slot Type typedefs" msgstr "Slot Type typedefs" -#: ../../c-api/typeobj.rst:3153 +#: ../../c-api/typeobj.rst:3154 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " @@ -4704,7 +4700,7 @@ msgid "" "length of the block should be :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: ../../c-api/typeobj.rst:3163 +#: ../../c-api/typeobj.rst:3164 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." @@ -4714,27 +4710,27 @@ msgstr "" "割り当てすらも行ってはなりません。そのような処理は :c:member:`~PyTypeObject." "tp_new` で行われるべきです。" -#: ../../c-api/typeobj.rst:3170 +#: ../../c-api/typeobj.rst:3171 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr ":c:member:`~PyTypeObject.tp_free` を参照してください。" -#: ../../c-api/typeobj.rst:3174 +#: ../../c-api/typeobj.rst:3175 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr ":c:member:`~PyTypeObject.tp_new` を参照してください。" -#: ../../c-api/typeobj.rst:3178 +#: ../../c-api/typeobj.rst:3179 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr ":c:member:`~PyTypeObject.tp_init` を参照してください。" -#: ../../c-api/typeobj.rst:3182 +#: ../../c-api/typeobj.rst:3183 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr ":c:member:`~PyTypeObject.tp_repr` を参照してください。" -#: ../../c-api/typeobj.rst:3186 ../../c-api/typeobj.rst:3195 +#: ../../c-api/typeobj.rst:3187 ../../c-api/typeobj.rst:3196 msgid "Return the value of the named attribute for the object." msgstr "オブジェクトの属性の値を返します。" -#: ../../c-api/typeobj.rst:3190 ../../c-api/typeobj.rst:3201 +#: ../../c-api/typeobj.rst:3191 ../../c-api/typeobj.rst:3202 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." @@ -4742,47 +4738,47 @@ msgstr "" "オブジェクトの属性に値を設定します。属性を削除するには、 value (実) 引数に " "``NULL`` を設定します。" -#: ../../c-api/typeobj.rst:3197 +#: ../../c-api/typeobj.rst:3198 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr ":c:member:`~PyTypeObject.tp_getattro` を参照してください。" -#: ../../c-api/typeobj.rst:3204 +#: ../../c-api/typeobj.rst:3205 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr ":c:member:`~PyTypeObject.tp_setattro` を参照してください。" -#: ../../c-api/typeobj.rst:3208 +#: ../../c-api/typeobj.rst:3209 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr ":c:member:`~PyTypeObject.tp_descr_get` を参照してください。" -#: ../../c-api/typeobj.rst:3212 +#: ../../c-api/typeobj.rst:3213 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr ":c:member:`~PyTypeObject.tp_descr_set` を参照してください。" -#: ../../c-api/typeobj.rst:3216 +#: ../../c-api/typeobj.rst:3217 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr ":c:member:`~PyTypeObject.tp_hash` を参照してください。" -#: ../../c-api/typeobj.rst:3220 +#: ../../c-api/typeobj.rst:3221 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr ":c:member:`~PyTypeObject.tp_richcompare` を参照してください。" -#: ../../c-api/typeobj.rst:3224 +#: ../../c-api/typeobj.rst:3225 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr ":c:member:`~PyTypeObject.tp_iter` を参照してください。" -#: ../../c-api/typeobj.rst:3228 +#: ../../c-api/typeobj.rst:3229 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr ":c:member:`~PyTypeObject.tp_iternext` を参照してください。" -#: ../../c-api/typeobj.rst:3242 +#: ../../c-api/typeobj.rst:3243 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr ":c:member:`~PyAsyncMethods.am_send` を参照してください。" -#: ../../c-api/typeobj.rst:3258 +#: ../../c-api/typeobj.rst:3259 msgid "Examples" msgstr "使用例" -#: ../../c-api/typeobj.rst:3260 +#: ../../c-api/typeobj.rst:3261 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -4794,11 +4790,11 @@ msgstr "" "ケースを実演しています。より多くの例や実践的な情報、チュートリアルが必要な" "ら、:ref:`defining-new-types` や :ref:`new-types-topics` を参照してください。" -#: ../../c-api/typeobj.rst:3265 +#: ../../c-api/typeobj.rst:3266 msgid "A basic :ref:`static type `::" msgstr "" -#: ../../c-api/typeobj.rst:3267 +#: ../../c-api/typeobj.rst:3268 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -4816,7 +4812,7 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:3282 +#: ../../c-api/typeobj.rst:3283 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" @@ -4824,7 +4820,7 @@ msgstr "" "より冗長な初期化子を用いた古いコードを(特にCPythonのコードベース中で)見かけ" "ることがあるかもしれません::" -#: ../../c-api/typeobj.rst:3285 +#: ../../c-api/typeobj.rst:3286 msgid "" "static PyTypeObject MyObject_Type = {\n" " PyVarObject_HEAD_INIT(NULL, 0)\n" @@ -4868,11 +4864,11 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:3326 +#: ../../c-api/typeobj.rst:3327 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "弱参照やインスタンス辞書、ハッシュをサポートする型::" -#: ../../c-api/typeobj.rst:3328 +#: ../../c-api/typeobj.rst:3329 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -4898,14 +4894,14 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:3351 +#: ../../c-api/typeobj.rst:3352 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " "instances (e.g. uses a separate factory func) using :c:macro:" "`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" -#: ../../c-api/typeobj.rst:3355 +#: ../../c-api/typeobj.rst:3356 msgid "" "typedef struct {\n" " PyUnicodeObject raw;\n" @@ -4923,12 +4919,12 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:3370 +#: ../../c-api/typeobj.rst:3371 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" -#: ../../c-api/typeobj.rst:3372 +#: ../../c-api/typeobj.rst:3373 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -4940,13 +4936,13 @@ msgid "" "};" msgstr "" -#: ../../c-api/typeobj.rst:3381 +#: ../../c-api/typeobj.rst:3382 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" msgstr "" -#: ../../c-api/typeobj.rst:3383 +#: ../../c-api/typeobj.rst:3384 msgid "" "typedef struct {\n" " PyObject_VAR_HEAD\n" diff --git a/c-api/unicode.po b/c-api/unicode.po index 3bef26de3..6616607f1 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1025,24 +1025,24 @@ msgstr "" msgid "" "Append the string *right* to the end of *p_left*. *p_left* must point to a :" "term:`strong reference` to a Unicode object; :c:func:`!PyUnicode_Append` " -"releases (\"steals\") this reference." +"releases (\":term:`steals `\") this reference." msgstr "" -#: ../../c-api/unicode.rst:681 +#: ../../c-api/unicode.rst:682 msgid "On error, set *\\*p_left* to ``NULL`` and set an exception." msgstr "" -#: ../../c-api/unicode.rst:683 +#: ../../c-api/unicode.rst:684 msgid "On success, set *\\*p_left* to a new strong reference to the result." msgstr "" -#: ../../c-api/unicode.rst:688 +#: ../../c-api/unicode.rst:689 msgid "" "The function is similar to :c:func:`PyUnicode_Append`, with the only " "difference being that it decrements the reference count of *right* by one." msgstr "" -#: ../../c-api/unicode.rst:694 +#: ../../c-api/unicode.rst:695 msgid "" "Return a mapping suitable for decoding a custom single-byte encoding. Given " "a Unicode string *string* of up to 256 characters representing an encoding " @@ -1051,27 +1051,27 @@ msgid "" "return ``NULL`` on invalid input." msgstr "" -#: ../../c-api/unicode.rst:705 +#: ../../c-api/unicode.rst:706 msgid "" "Return the name of the default string encoding, ``\"utf-8\"``. See :func:" "`sys.getdefaultencoding`." msgstr "" -#: ../../c-api/unicode.rst:708 +#: ../../c-api/unicode.rst:709 msgid "" "The returned string does not need to be freed, and is valid until " "interpreter shutdown." msgstr "" -#: ../../c-api/unicode.rst:714 +#: ../../c-api/unicode.rst:715 msgid "Return the length of the Unicode object, in code points." msgstr "Unicode オブジェクトの長さをコードポイントで返します。" -#: ../../c-api/unicode.rst:716 +#: ../../c-api/unicode.rst:717 msgid "On error, set an exception and return ``-1``." msgstr "" -#: ../../c-api/unicode.rst:727 +#: ../../c-api/unicode.rst:728 msgid "" "Copy characters from one Unicode object into another. This function " "performs character conversion when necessary and falls back to :c:func:`!" @@ -1084,38 +1084,38 @@ msgstr "" "失敗のときには ``-1`` を返し、例外を設定します。そうでない場合は、コピーした" "文字数を返します。" -#: ../../c-api/unicode.rst:732 ../../c-api/unicode.rst:762 -#: ../../c-api/unicode.rst:782 +#: ../../c-api/unicode.rst:733 ../../c-api/unicode.rst:763 +#: ../../c-api/unicode.rst:783 msgid "" "The string must not have been “used” yet. See :c:func:`PyUnicode_New` for " "details." msgstr "" -#: ../../c-api/unicode.rst:740 +#: ../../c-api/unicode.rst:741 msgid "" "Resize a Unicode object *\\*unicode* to the new *length* in code points." msgstr "" -#: ../../c-api/unicode.rst:742 +#: ../../c-api/unicode.rst:743 msgid "" "Try to resize the string in place (which is usually faster than allocating a " "new string and copying characters), or create a new string." msgstr "" -#: ../../c-api/unicode.rst:745 +#: ../../c-api/unicode.rst:746 msgid "" "*\\*unicode* is modified to point to the new (resized) object and ``0`` is " "returned on success. Otherwise, ``-1`` is returned and an exception is set, " "and *\\*unicode* is left untouched." msgstr "" -#: ../../c-api/unicode.rst:749 +#: ../../c-api/unicode.rst:750 msgid "" "The function doesn't check string content, the result may not be a string in " "canonical representation." msgstr "" -#: ../../c-api/unicode.rst:756 +#: ../../c-api/unicode.rst:757 msgid "" "Fill a string with a character: write *fill_char* into ``unicode[start:" "start+length]``." @@ -1123,7 +1123,7 @@ msgstr "" "文字列を文字で埋めます: ``unicode[start:start+length]`` で *fill_char* を埋め" "ることになります。" -#: ../../c-api/unicode.rst:759 +#: ../../c-api/unicode.rst:760 msgid "" "Fail if *fill_char* is bigger than the string maximum character, or if the " "string has more than 1 reference." @@ -1131,19 +1131,19 @@ msgstr "" "*fill_char* が文字列の最大文字よりも大きい場合や、文字列2つ以上の参照を持って" "た場合は失敗します。" -#: ../../c-api/unicode.rst:765 +#: ../../c-api/unicode.rst:766 msgid "" "Return the number of written characters, or return ``-1`` and raise an " "exception on error." msgstr "" -#: ../../c-api/unicode.rst:774 +#: ../../c-api/unicode.rst:775 msgid "" "Write a *character* to the string *unicode* at the zero-based *index*. " "Return ``0`` on success, ``-1`` on error with an exception set." msgstr "" -#: ../../c-api/unicode.rst:777 +#: ../../c-api/unicode.rst:778 msgid "" "This function checks that *unicode* is a Unicode object, that the index is " "not out of bounds, and that the object's reference count is one. See :c:func:" @@ -1151,7 +1151,7 @@ msgid "" "responsibility." msgstr "" -#: ../../c-api/unicode.rst:790 +#: ../../c-api/unicode.rst:791 msgid "" "Read a character from a string. This function checks that *unicode* is a " "Unicode object and the index is not out of bounds, in contrast to :c:func:" @@ -1162,18 +1162,18 @@ msgstr "" "は *unicode* が Unicode オブジェクトであること、インデックスが範囲内であるこ" "とをチェックします。" -#: ../../c-api/unicode.rst:794 +#: ../../c-api/unicode.rst:795 msgid "Return character on success, ``-1`` on error with an exception set." msgstr "" -#: ../../c-api/unicode.rst:802 +#: ../../c-api/unicode.rst:803 msgid "" "Return a substring of *unicode*, from character index *start* (included) to " "character index *end* (excluded). Negative indices are not supported. On " "error, set an exception and return ``NULL``." msgstr "" -#: ../../c-api/unicode.rst:812 +#: ../../c-api/unicode.rst:813 msgid "" "Copy the string *unicode* into a UCS4 buffer, including a null character, if " "*copy_null* is set. Returns ``NULL`` and sets an exception on error (in " @@ -1181,7 +1181,7 @@ msgid "" "*unicode*). *buffer* is returned on success." msgstr "" -#: ../../c-api/unicode.rst:822 +#: ../../c-api/unicode.rst:823 msgid "" "Copy the string *unicode* into a new UCS4 buffer that is allocated using :c:" "func:`PyMem_Malloc`. If this fails, ``NULL`` is returned with a :exc:" @@ -1193,11 +1193,11 @@ msgstr "" "これが失敗した場合は、 ``NULL`` を返し :exc:`MemoryError` をセットします。\n" "返されたバッファは必ず null コードポイントが追加されています。" -#: ../../c-api/unicode.rst:831 +#: ../../c-api/unicode.rst:832 msgid "Locale Encoding" msgstr "ロケールエンコーディング" -#: ../../c-api/unicode.rst:833 +#: ../../c-api/unicode.rst:834 msgid "" "The current locale encoding can be used to decode text from the operating " "system." @@ -1205,7 +1205,7 @@ msgstr "" "現在のロケールエンコーディングはオペレーティングシステムのテキストをデコード" "するのに使えます。" -#: ../../c-api/unicode.rst:840 +#: ../../c-api/unicode.rst:841 msgid "" "Decode a string from UTF-8 on Android and VxWorks, or from the current " "locale encoding on other platforms. The supported error handlers are " @@ -1214,21 +1214,21 @@ msgid "" "null character but cannot contain embedded null characters." msgstr "" -#: ../../c-api/unicode.rst:847 +#: ../../c-api/unicode.rst:848 msgid "" "Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from the :" "term:`filesystem encoding and error handler`." msgstr "" -#: ../../c-api/unicode.rst:850 ../../c-api/unicode.rst:885 +#: ../../c-api/unicode.rst:851 ../../c-api/unicode.rst:886 msgid "This function ignores the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../c-api/unicode.rst:854 ../../c-api/unicode.rst:970 +#: ../../c-api/unicode.rst:855 ../../c-api/unicode.rst:971 msgid "The :c:func:`Py_DecodeLocale` function." msgstr ":c:func:`Py_DecodeLocale` 関数。" -#: ../../c-api/unicode.rst:858 +#: ../../c-api/unicode.rst:859 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. Previously, :c:func:" @@ -1240,13 +1240,13 @@ msgstr "" "以前は、 :c:func:`Py_DecodeLocale` が ``surrogateescape`` で使われ、現在のロ" "ケールエンコーディングは ``strict`` で使われていました。" -#: ../../c-api/unicode.rst:867 +#: ../../c-api/unicode.rst:868 msgid "" "Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " "length using :c:func:`!strlen`." msgstr "" -#: ../../c-api/unicode.rst:875 +#: ../../c-api/unicode.rst:876 msgid "" "Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current " "locale encoding on other platforms. The supported error handlers are " @@ -1255,17 +1255,17 @@ msgid "" "`bytes` object. *unicode* cannot contain embedded null characters." msgstr "" -#: ../../c-api/unicode.rst:882 +#: ../../c-api/unicode.rst:883 msgid "" "Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to the :term:" "`filesystem encoding and error handler`." msgstr "" -#: ../../c-api/unicode.rst:889 ../../c-api/unicode.rst:1001 +#: ../../c-api/unicode.rst:890 ../../c-api/unicode.rst:1002 msgid "The :c:func:`Py_EncodeLocale` function." msgstr ":c:func:`Py_EncodeLocale` 関数。" -#: ../../c-api/unicode.rst:893 +#: ../../c-api/unicode.rst:894 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. Previously, :c:func:" @@ -1277,24 +1277,24 @@ msgstr "" "以前は、 :c:func:`Py_EncodeLocale` が ``surrogateescape`` で使われ、現在のロ" "ケールエンコーディングは ``strict`` で使われていました。" -#: ../../c-api/unicode.rst:902 +#: ../../c-api/unicode.rst:903 msgid "File System Encoding" msgstr "ファイルシステムエンコーディング" -#: ../../c-api/unicode.rst:904 +#: ../../c-api/unicode.rst:905 msgid "" "Functions encoding to and decoding from the :term:`filesystem encoding and " "error handler` (:pep:`383` and :pep:`529`)." msgstr "" -#: ../../c-api/unicode.rst:907 +#: ../../c-api/unicode.rst:908 msgid "" "To encode file names to :class:`bytes` during argument parsing, the " "``\"O&\"`` converter should be used, passing :c:func:`!" "PyUnicode_FSConverter` as the conversion function:" msgstr "" -#: ../../c-api/unicode.rst:913 +#: ../../c-api/unicode.rst:914 msgid "" ":ref:`PyArg_Parse\\* converter `: encode :class:`str` objects " "-- obtained directly or through the :class:`os.PathLike` interface -- to :" @@ -1307,24 +1307,24 @@ msgid "" "not allowed in the result. On failure, return ``0`` with an exception set." msgstr "" -#: ../../c-api/unicode.rst:925 +#: ../../c-api/unicode.rst:926 msgid "" "If *obj* is ``NULL``, the function releases a strong reference stored in the " "variable referred by *result* and returns ``1``." msgstr "" -#: ../../c-api/unicode.rst:930 ../../c-api/unicode.rst:957 +#: ../../c-api/unicode.rst:931 ../../c-api/unicode.rst:958 msgid "Accepts a :term:`path-like object`." msgstr ":term:`path-like object` を受け入れるようになりました。" -#: ../../c-api/unicode.rst:933 +#: ../../c-api/unicode.rst:934 msgid "" "To decode file names to :class:`str` during argument parsing, the ``\"O&\"`` " "converter should be used, passing :c:func:`!PyUnicode_FSDecoder` as the " "conversion function:" msgstr "" -#: ../../c-api/unicode.rst:939 +#: ../../c-api/unicode.rst:940 msgid "" ":ref:`PyArg_Parse\\* converter `: decode :class:`bytes` objects " "-- obtained either directly or indirectly through the :class:`os.PathLike` " @@ -1338,63 +1338,63 @@ msgid "" "result. On failure, return ``0`` with an exception set." msgstr "" -#: ../../c-api/unicode.rst:952 +#: ../../c-api/unicode.rst:953 msgid "" "If *obj* is ``NULL``, release the strong reference to the object referred to " "by *result* and return ``1``." msgstr "" -#: ../../c-api/unicode.rst:963 +#: ../../c-api/unicode.rst:964 msgid "Decode a string from the :term:`filesystem encoding and error handler`." msgstr "" -#: ../../c-api/unicode.rst:965 +#: ../../c-api/unicode.rst:966 msgid "" "If you need to decode a string from the current locale encoding, use :c:func:" "`PyUnicode_DecodeLocaleAndSize`." msgstr "" -#: ../../c-api/unicode.rst:972 ../../c-api/unicode.rst:985 -#: ../../c-api/unicode.rst:1005 +#: ../../c-api/unicode.rst:973 ../../c-api/unicode.rst:986 +#: ../../c-api/unicode.rst:1006 msgid "" "The :term:`filesystem error handler ` " "is now used." msgstr "" -#: ../../c-api/unicode.rst:979 +#: ../../c-api/unicode.rst:980 msgid "" "Decode a null-terminated string from the :term:`filesystem encoding and " "error handler`." msgstr "" -#: ../../c-api/unicode.rst:982 +#: ../../c-api/unicode.rst:983 msgid "" "If the string length is known, use :c:func:" "`PyUnicode_DecodeFSDefaultAndSize`." msgstr "" -#: ../../c-api/unicode.rst:992 +#: ../../c-api/unicode.rst:993 msgid "" "Encode a Unicode object to the :term:`filesystem encoding and error " "handler`, and return :class:`bytes`. Note that the resulting :class:`bytes` " "object can contain null bytes." msgstr "" -#: ../../c-api/unicode.rst:996 +#: ../../c-api/unicode.rst:997 msgid "" "If you need to encode a string to the current locale encoding, use :c:func:" "`PyUnicode_EncodeLocale`." msgstr "" -#: ../../c-api/unicode.rst:1010 +#: ../../c-api/unicode.rst:1011 msgid "wchar_t Support" msgstr "wchar_t サポート" -#: ../../c-api/unicode.rst:1012 +#: ../../c-api/unicode.rst:1013 msgid ":c:type:`wchar_t` support for platforms which support it:" msgstr ":c:type:`wchar_t` をサポートするプラットフォームでの wchar_t サポート:" -#: ../../c-api/unicode.rst:1016 +#: ../../c-api/unicode.rst:1017 msgid "" "Create a Unicode object from the :c:type:`wchar_t` buffer *wstr* of the " "given *size*. Passing ``-1`` as the *size* indicates that the function must " @@ -1402,7 +1402,7 @@ msgid "" "failure." msgstr "" -#: ../../c-api/unicode.rst:1024 +#: ../../c-api/unicode.rst:1025 msgid "" "Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. " "At most *size* :c:type:`wchar_t` characters are copied (excluding a possibly " @@ -1410,13 +1410,13 @@ msgid "" "`wchar_t` characters copied or ``-1`` in case of an error." msgstr "" -#: ../../c-api/unicode.rst:1029 +#: ../../c-api/unicode.rst:1030 msgid "" "When *wstr* is ``NULL``, instead return the *size* that would be required to " "store all of *unicode* including a terminating null." msgstr "" -#: ../../c-api/unicode.rst:1032 +#: ../../c-api/unicode.rst:1033 msgid "" "Note that the resulting :c:expr:`wchar_t*` string may or may not be null-" "terminated. It is the responsibility of the caller to make sure that the :c:" @@ -1426,7 +1426,7 @@ msgid "" "most C functions." msgstr "" -#: ../../c-api/unicode.rst:1042 +#: ../../c-api/unicode.rst:1043 msgid "" "Convert the Unicode object to a wide character string. The output string " "always ends with a null character. If *size* is not ``NULL``, write the " @@ -1437,24 +1437,24 @@ msgid "" "`wchar_t*` string contains null characters a :exc:`ValueError` is raised." msgstr "" -#: ../../c-api/unicode.rst:1050 +#: ../../c-api/unicode.rst:1051 msgid "" "Returns a buffer allocated by :c:macro:`PyMem_New` (use :c:func:`PyMem_Free` " "to free it) on success. On error, returns ``NULL`` and *\\*size* is " "undefined. Raises a :exc:`MemoryError` if memory allocation is failed." msgstr "" -#: ../../c-api/unicode.rst:1057 +#: ../../c-api/unicode.rst:1058 msgid "" "Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` " "string contains null characters." msgstr "" -#: ../../c-api/unicode.rst:1065 +#: ../../c-api/unicode.rst:1066 msgid "Built-in Codecs" msgstr "組み込み codec (built-in codec)" -#: ../../c-api/unicode.rst:1067 +#: ../../c-api/unicode.rst:1068 msgid "" "Python provides a set of built-in codecs which are written in C for speed. " "All of these codecs are directly usable via the following functions." @@ -1462,7 +1462,7 @@ msgstr "" "Python には、処理速度を高めるために C で書かれた codec が揃えてあります。これ" "ら全ての codec は以下の関数を介して直接利用できます。" -#: ../../c-api/unicode.rst:1070 +#: ../../c-api/unicode.rst:1071 msgid "" "Many of the following APIs take two arguments encoding and errors, and they " "have the same semantics as the ones of the built-in :func:`str` string " @@ -1472,7 +1472,7 @@ msgstr "" "らのパラメータは、組み込みの文字列コンストラクタである :func:`str` における同" "名のパラメータと同じ意味を持ちます。" -#: ../../c-api/unicode.rst:1074 +#: ../../c-api/unicode.rst:1075 msgid "" "Setting encoding to ``NULL`` causes the default encoding to be used which is " "UTF-8. The file system calls should use :c:func:`PyUnicode_FSConverter` for " @@ -1480,7 +1480,7 @@ msgid "" "handler` internally." msgstr "" -#: ../../c-api/unicode.rst:1079 +#: ../../c-api/unicode.rst:1080 msgid "" "Error handling is set by errors which may also be set to ``NULL`` meaning to " "use the default handling defined for the codec. Default error handling for " @@ -1491,7 +1491,7 @@ msgstr "" "込み codec で、デフォルトのエラー処理は \"strict\" (:exc:`ValueError` を送出" "する) になっています。" -#: ../../c-api/unicode.rst:1083 +#: ../../c-api/unicode.rst:1084 msgid "" "The codecs all use a similar interface. Only deviations from the following " "generic ones are documented for simplicity." @@ -1500,29 +1500,29 @@ msgstr "" "では、説明を簡単にするために以下の汎用のインターフェースとの違いだけを説明し" "ています。" -#: ../../c-api/unicode.rst:1088 +#: ../../c-api/unicode.rst:1089 msgid "Generic Codecs" msgstr "汎用 codec" -#: ../../c-api/unicode.rst:1090 +#: ../../c-api/unicode.rst:1091 msgid "The following macro is provided:" msgstr "" -#: ../../c-api/unicode.rst:1095 +#: ../../c-api/unicode.rst:1096 msgid "The Unicode code point ``U+FFFD`` (replacement character)." msgstr "" -#: ../../c-api/unicode.rst:1097 +#: ../../c-api/unicode.rst:1098 msgid "" "This Unicode character is used as the replacement character during decoding " "if the *errors* argument is set to \"replace\"." msgstr "" -#: ../../c-api/unicode.rst:1101 +#: ../../c-api/unicode.rst:1102 msgid "These are the generic codec APIs:" msgstr "以下は汎用 codec の API です:" -#: ../../c-api/unicode.rst:1107 +#: ../../c-api/unicode.rst:1108 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string " "*str*. *encoding* and *errors* have the same meaning as the parameters of " @@ -1531,7 +1531,7 @@ msgid "" "was raised by the codec." msgstr "" -#: ../../c-api/unicode.rst:1117 +#: ../../c-api/unicode.rst:1118 msgid "" "Encode a Unicode object and return the result as Python bytes object. " "*encoding* and *errors* have the same meaning as the parameters of the same " @@ -1546,15 +1546,15 @@ msgstr "" "使用する codec の検索は、 Python の codec レジストリを使って行います。\n" "codec が例外を送出した場合には ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1125 +#: ../../c-api/unicode.rst:1126 msgid "UTF-8 Codecs" msgstr "UTF-8 Codecs" -#: ../../c-api/unicode.rst:1127 +#: ../../c-api/unicode.rst:1128 msgid "These are the UTF-8 codec APIs:" msgstr "以下は UTF-8 codec の APIです:" -#: ../../c-api/unicode.rst:1132 +#: ../../c-api/unicode.rst:1133 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." @@ -1562,7 +1562,7 @@ msgstr "" "UTF-8 でエンコードされた *size* バイトの文字列 *str* から Unicode オブジェク" "トを生成します。codec が例外を送出した場合には ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1139 +#: ../../c-api/unicode.rst:1140 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will " @@ -1574,7 +1574,7 @@ msgstr "" "エラーとみなされません。これらのバイト列はデコードされず、デコードされたバイ" "ト数は *consumed* に格納されます。" -#: ../../c-api/unicode.rst:1147 +#: ../../c-api/unicode.rst:1148 msgid "" "Encode a Unicode object using UTF-8 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " @@ -1584,13 +1584,13 @@ msgstr "" "トとして返します。エラー処理は \"strict\" です。 codec が例外を送出した場合に" "は ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1151 ../../c-api/unicode.rst:1166 +#: ../../c-api/unicode.rst:1152 ../../c-api/unicode.rst:1167 msgid "" "The function fails if the string contains surrogate code points (``U+D800`` " "- ``U+DFFF``)." msgstr "" -#: ../../c-api/unicode.rst:1157 +#: ../../c-api/unicode.rst:1158 msgid "" "Return a pointer to the UTF-8 encoding of the Unicode object, and store the " "size of the encoded representation (in bytes) in *size*. The *size* " @@ -1604,13 +1604,13 @@ msgstr "" "返されるバッファには、 null コードポイントがあるかどうかに関わらず、常に " "null バイトが終端に付加されています (これは *size* には勘定されません)。" -#: ../../c-api/unicode.rst:1163 +#: ../../c-api/unicode.rst:1164 msgid "" "On error, set an exception, set *size* to ``-1`` (if it's not NULL) and " "return ``NULL``." msgstr "" -#: ../../c-api/unicode.rst:1169 +#: ../../c-api/unicode.rst:1170 msgid "" "This caches the UTF-8 representation of the string in the Unicode object, " "and subsequent calls will return a pointer to the same buffer. The caller " @@ -1619,20 +1619,20 @@ msgid "" "collected." msgstr "" -#: ../../c-api/unicode.rst:1176 ../../c-api/unicode.rst:1198 +#: ../../c-api/unicode.rst:1177 ../../c-api/unicode.rst:1199 msgid "The return type is now ``const char *`` rather than ``char *``." msgstr "" -#: ../../c-api/unicode.rst:1179 +#: ../../c-api/unicode.rst:1180 msgid "This function is a part of the :ref:`limited API `." msgstr "" -#: ../../c-api/unicode.rst:1185 +#: ../../c-api/unicode.rst:1186 msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." msgstr "" ":c:func:`PyUnicode_AsUTF8AndSize` とほぼ同じですが、サイズを格納しません。" -#: ../../c-api/unicode.rst:1189 +#: ../../c-api/unicode.rst:1190 msgid "" "This function does not have any special behavior for `null characters " "`_ embedded within *unicode*. " @@ -1642,15 +1642,15 @@ msgid "" "c:func:`PyUnicode_AsUTF8AndSize` instead." msgstr "" -#: ../../c-api/unicode.rst:1203 +#: ../../c-api/unicode.rst:1204 msgid "UTF-32 Codecs" msgstr "UTF-32 Codecs" -#: ../../c-api/unicode.rst:1205 +#: ../../c-api/unicode.rst:1206 msgid "These are the UTF-32 codec APIs:" msgstr "以下は UTF-32 codec API です:" -#: ../../c-api/unicode.rst:1211 +#: ../../c-api/unicode.rst:1212 msgid "" "Decode *size* bytes from a UTF-32 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " @@ -1660,7 +1660,7 @@ msgstr "" "Unicodeオブジェクトとして返します。 *errors* は (``NULL`` でないなら) エラー" "ハンドラを指定します。デフォルトは \"strict\" です。" -#: ../../c-api/unicode.rst:1215 ../../c-api/unicode.rst:1265 +#: ../../c-api/unicode.rst:1216 ../../c-api/unicode.rst:1266 msgid "" "If *byteorder* is non-``NULL``, the decoder starts decoding using the given " "byte order::" @@ -1668,14 +1668,14 @@ msgstr "" "*byteorder* が ``NULL`` でない時、デコーダは与えられたバイトオーダーでデコー" "ドを開始します。 ::" -#: ../../c-api/unicode.rst:1218 ../../c-api/unicode.rst:1268 +#: ../../c-api/unicode.rst:1219 ../../c-api/unicode.rst:1269 msgid "" "*byteorder == -1: little endian\n" "*byteorder == 0: native order\n" "*byteorder == 1: big endian" msgstr "" -#: ../../c-api/unicode.rst:1222 +#: ../../c-api/unicode.rst:1223 msgid "" "If ``*byteorder`` is zero, and the first four bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1687,7 +1687,7 @@ msgstr "" "コピーされません。 ``*byteorder`` が ``-1`` または ``1`` ならば、全ての byte " "order mark は出力にコピーされます。" -#: ../../c-api/unicode.rst:1227 +#: ../../c-api/unicode.rst:1228 msgid "" "After completion, *\\*byteorder* is set to the current byte order at the end " "of input data." @@ -1695,16 +1695,16 @@ msgstr "" "デコードが完了した後、入力データの終端に来た時点でのバイトオーダーを " "*\\*byteorder* にセットします。" -#: ../../c-api/unicode.rst:1230 ../../c-api/unicode.rst:1281 +#: ../../c-api/unicode.rst:1231 ../../c-api/unicode.rst:1282 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" "*byteorder* が ``NULL`` のとき、 codec は native order モードで開始します。" -#: ../../c-api/unicode.rst:1232 ../../c-api/unicode.rst:1283 +#: ../../c-api/unicode.rst:1233 ../../c-api/unicode.rst:1284 msgid "Return ``NULL`` if an exception was raised by the codec." msgstr "codec が例外を発生させたときは ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1238 +#: ../../c-api/unicode.rst:1239 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not " @@ -1718,7 +1718,7 @@ msgstr "" "ト列などの) UTF-32 バイト列をエラーとして扱いません。末尾の不完全なバイト列は" "デコードされず、デコードされたバイト数が *consumed* に格納されます。" -#: ../../c-api/unicode.rst:1247 +#: ../../c-api/unicode.rst:1248 msgid "" "Return a Python byte string using the UTF-32 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " @@ -1730,15 +1730,15 @@ msgstr "" "エラーハンドラは \"strict\" です。\n" "codec が例外を発生させたときは ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1253 +#: ../../c-api/unicode.rst:1254 msgid "UTF-16 Codecs" msgstr "UTF-16 Codecs" -#: ../../c-api/unicode.rst:1255 +#: ../../c-api/unicode.rst:1256 msgid "These are the UTF-16 codec APIs:" msgstr "以下は UTF-16 codec の APIです:" -#: ../../c-api/unicode.rst:1261 +#: ../../c-api/unicode.rst:1262 msgid "" "Decode *size* bytes from a UTF-16 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " @@ -1748,7 +1748,7 @@ msgstr "" "果を Unicode オブジェクトで返します。 *errors* は (``NULL`` でない場合) エ" "ラー処理方法を定義します。デフォルト値は \"strict\" です。" -#: ../../c-api/unicode.rst:1272 +#: ../../c-api/unicode.rst:1273 msgid "" "If ``*byteorder`` is zero, and the first two bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1762,7 +1762,7 @@ msgstr "" "合、すべてのBOMは出力へコピーされます (出力では ``\\ufeff`` か ``\\ufffe`` の" "どちらかになるでしょう)。" -#: ../../c-api/unicode.rst:1278 +#: ../../c-api/unicode.rst:1279 msgid "" "After completion, ``*byteorder`` is set to the current byte order at the end " "of input data." @@ -1770,7 +1770,7 @@ msgstr "" "デコードが完了した後、入力データの終端に来た時点でのバイトオーダーを " "``*byteorder`` にセットします。" -#: ../../c-api/unicode.rst:1289 +#: ../../c-api/unicode.rst:1290 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not " @@ -1785,7 +1785,7 @@ msgstr "" "イト列や分割されたサロゲートペア) をエラーとみなしません。これらのバイト列は" "デコードされず、デコードされたバイト数を *consumed* に返します。" -#: ../../c-api/unicode.rst:1298 +#: ../../c-api/unicode.rst:1299 msgid "" "Return a Python byte string using the UTF-16 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " @@ -1797,21 +1797,21 @@ msgstr "" "エラーハンドラは \"strict\" です。\n" "codec が例外を発生させたときは ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1304 +#: ../../c-api/unicode.rst:1305 msgid "UTF-7 Codecs" msgstr "UTF-7 Codecs" -#: ../../c-api/unicode.rst:1306 +#: ../../c-api/unicode.rst:1307 msgid "These are the UTF-7 codec APIs:" msgstr "以下は UTF-7 codec の API です:" -#: ../../c-api/unicode.rst:1311 +#: ../../c-api/unicode.rst:1312 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../c-api/unicode.rst:1318 +#: ../../c-api/unicode.rst:1319 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will " @@ -1823,22 +1823,22 @@ msgstr "" "分をエラーとしません。不完全な部分のバイト列はデコードせずに、デコードしたバ" "イト数を *consumed* に格納します。" -#: ../../c-api/unicode.rst:1325 +#: ../../c-api/unicode.rst:1326 msgid "Unicode-Escape Codecs" msgstr "Unicode-Escape Codecs" -#: ../../c-api/unicode.rst:1327 +#: ../../c-api/unicode.rst:1328 msgid "These are the \"Unicode Escape\" codec APIs:" msgstr "以下は \"Unicode Escape\" codec の API です:" -#: ../../c-api/unicode.rst:1333 +#: ../../c-api/unicode.rst:1334 msgid "" "Create a Unicode object by decoding *size* bytes of the Unicode-Escape " "encoded string *str*. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" -#: ../../c-api/unicode.rst:1339 +#: ../../c-api/unicode.rst:1340 msgid "" "Encode a Unicode object using Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " @@ -1849,22 +1849,22 @@ msgstr "" "エラー処理は \"strict\" です。\n" "codec が例外を送出した場合には ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1345 +#: ../../c-api/unicode.rst:1346 msgid "Raw-Unicode-Escape Codecs" msgstr "Raw-Unicode-Escape Codecs" -#: ../../c-api/unicode.rst:1347 +#: ../../c-api/unicode.rst:1348 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "以下は \"Raw Unicode Escape\" codec の APIです:" -#: ../../c-api/unicode.rst:1353 +#: ../../c-api/unicode.rst:1354 msgid "" "Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape " "encoded string *str*. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" -#: ../../c-api/unicode.rst:1359 +#: ../../c-api/unicode.rst:1360 msgid "" "Encode a Unicode object using Raw-Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " @@ -1875,11 +1875,11 @@ msgstr "" "エラー処理は \"strict\" です。\n" "codec が例外を送出した場合には ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1365 +#: ../../c-api/unicode.rst:1366 msgid "Latin-1 Codecs" msgstr "Latin-1 Codecs" -#: ../../c-api/unicode.rst:1367 +#: ../../c-api/unicode.rst:1368 msgid "" "These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 " "Unicode ordinals and only these are accepted by the codecs during encoding." @@ -1887,7 +1887,7 @@ msgstr "" "以下は Latin-1 codec の APIです: Latin-1 は、 Unicode 序数の最初の 256 個に対" "応し、エンコード時にはこの 256 個だけを受理します。" -#: ../../c-api/unicode.rst:1373 +#: ../../c-api/unicode.rst:1374 msgid "" "Create a Unicode object by decoding *size* bytes of the Latin-1 encoded " "string *str*. Return ``NULL`` if an exception was raised by the codec." @@ -1895,7 +1895,7 @@ msgstr "" "Latin-1 でエンコードされた *size* バイトの文字列 *str* から Unicode オブジェ" "クトを生成します。codec が例外を送出した場合には ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1379 +#: ../../c-api/unicode.rst:1380 msgid "" "Encode a Unicode object using Latin-1 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " @@ -1906,11 +1906,11 @@ msgstr "" "エラー処理は \"strict\" です。 codec が例外を送出した場合には ``NULL`` を返し" "ます。" -#: ../../c-api/unicode.rst:1385 +#: ../../c-api/unicode.rst:1386 msgid "ASCII Codecs" msgstr "ASCII Codecs" -#: ../../c-api/unicode.rst:1387 +#: ../../c-api/unicode.rst:1388 msgid "" "These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " "other codes generate errors." @@ -1918,13 +1918,13 @@ msgstr "" "以下は ASCII codec の APIです。 7 ビットの ASCII データだけを受理します。その" "他のコードはエラーになります。" -#: ../../c-api/unicode.rst:1393 +#: ../../c-api/unicode.rst:1394 msgid "" "Create a Unicode object by decoding *size* bytes of the ASCII encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../c-api/unicode.rst:1399 +#: ../../c-api/unicode.rst:1400 msgid "" "Encode a Unicode object using ASCII and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " @@ -1935,11 +1935,11 @@ msgstr "" "エラー処理は \"strict\" です。\n" "codec が例外を送出した場合には ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1405 +#: ../../c-api/unicode.rst:1406 msgid "Character Map Codecs" msgstr "Character Map Codecs" -#: ../../c-api/unicode.rst:1407 +#: ../../c-api/unicode.rst:1408 msgid "" "This codec is special in that it can be used to implement many different " "codecs (and this is in fact what was done to obtain most of the standard " @@ -1956,11 +1956,11 @@ msgstr "" "ターフェースをサポートしていなければなりません; 辞書やシーケンスがそれに適し" "ています。" -#: ../../c-api/unicode.rst:1413 +#: ../../c-api/unicode.rst:1414 msgid "These are the mapping codec APIs:" msgstr "以下は mapping codec の APIです:" -#: ../../c-api/unicode.rst:1418 +#: ../../c-api/unicode.rst:1419 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string *str* " "using the given *mapping* object. Return ``NULL`` if an exception was " @@ -1970,7 +1970,7 @@ msgstr "" "字列 *str* をデコードして Unicode オブジェクトを作成します。\n" "codec が例外を発生させたときは ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1422 +#: ../../c-api/unicode.rst:1423 msgid "" "If *mapping* is ``NULL``, Latin-1 decoding will be applied. Else *mapping* " "must map bytes ordinals (integers in the range from 0 to 255) to Unicode " @@ -1980,7 +1980,7 @@ msgid "" "treated as undefined mappings and cause an error." msgstr "" -#: ../../c-api/unicode.rst:1433 +#: ../../c-api/unicode.rst:1434 msgid "" "Encode a Unicode object using the given *mapping* object and return the " "result as a bytes object. Error handling is \"strict\". Return ``NULL`` if " @@ -1990,7 +1990,7 @@ msgstr "" "し、結果を bytes オブジェクトとして返します。エラー処理は \"strict\" です。 " "codec が例外を送出した場合には ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1437 +#: ../../c-api/unicode.rst:1438 msgid "" "The *mapping* object must map Unicode ordinal integers to bytes objects, " "integers in the range from 0 to 255 or ``None``. Unmapped character " @@ -1998,12 +1998,12 @@ msgid "" "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" -#: ../../c-api/unicode.rst:1443 +#: ../../c-api/unicode.rst:1444 msgid "The following codec API is special in that maps Unicode to Unicode." msgstr "" "以下の codec API は Unicode から Unicode への対応付けを行う特殊なものです。" -#: ../../c-api/unicode.rst:1447 +#: ../../c-api/unicode.rst:1448 msgid "" "Translate a string by applying a character mapping table to it and return " "the resulting Unicode object. Return ``NULL`` if an exception was raised by " @@ -2012,7 +2012,7 @@ msgstr "" "文字列に文字対応表 *table* を適用して変換し、変換結果を Unicode オブジェクト" "で返します。codec が例外を発行した場合には ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1451 +#: ../../c-api/unicode.rst:1452 msgid "" "The mapping table must map Unicode ordinal integers to Unicode ordinal " "integers or ``None`` (causing deletion of the character)." @@ -2020,14 +2020,14 @@ msgstr "" "対応表は、Unicode 序数を表す整数を Unicode 序数を表す整数または ``None`` (そ" "の文字を削除する) に対応付けなければなりません。" -#: ../../c-api/unicode.rst:1454 +#: ../../c-api/unicode.rst:1455 msgid "" "Mapping tables need only provide the :meth:`~object.__getitem__` interface; " "dictionaries and sequences work well. Unmapped character ordinals (ones " "which cause a :exc:`LookupError`) are left untouched and are copied as-is." msgstr "" -#: ../../c-api/unicode.rst:1458 +#: ../../c-api/unicode.rst:1459 msgid "" "*errors* has the usual meaning for codecs. It may be ``NULL`` which " "indicates to use the default error handling." @@ -2035,11 +2035,11 @@ msgstr "" "*errors* は codecs で通常使われるのと同じ意味を持ちます。 *errors* は " "``NULL`` にしてもよく、デフォルトエラー処理の使用を意味します。" -#: ../../c-api/unicode.rst:1463 +#: ../../c-api/unicode.rst:1464 msgid "MBCS codecs for Windows" msgstr "Windows 用の MBCS codec" -#: ../../c-api/unicode.rst:1465 +#: ../../c-api/unicode.rst:1466 msgid "" "These are the MBCS codec APIs. They are currently only available on Windows " "and use the Win32 MBCS converters to implement the conversions. Note that " @@ -2053,13 +2053,13 @@ msgstr "" "式 (target encoding) は、 codec を動作させているマシン上のユーザ設定で定義さ" "れています。" -#: ../../c-api/unicode.rst:1472 +#: ../../c-api/unicode.rst:1473 msgid "" "Create a Unicode object by decoding *size* bytes of the MBCS encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: ../../c-api/unicode.rst:1479 +#: ../../c-api/unicode.rst:1480 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not " @@ -2071,13 +2071,13 @@ msgstr "" "`PyUnicode_DecodeMBCSStateful` は文字列の最後にあるマルチバイト文字の前半バイ" "トをデコードせず、 *consumed* にデコードしたバイト数を格納します。" -#: ../../c-api/unicode.rst:1488 +#: ../../c-api/unicode.rst:1489 msgid "" "Similar to :c:func:`PyUnicode_DecodeMBCSStateful`, except uses the code page " "specified by *code_page*." msgstr "" -#: ../../c-api/unicode.rst:1494 +#: ../../c-api/unicode.rst:1495 msgid "" "Encode a Unicode object using MBCS and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " @@ -2087,18 +2087,18 @@ msgstr "" "トとして返します。エラー処理は \"strict\" です。 codec が例外を送出した場合に" "は ``NULL`` を返します。" -#: ../../c-api/unicode.rst:1501 +#: ../../c-api/unicode.rst:1502 msgid "" "Encode the Unicode object using the specified code page and return a Python " "bytes object. Return ``NULL`` if an exception was raised by the codec. Use :" "c:macro:`!CP_ACP` code page to get the MBCS encoder." msgstr "" -#: ../../c-api/unicode.rst:1511 +#: ../../c-api/unicode.rst:1512 msgid "Methods and Slot Functions" msgstr "メソッドおよびスロット関数 (slot function)" -#: ../../c-api/unicode.rst:1513 +#: ../../c-api/unicode.rst:1514 msgid "" "The following APIs are capable of handling Unicode objects and strings on " "input (we refer to them as strings in the descriptions) and return Unicode " @@ -2108,17 +2108,17 @@ msgstr "" "も文字列と表記しています)、場合に応じて Unicode オブジェクトか整数を返す機能" "を持っています。" -#: ../../c-api/unicode.rst:1517 +#: ../../c-api/unicode.rst:1518 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" "これらの関数は全て、例外が発生した場合には ``NULL`` または ``-1`` を返しま" "す。" -#: ../../c-api/unicode.rst:1522 +#: ../../c-api/unicode.rst:1523 msgid "Concat two strings giving a new Unicode string." msgstr "二つの文字列を結合して、新たな Unicode 文字列を生成します。" -#: ../../c-api/unicode.rst:1527 +#: ../../c-api/unicode.rst:1528 msgid "" "Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " "splitting will be done at all whitespace substrings. Otherwise, splits " @@ -2132,33 +2132,33 @@ msgstr "" "います。 *maxsplit* が負ならば分割数に制限を設けません。分割結果のリスト内に" "は分割文字は含みません。" -#: ../../c-api/unicode.rst:1532 ../../c-api/unicode.rst:1542 -#: ../../c-api/unicode.rst:1563 ../../c-api/unicode.rst:1576 +#: ../../c-api/unicode.rst:1533 ../../c-api/unicode.rst:1543 +#: ../../c-api/unicode.rst:1564 ../../c-api/unicode.rst:1577 msgid "On error, return ``NULL`` with an exception set." msgstr "" -#: ../../c-api/unicode.rst:1534 +#: ../../c-api/unicode.rst:1535 msgid "Equivalent to :py:meth:`str.split`." msgstr "" -#: ../../c-api/unicode.rst:1539 +#: ../../c-api/unicode.rst:1540 msgid "" "Similar to :c:func:`PyUnicode_Split`, but splitting will be done beginning " "at the end of the string." msgstr "" -#: ../../c-api/unicode.rst:1544 +#: ../../c-api/unicode.rst:1545 msgid "Equivalent to :py:meth:`str.rsplit`." msgstr "" -#: ../../c-api/unicode.rst:1549 +#: ../../c-api/unicode.rst:1550 msgid "" "Split a Unicode string at line breaks, returning a list of Unicode strings. " "CRLF is considered to be one line break. If *keepends* is ``0``, the Line " "break characters are not included in the resulting strings." msgstr "" -#: ../../c-api/unicode.rst:1556 +#: ../../c-api/unicode.rst:1557 msgid "" "Split a Unicode string at the first occurrence of *sep*, and return a 3-" "tuple containing the part before the separator, the separator itself, and " @@ -2166,26 +2166,26 @@ msgid "" "tuple containing the string itself, followed by two empty strings." msgstr "" -#: ../../c-api/unicode.rst:1561 ../../c-api/unicode.rst:1574 +#: ../../c-api/unicode.rst:1562 ../../c-api/unicode.rst:1575 msgid "*sep* must not be empty." msgstr "" -#: ../../c-api/unicode.rst:1565 +#: ../../c-api/unicode.rst:1566 msgid "Equivalent to :py:meth:`str.partition`." msgstr "" -#: ../../c-api/unicode.rst:1570 +#: ../../c-api/unicode.rst:1571 msgid "" "Similar to :c:func:`PyUnicode_Partition`, but split a Unicode string at the " "last occurrence of *sep*. If the separator is not found, return a 3-tuple " "containing two empty strings, followed by the string itself." msgstr "" -#: ../../c-api/unicode.rst:1578 +#: ../../c-api/unicode.rst:1579 msgid "Equivalent to :py:meth:`str.rpartition`." msgstr "" -#: ../../c-api/unicode.rst:1583 +#: ../../c-api/unicode.rst:1584 msgid "" "Join a sequence of strings using the given *separator* and return the " "resulting Unicode string." @@ -2193,14 +2193,14 @@ msgstr "" "指定した *separator* で文字列からなるシーケンスを連結 (join) し、連結結果を " "Unicode 文字列で返します。" -#: ../../c-api/unicode.rst:1590 +#: ../../c-api/unicode.rst:1591 msgid "" "Return ``1`` if *substr* matches ``unicode[start:end]`` at the given tail " "end (*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` " "a suffix match), ``0`` otherwise. Return ``-1`` if an error occurred." msgstr "" -#: ../../c-api/unicode.rst:1598 +#: ../../c-api/unicode.rst:1599 msgid "" "Return the first position of *substr* in ``unicode[start:end]`` using the " "given *direction* (*direction* == ``1`` means to do a forward search, " @@ -2215,7 +2215,7 @@ msgstr "" "チが見つからなかったことを表し、 ``-2`` はエラーが発生して例外情報が設定され" "ていることを表します。" -#: ../../c-api/unicode.rst:1608 +#: ../../c-api/unicode.rst:1609 msgid "" "Return the first position of the character *ch* in ``unicode[start:end]`` " "using the given *direction* (*direction* == ``1`` means to do a forward " @@ -2231,12 +2231,12 @@ msgstr "" "チが見つからなかったことを表し、 ``-2`` はエラーが発生して例外情報が設定され" "ていることを表します。" -#: ../../c-api/unicode.rst:1616 +#: ../../c-api/unicode.rst:1617 msgid "" "*start* and *end* are now adjusted to behave like ``unicode[start:end]``." msgstr "" -#: ../../c-api/unicode.rst:1623 +#: ../../c-api/unicode.rst:1624 msgid "" "Return the number of non-overlapping occurrences of *substr* in " "``unicode[start:end]``. Return ``-1`` if an error occurred." @@ -2244,7 +2244,7 @@ msgstr "" "``unicode[start:end]`` に *substr* が重複することなく出現する回数を返します。" "エラーが発生した場合には ``-1`` を返します。" -#: ../../c-api/unicode.rst:1630 +#: ../../c-api/unicode.rst:1631 msgid "" "Replace at most *maxcount* occurrences of *substr* in *unicode* with " "*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` " @@ -2254,7 +2254,7 @@ msgstr "" "換結果である Unicode オブジェクトを返します。\n" "*maxcount* == ``-1`` にすると、文字列中に現れる全ての *substr* を置換します。" -#: ../../c-api/unicode.rst:1637 +#: ../../c-api/unicode.rst:1638 msgid "" "Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " "and greater than, respectively." @@ -2263,7 +2263,7 @@ msgstr "" "左引数が右引数より大きい場合に対して、それぞれ ``-1``, ``0``, ``1`` を返しま" "す。" -#: ../../c-api/unicode.rst:1640 +#: ../../c-api/unicode.rst:1641 msgid "" "This function returns ``-1`` upon failure, so one should call :c:func:" "`PyErr_Occurred` to check for errors." @@ -2271,43 +2271,43 @@ msgstr "" "この関数は、失敗したときに ``-1`` を返すので、 :c:func:`PyErr_Occurred` を呼" "び出して、エラーをチェックすべきです。" -#: ../../c-api/unicode.rst:1645 +#: ../../c-api/unicode.rst:1646 msgid "The :c:func:`PyUnicode_Equal` function." msgstr "" -#: ../../c-api/unicode.rst:1650 +#: ../../c-api/unicode.rst:1651 msgid "Test if two strings are equal:" msgstr "" -#: ../../c-api/unicode.rst:1652 +#: ../../c-api/unicode.rst:1653 msgid "Return ``1`` if *a* is equal to *b*." msgstr "" -#: ../../c-api/unicode.rst:1653 +#: ../../c-api/unicode.rst:1654 msgid "Return ``0`` if *a* is not equal to *b*." msgstr "" -#: ../../c-api/unicode.rst:1654 +#: ../../c-api/unicode.rst:1655 msgid "" "Set a :exc:`TypeError` exception and return ``-1`` if *a* or *b* is not a :" "class:`str` object." msgstr "" -#: ../../c-api/unicode.rst:1657 +#: ../../c-api/unicode.rst:1658 msgid "The function always succeeds if *a* and *b* are :class:`str` objects." msgstr "" -#: ../../c-api/unicode.rst:1659 +#: ../../c-api/unicode.rst:1660 msgid "" "The function works for :class:`str` subclasses, but does not honor custom " "``__eq__()`` method." msgstr "" -#: ../../c-api/unicode.rst:1664 +#: ../../c-api/unicode.rst:1665 msgid "The :c:func:`PyUnicode_Compare` function." msgstr "" -#: ../../c-api/unicode.rst:1671 +#: ../../c-api/unicode.rst:1672 msgid "" "Compare a Unicode object with a char buffer which is interpreted as being " "UTF-8 or ASCII encoded and return true (``1``) if they are equal, or false " @@ -2316,18 +2316,18 @@ msgid "" "is returned." msgstr "" -#: ../../c-api/unicode.rst:1678 ../../c-api/unicode.rst:1699 +#: ../../c-api/unicode.rst:1679 ../../c-api/unicode.rst:1700 msgid "This function does not raise exceptions." msgstr "この関数は例外を送出しません。" -#: ../../c-api/unicode.rst:1685 +#: ../../c-api/unicode.rst:1686 msgid "" "Similar to :c:func:`PyUnicode_EqualToUTF8AndSize`, but compute *string* " "length using :c:func:`!strlen`. If the Unicode object contains null " "characters, false (``0``) is returned." msgstr "" -#: ../../c-api/unicode.rst:1694 +#: ../../c-api/unicode.rst:1695 msgid "" "Compare a Unicode object, *unicode*, with *string* and return ``-1``, ``0``, " "``1`` for less than, equal, and greater than, respectively. It is best to " @@ -2340,31 +2340,31 @@ msgstr "" "ASCII エンコードされた文字列だけを渡すのが最も良いですが、入力文字列に非 " "ASCII 文字が含まれている場合は ISO-8859-1 として解釈します。" -#: ../../c-api/unicode.rst:1704 +#: ../../c-api/unicode.rst:1705 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "二つのUnicode文字列を比較して、下のうちの一つを返します:" -#: ../../c-api/unicode.rst:1706 +#: ../../c-api/unicode.rst:1707 msgid "``NULL`` in case an exception was raised" msgstr "``NULL`` を、例外が発生したときに返します。" -#: ../../c-api/unicode.rst:1707 +#: ../../c-api/unicode.rst:1708 msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons" msgstr "" ":c:data:`Py_True` もしくは :c:data:`Py_False` を、正しく比較できた時に返しま" "す。" -#: ../../c-api/unicode.rst:1708 +#: ../../c-api/unicode.rst:1709 msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown" msgstr "" -#: ../../c-api/unicode.rst:1710 +#: ../../c-api/unicode.rst:1711 msgid "" "Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:" "`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`." msgstr "" -#: ../../c-api/unicode.rst:1716 +#: ../../c-api/unicode.rst:1717 msgid "" "Return a new string object from *format* and *args*; this is analogous to " "``format % args``." @@ -2372,14 +2372,14 @@ msgstr "" "新たな文字列オブジェクトを *format* および *args* から生成して返します; この" "メソッドは ``format % args`` のようなものです。" -#: ../../c-api/unicode.rst:1722 +#: ../../c-api/unicode.rst:1723 msgid "" "Check whether *substr* is contained in *unicode* and return true or false " "accordingly." msgstr "" "*substr* が *unicode* 内にあるか調べ、その結果に応じて真または偽を返します。" -#: ../../c-api/unicode.rst:1725 +#: ../../c-api/unicode.rst:1726 msgid "" "*substr* has to coerce to a one element Unicode string. ``-1`` is returned " "if there was an error." @@ -2387,7 +2387,7 @@ msgstr "" "*substr* は単要素の Unicode 文字に型強制できなければなりません。エラーが生じ" "た場合には ``-1`` を返します。" -#: ../../c-api/unicode.rst:1731 +#: ../../c-api/unicode.rst:1732 msgid "" "Intern the argument :c:expr:`*p_unicode` in place. The argument must be the " "address of a pointer variable pointing to a Python Unicode string object. " @@ -2398,7 +2398,7 @@ msgid "" "interns it." msgstr "" -#: ../../c-api/unicode.rst:1738 +#: ../../c-api/unicode.rst:1739 msgid "" "(Clarification: even though there is a lot of talk about references, think " "of this function as reference-neutral. You must own the object you pass in; " @@ -2406,39 +2406,39 @@ msgid "" "the result.)" msgstr "" -#: ../../c-api/unicode.rst:1743 +#: ../../c-api/unicode.rst:1744 msgid "" "This function never raises an exception. On error, it leaves its argument " "unchanged without interning it." msgstr "" -#: ../../c-api/unicode.rst:1746 +#: ../../c-api/unicode.rst:1747 msgid "" "Instances of subclasses of :py:class:`str` may not be interned, that is, :c:" "expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not, then -- " "as with any other error -- the argument is left unchanged." msgstr "" -#: ../../c-api/unicode.rst:1750 +#: ../../c-api/unicode.rst:1751 msgid "" "Note that interned strings are not “immortal”. You must keep a reference to " "the result to benefit from interning." msgstr "" -#: ../../c-api/unicode.rst:1756 +#: ../../c-api/unicode.rst:1757 msgid "" "A combination of :c:func:`PyUnicode_FromString` and :c:func:" "`PyUnicode_InternInPlace`, meant for statically allocated strings." msgstr "" -#: ../../c-api/unicode.rst:1759 +#: ../../c-api/unicode.rst:1760 msgid "" "Return a new (\"owned\") reference to either a new Unicode string object " "that has been interned, or an earlier interned string object with the same " "value." msgstr "" -#: ../../c-api/unicode.rst:1763 +#: ../../c-api/unicode.rst:1764 msgid "" "Python may keep a reference to the result, or make it :term:`immortal`, " "preventing it from being garbage-collected promptly. For interning an " @@ -2447,14 +2447,14 @@ msgid "" "`PyUnicode_InternInPlace` directly." msgstr "" -#: ../../c-api/unicode.rst:1772 +#: ../../c-api/unicode.rst:1773 msgid "" "Return a non-zero value if *str* is interned, zero if not. The *str* " "argument must be a string; this is not checked. This function always " "succeeds." msgstr "" -#: ../../c-api/unicode.rst:1778 +#: ../../c-api/unicode.rst:1779 msgid "" "A non-zero return value may carry additional information about *how* the " "string is interned. The meaning of such non-zero values, as well as each " @@ -2462,201 +2462,201 @@ msgid "" "versions." msgstr "" -#: ../../c-api/unicode.rst:1785 +#: ../../c-api/unicode.rst:1786 msgid "PyUnicodeWriter" msgstr "" -#: ../../c-api/unicode.rst:1787 +#: ../../c-api/unicode.rst:1788 msgid "" "The :c:type:`PyUnicodeWriter` API can be used to create a Python :class:" "`str` object." msgstr "" -#: ../../c-api/unicode.rst:1794 +#: ../../c-api/unicode.rst:1795 msgid "A Unicode writer instance." msgstr "" -#: ../../c-api/unicode.rst:1796 +#: ../../c-api/unicode.rst:1797 msgid "" "The instance must be destroyed by :c:func:`PyUnicodeWriter_Finish` on " "success, or :c:func:`PyUnicodeWriter_Discard` on error." msgstr "" -#: ../../c-api/unicode.rst:1801 +#: ../../c-api/unicode.rst:1802 msgid "Create a Unicode writer instance." msgstr "" -#: ../../c-api/unicode.rst:1803 +#: ../../c-api/unicode.rst:1804 msgid "*length* must be greater than or equal to ``0``." msgstr "" -#: ../../c-api/unicode.rst:1805 +#: ../../c-api/unicode.rst:1806 msgid "" "If *length* is greater than ``0``, preallocate an internal buffer of " "*length* characters." msgstr "" -#: ../../c-api/unicode.rst:1808 ../../c-api/unicode.rst:1814 +#: ../../c-api/unicode.rst:1809 ../../c-api/unicode.rst:1815 msgid "Set an exception and return ``NULL`` on error." msgstr "" -#: ../../c-api/unicode.rst:1812 +#: ../../c-api/unicode.rst:1813 msgid "" "Return the final Python :class:`str` object and destroy the writer instance." msgstr "" -#: ../../c-api/unicode.rst:1816 ../../c-api/unicode.rst:1824 +#: ../../c-api/unicode.rst:1817 ../../c-api/unicode.rst:1825 msgid "The writer instance is invalid after this call." msgstr "" -#: ../../c-api/unicode.rst:1820 +#: ../../c-api/unicode.rst:1821 msgid "Discard the internal Unicode buffer and destroy the writer instance." msgstr "" -#: ../../c-api/unicode.rst:1822 +#: ../../c-api/unicode.rst:1823 msgid "If *writer* is ``NULL``, no operation is performed." msgstr "" -#: ../../c-api/unicode.rst:1828 +#: ../../c-api/unicode.rst:1829 msgid "Write the single Unicode character *ch* into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1830 ../../c-api/unicode.rst:1840 -#: ../../c-api/unicode.rst:1855 ../../c-api/unicode.rst:1865 -#: ../../c-api/unicode.rst:1874 ../../c-api/unicode.rst:1881 -#: ../../c-api/unicode.rst:1894 ../../c-api/unicode.rst:1909 -#: ../../c-api/unicode.rst:1916 ../../c-api/unicode.rst:1935 +#: ../../c-api/unicode.rst:1831 ../../c-api/unicode.rst:1841 +#: ../../c-api/unicode.rst:1856 ../../c-api/unicode.rst:1866 +#: ../../c-api/unicode.rst:1875 ../../c-api/unicode.rst:1882 +#: ../../c-api/unicode.rst:1895 ../../c-api/unicode.rst:1910 +#: ../../c-api/unicode.rst:1917 ../../c-api/unicode.rst:1936 msgid "" "On success, return ``0``. On error, set an exception, leave the writer " "unchanged, and return ``-1``." msgstr "" -#: ../../c-api/unicode.rst:1835 +#: ../../c-api/unicode.rst:1836 msgid "" "Decode the string *str* from UTF-8 in strict mode and write the output into " "*writer*." msgstr "" -#: ../../c-api/unicode.rst:1837 ../../c-api/unicode.rst:1849 -#: ../../c-api/unicode.rst:1924 +#: ../../c-api/unicode.rst:1838 ../../c-api/unicode.rst:1850 +#: ../../c-api/unicode.rst:1925 msgid "" "*size* is the string length in bytes. If *size* is equal to ``-1``, call " "``strlen(str)`` to get the string length." msgstr "" -#: ../../c-api/unicode.rst:1843 +#: ../../c-api/unicode.rst:1844 msgid "See also :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`." msgstr "" -#: ../../c-api/unicode.rst:1847 +#: ../../c-api/unicode.rst:1848 msgid "Write the ASCII string *str* into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1852 +#: ../../c-api/unicode.rst:1853 msgid "" "*str* must only contain ASCII characters. The behavior is undefined if *str* " "contains non-ASCII characters." msgstr "" -#: ../../c-api/unicode.rst:1860 +#: ../../c-api/unicode.rst:1861 msgid "Write the wide string *str* into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1862 +#: ../../c-api/unicode.rst:1863 msgid "" "*size* is a number of wide characters. If *size* is equal to ``-1``, call " "``wcslen(str)`` to get the string length." msgstr "" -#: ../../c-api/unicode.rst:1870 +#: ../../c-api/unicode.rst:1871 msgid "Writer the UCS4 string *str* into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1872 +#: ../../c-api/unicode.rst:1873 msgid "*size* is a number of UCS4 characters." msgstr "" -#: ../../c-api/unicode.rst:1879 +#: ../../c-api/unicode.rst:1880 msgid "" "Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1884 +#: ../../c-api/unicode.rst:1885 msgid "" "To write a :class:`str` subclass which overrides the :meth:`~object.__str__` " "method, :c:func:`PyUnicode_FromObject` can be used to get the original " "string." msgstr "" -#: ../../c-api/unicode.rst:1890 +#: ../../c-api/unicode.rst:1891 msgid "" "Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1892 +#: ../../c-api/unicode.rst:1893 msgid "If *obj* is ``NULL``, write the string ``\"\"`` into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1899 +#: ../../c-api/unicode.rst:1900 msgid "Added support for ``NULL``." msgstr "" -#: ../../c-api/unicode.rst:1903 +#: ../../c-api/unicode.rst:1904 msgid "Write the substring ``str[start:end]`` into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1905 +#: ../../c-api/unicode.rst:1906 msgid "" "*str* must be Python :class:`str` object. *start* must be greater than or " "equal to 0, and less than or equal to *end*. *end* must be less than or " "equal to *str* length." msgstr "" -#: ../../c-api/unicode.rst:1914 +#: ../../c-api/unicode.rst:1915 msgid "" "Similar to :c:func:`PyUnicode_FromFormat`, but write the output directly " "into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1921 +#: ../../c-api/unicode.rst:1922 msgid "" "Decode the string *str* from UTF-8 with *errors* error handler and write the " "output into *writer*." msgstr "" -#: ../../c-api/unicode.rst:1927 +#: ../../c-api/unicode.rst:1928 msgid "" "*errors* is an :ref:`error handler ` name, such as " "``\"replace\"``. If *errors* is ``NULL``, use the strict error handler." msgstr "" -#: ../../c-api/unicode.rst:1930 +#: ../../c-api/unicode.rst:1931 msgid "" "If *consumed* is not ``NULL``, set *\\*consumed* to the number of decoded " "bytes on success. If *consumed* is ``NULL``, treat trailing incomplete UTF-8 " "byte sequences as an error." msgstr "" -#: ../../c-api/unicode.rst:1938 +#: ../../c-api/unicode.rst:1939 msgid "See also :c:func:`PyUnicodeWriter_WriteUTF8`." msgstr "" -#: ../../c-api/unicode.rst:1941 +#: ../../c-api/unicode.rst:1942 msgid "Deprecated API" msgstr "" -#: ../../c-api/unicode.rst:1943 +#: ../../c-api/unicode.rst:1944 msgid "The following API is deprecated." msgstr "" -#: ../../c-api/unicode.rst:1947 +#: ../../c-api/unicode.rst:1948 msgid "" "This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " "type depending on the platform. Please use :c:type:`wchar_t` directly " "instead." msgstr "" -#: ../../c-api/unicode.rst:1951 +#: ../../c-api/unicode.rst:1952 msgid "" "In previous versions, this was a 16-bit type or a 32-bit type depending on " "whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " @@ -2666,26 +2666,26 @@ msgstr "" "Unicode バージョンのどちらを選択したかによって、 16ビットか32ビットのどちらか" "の型になっていました。" -#: ../../c-api/unicode.rst:1961 +#: ../../c-api/unicode.rst:1962 msgid "" "Do nothing and return ``0``. This API is kept only for backward " "compatibility, but there are no plans to remove it." msgstr "" -#: ../../c-api/unicode.rst:1967 +#: ../../c-api/unicode.rst:1968 msgid "" "This API does nothing since Python 3.12. Previously, this needed to be " "called for each string created using the old API (:c:func:`!" "PyUnicode_FromUnicode` or similar)." msgstr "" -#: ../../c-api/unicode.rst:1975 +#: ../../c-api/unicode.rst:1976 msgid "" "Do nothing and return ``1``. This API is kept only for backward " "compatibility, but there are no plans to remove it." msgstr "" -#: ../../c-api/unicode.rst:1981 +#: ../../c-api/unicode.rst:1982 msgid "" "This API does nothing since Python 3.12. Previously, this could be called to " "check if :c:func:`PyUnicode_READY` is necessary." diff --git a/c-api/utilities.po b/c-api/utilities.po index c5f1decc2..35405fe30 100644 --- a/c-api/utilities.po +++ b/c-api/utilities.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index 74f6b2803..b684867aa 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-29 17:28+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -505,7 +505,111 @@ msgid "" "mod:`!ast` Python module, which exports these constants under the same names." msgstr "" -#: ../../c-api/veryhigh.rst:346 +#: ../../c-api/veryhigh.rst:347 +msgid "Low-level flags" +msgstr "" + +#: ../../c-api/veryhigh.rst:348 +msgid "" +"The following flags and masks serve narrow needs of the standard library and " +"interactive interpreters. Code outside the standard library rarely has a " +"reason to use them. They are considered implementation details and may " +"change at any time." +msgstr "" + +#: ../../c-api/veryhigh.rst:355 +msgid "" +"This flag is a private interface between the compiler and the :mod:`codeop` " +"module. Do not use it; its behavior is unsupported and may change without " +"warning." +msgstr "" + +#: ../../c-api/veryhigh.rst:359 +msgid "" +"With this flag set, when compilation fails because the source text ends " +"where more input is expected, for example in the middle of an indented block " +"or an unterminated string literal, the error raised is the undocumented " +"``_IncompleteInputError``, a subclass of :exc:`SyntaxError`. The :mod:" +"`codeop` module sets this flag, together with :c:macro:" +"`PyCF_DONT_IMPLY_DEDENT`, to tell input that is incomplete apart from input " +"with a real syntax error, so that interactive interpreters know when to " +"prompt for another line instead of reporting an error." +msgstr "" + +#: ../../c-api/veryhigh.rst:373 +msgid "" +"By default, when compiling with the :c:var:`Py_single_input` start symbol, " +"reaching the end of the source text implicitly closes any open indented " +"blocks. With this flag set, open blocks are only closed if the last line of " +"the source ends with a newline; otherwise, compilation fails with a :exc:" +"`SyntaxError`:" +msgstr "" + +#: ../../c-api/veryhigh.rst:379 +msgid "" +"PyCompilerFlags flags = {\n" +" .cf_flags = 0,\n" +" .cf_feature_version = PY_MINOR_VERSION,\n" +"};\n" +"const char *source = \"if a:\\n pass\";\n" +"\n" +"/* The \"if\" block is closed implicitly;\n" +" this returns a code object: */\n" +"Py_CompileStringFlags(source, \"\", Py_single_input, &flags);\n" +"\n" +"/* With the flag, this fails with a SyntaxError,\n" +" because the last line does not end with a newline: */\n" +"flags.cf_flags = PyCF_DONT_IMPLY_DEDENT;\n" +"Py_CompileStringFlags(source, \"\", Py_single_input, &flags);" +msgstr "" + +#: ../../c-api/veryhigh.rst:396 +msgid "" +"The :mod:`codeop` module uses this flag to detect incomplete interactive " +"input. While the user is still typing inside an indented block, the source " +"does not yet end with a newline, so it fails to compile and the user is " +"prompted for another line." +msgstr "" + +#: ../../c-api/veryhigh.rst:403 +msgid "" +"Read the source text as UTF-8, ignoring its :pep:`263` encoding declaration " +"(\"coding cookie\"), if any:" +msgstr "" + +#: ../../c-api/veryhigh.rst:406 +msgid "" +"PyCompilerFlags flags = {\n" +" .cf_flags = 0,\n" +" .cf_feature_version = PY_MINOR_VERSION,\n" +"};\n" +"const char *source = \"# coding: latin-1\\ns = '\\xe9'\\n\";\n" +"\n" +"/* The coding cookie is honored: byte 0xE9 is decoded as\n" +" Latin-1, and this returns a code object that sets s to \"é\": */\n" +"Py_CompileStringFlags(source, \"\", Py_file_input, &flags);\n" +"\n" +"/* With the flag, the cookie is ignored and compilation fails\n" +" with a SyntaxError, because 0xE9 is not valid UTF-8: */\n" +"flags.cf_flags = PyCF_IGNORE_COOKIE;\n" +"Py_CompileStringFlags(source, \"\", Py_file_input, &flags);" +msgstr "" + +#: ../../c-api/veryhigh.rst:423 +msgid "" +"The :func:`compile`, :func:`eval` and :func:`exec` built-in functions set " +"this flag when the source is a :class:`str` object, because they pass the " +"text to the parser encoded as UTF-8." +msgstr "" + +#: ../../c-api/veryhigh.rst:429 +msgid "" +"Mark the source text as known to be UTF-8 encoded. The :func:`compile`, :" +"func:`eval` and :func:`exec` built-in functions set this flag, but it " +"currently has no effect." +msgstr "" + +#: ../../c-api/veryhigh.rst:433 msgid "" "The \"``PyCF``\" flags above can be combined with \"``CO_FUTURE``\" flags " "such as :c:macro:`CO_FUTURE_ANNOTATIONS` to enable features normally " @@ -513,11 +617,42 @@ msgid "" "`c_codeobject_flags` for a complete list." msgstr "" -#: ../../c-api/veryhigh.rst:355 +#: ../../c-api/veryhigh.rst:438 +msgid "The following masks combine several flags:" +msgstr "" + +#: ../../c-api/veryhigh.rst:442 +msgid "" +"Bitmask of all ``CO_FUTURE`` flags (see :ref:`c_codeobject_flags`), which " +"select features normally enabled by :ref:`future statements `. When " +"code compiled with a ``PyCompilerFlags *flags`` argument contains a ``from " +"__future__ import`` statement, the flag for the imported feature is added to " +"*flags*, so that code executed later in the same context inherits it." +msgstr "" + +#: ../../c-api/veryhigh.rst:452 +msgid "" +"Do not use this mask in new code. It is kept only so that old code passing " +"its flags to :func:`compile` keeps working." +msgstr "" + +#: ../../c-api/veryhigh.rst:455 +msgid "" +"Bitmask of flags for obsolete future features that no longer have any effect." +msgstr "" + +#: ../../c-api/veryhigh.rst:460 +msgid "" +"Bitmask of all ``PyCF`` flags that change how the source is compiled, such " +"as :c:macro:`PyCF_ONLY_AST`. The :func:`compile` built-in function uses this " +"mask to validate its *flags* argument." +msgstr "" + +#: ../../c-api/veryhigh.rst:469 msgid "Available start symbols" msgstr "" -#: ../../c-api/veryhigh.rst:362 +#: ../../c-api/veryhigh.rst:476 msgid "" "The start symbol from the Python grammar for isolated expressions; for use " "with :c:func:`Py_CompileString`." @@ -525,7 +660,7 @@ msgstr "" "単独の式に対するPython文法の開始記号で、 :c:func:`Py_CompileString` と一緒に" "使います。" -#: ../../c-api/veryhigh.rst:370 +#: ../../c-api/veryhigh.rst:484 msgid "" "The start symbol from the Python grammar for sequences of statements as read " "from a file or other source; for use with :c:func:`Py_CompileString`. This " @@ -535,7 +670,7 @@ msgstr "" "号で、 :c:func:`Py_CompileString` と一緒に使います。これは任意の長さのPython" "ソースコードをコンパイルするときに使う記号です。" -#: ../../c-api/veryhigh.rst:379 +#: ../../c-api/veryhigh.rst:493 msgid "" "The start symbol from the Python grammar for a single statement; for use " "with :c:func:`Py_CompileString`. This is the symbol used for the interactive " @@ -544,64 +679,64 @@ msgstr "" "単一の文に対するPython文法の開始記号で、 :c:func:`Py_CompileString` と一緒に" "使います。これは対話式のインタプリタループのための記号です。" -#: ../../c-api/veryhigh.rst:388 +#: ../../c-api/veryhigh.rst:502 msgid "" "The start symbol from the Python grammar for a function type; for use with :" "c:func:`Py_CompileString`. This is used to parse \"signature type comments\" " "from :pep:`484`." msgstr "" -#: ../../c-api/veryhigh.rst:392 +#: ../../c-api/veryhigh.rst:506 msgid "This requires the :c:macro:`PyCF_ONLY_AST` flag to be set." msgstr "" -#: ../../c-api/veryhigh.rst:395 +#: ../../c-api/veryhigh.rst:509 msgid ":py:class:`ast.FunctionType`" msgstr "" -#: ../../c-api/veryhigh.rst:396 +#: ../../c-api/veryhigh.rst:510 msgid ":pep:`484`" msgstr "" -#: ../../c-api/veryhigh.rst:402 +#: ../../c-api/veryhigh.rst:516 msgid "Stack Effects" msgstr "" -#: ../../c-api/veryhigh.rst:405 +#: ../../c-api/veryhigh.rst:519 msgid ":py:func:`dis.stack_effect`" msgstr "" -#: ../../c-api/veryhigh.rst:410 +#: ../../c-api/veryhigh.rst:524 msgid "Sentinel value representing an invalid stack effect." msgstr "" -#: ../../c-api/veryhigh.rst:412 +#: ../../c-api/veryhigh.rst:526 msgid "This is currently equivalent to ``INT_MAX``." msgstr "" -#: ../../c-api/veryhigh.rst:419 +#: ../../c-api/veryhigh.rst:533 msgid "Compute the stack effect of *opcode* with argument *oparg*." msgstr "*opcode* と引数 *oparg* がスタックに与える影響を計算します。" -#: ../../c-api/veryhigh.rst:421 ../../c-api/veryhigh.rst:435 +#: ../../c-api/veryhigh.rst:535 ../../c-api/veryhigh.rst:549 msgid "" "On success, this function returns the stack effect; on failure, this " "returns :c:macro:`PY_INVALID_STACK_EFFECT`." msgstr "" -#: ../../c-api/veryhigh.rst:429 +#: ../../c-api/veryhigh.rst:543 msgid "" "Similar to :c:func:`PyCompile_OpcodeStackEffect`, but don't include the " "stack effect of jumping if *jump* is zero." msgstr "" -#: ../../c-api/veryhigh.rst:432 +#: ../../c-api/veryhigh.rst:546 msgid "" "If *jump* is ``0``, this will not include the stack effect of jumping, but " "if *jump* is ``1`` or ``-1``, this will include it." msgstr "" -#: ../../c-api/veryhigh.rst:360 ../../c-api/veryhigh.rst:368 -#: ../../c-api/veryhigh.rst:377 ../../c-api/veryhigh.rst:386 +#: ../../c-api/veryhigh.rst:474 ../../c-api/veryhigh.rst:482 +#: ../../c-api/veryhigh.rst:491 ../../c-api/veryhigh.rst:500 msgid "Py_CompileString (C function)" msgstr "" diff --git a/c-api/weakref.po b/c-api/weakref.po index 15134d74b..b7e4c9723 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/contents.po b/contents.po index 2e0dc5bb7..0dab08c28 100644 --- a/contents.po +++ b/contents.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/copyright.po b/copyright.po index 7e630abc8..3e2aed91a 100644 --- a/copyright.po +++ b/copyright.po @@ -5,16 +5,16 @@ # # Translators: # python-doc bot, 2025 -# Yoshihoko, 2025 +# よっちゃん, 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" -"Last-Translator: Yoshihoko, 2025\n" +"Last-Translator: よっちゃん, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "MIME-Version: 1.0\n" diff --git a/deprecations/c-api-pending-removal-in-3.14.po b/deprecations/c-api-pending-removal-in-3.14.po index 0f4b86d2d..89d292f87 100644 --- a/deprecations/c-api-pending-removal-in-3.14.po +++ b/deprecations/c-api-pending-removal-in-3.14.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/deprecations/c-api-pending-removal-in-3.15.po b/deprecations/c-api-pending-removal-in-3.15.po index 5b48a1e59..c9c728e4e 100644 --- a/deprecations/c-api-pending-removal-in-3.15.po +++ b/deprecations/c-api-pending-removal-in-3.15.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/deprecations/c-api-pending-removal-in-3.16.po b/deprecations/c-api-pending-removal-in-3.16.po index 57963be49..852cee798 100644 --- a/deprecations/c-api-pending-removal-in-3.16.po +++ b/deprecations/c-api-pending-removal-in-3.16.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/deprecations/c-api-pending-removal-in-3.18.po b/deprecations/c-api-pending-removal-in-3.18.po index 2281a9f16..2b38ae2df 100644 --- a/deprecations/c-api-pending-removal-in-3.18.po +++ b/deprecations/c-api-pending-removal-in-3.18.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/deprecations/c-api-pending-removal-in-future.po b/deprecations/c-api-pending-removal-in-future.po index b93e78723..4ca44d222 100644 --- a/deprecations/c-api-pending-removal-in-future.po +++ b/deprecations/c-api-pending-removal-in-future.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/deprecations/index.po b/deprecations/index.po index 6584efcde..590caba74 100644 --- a/deprecations/index.po +++ b/deprecations/index.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: qqfunc, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -248,7 +248,7 @@ msgid "" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:16 -#: ../../deprecations/pending-removal-in-3.17.rst:55 +#: ../../deprecations/pending-removal-in-3.17.rst:62 msgid "" "Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` " "implements the :ref:`buffer protocol ` at runtime. For use in " @@ -258,7 +258,7 @@ msgid "" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:22 -#: ../../deprecations/pending-removal-in-3.17.rst:61 +#: ../../deprecations/pending-removal-in-3.17.rst:68 msgid "" ":class:`!ByteString` was originally intended to be an abstract class that " "would serve as a supertype of both :class:`bytes` and :class:`bytearray`. " @@ -270,7 +270,7 @@ msgid "" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:30 -#: ../../deprecations/pending-removal-in-3.17.rst:69 +#: ../../deprecations/pending-removal-in-3.17.rst:76 msgid "" "See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by " "Shantanu Jain in :gh:`91896`.)" @@ -288,20 +288,33 @@ msgid "" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:40 -msgid ":mod:`webbrowser`:" +msgid ":mod:`profile`:" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:42 msgid "" +"The :mod:`!profile` module is deprecated and will be removed in Python 3.17. " +"Use :mod:`profiling.tracing` instead, which provides a compatible API. See :" +"pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár " +"in :gh:`138122`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:47 +msgid ":mod:`webbrowser`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:49 +msgid "" ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!" "webbrowser.MacOS`. (:gh:`137586`)" msgstr "" -#: ../../deprecations/pending-removal-in-3.17.rst:45 +#: ../../deprecations/pending-removal-in-3.17.rst:52 +#: ../../deprecations/pending-removal-in-3.20.rst:57 msgid ":mod:`typing`:" msgstr "" -#: ../../deprecations/pending-removal-in-3.17.rst:47 +#: ../../deprecations/pending-removal-in-3.17.rst:54 msgid "" "Before Python 3.14, old-style unions were implemented using the private " "class ``typing._UnionGenericAlias``. This class is no longer needed for the " @@ -311,12 +324,25 @@ msgid "" "of relying on private implementation details." msgstr "" -#: ../../deprecations/pending-removal-in-3.17.rst:52 +#: ../../deprecations/pending-removal-in-3.17.rst:59 msgid "" ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for " "removal in Python 3.17." msgstr "" +#: ../../deprecations/pending-removal-in-3.17.rst:79 +msgid ":mod:`tkinter`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:81 +msgid "" +"The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!" +"trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :" +"meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal " +"in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!" +"trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "" + #: ../../deprecations/c-api-pending-removal-in-3.18.rst:2 #: ../../deprecations/pending-removal-in-3.18.rst:2 msgid "Pending removal in Python 3.18" @@ -577,6 +603,18 @@ msgid "" "`!ast.expr`) is deprecated and will raise an error in Python 3.20." msgstr "" +#: ../../deprecations/pending-removal-in-3.20.rst:59 +msgid "" +"It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on " +"protocol classes that were not explicitly decorated with :func:`!" +"runtime_checkable` but that inherit from a runtime-checkable protocol class. " +"This will raise a :exc:`TypeError` in Python 3.20." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:64 +msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" +msgstr "" + #: ../../deprecations/c-api-pending-removal-in-future.rst:2 #: ../../deprecations/pending-removal-in-future.rst:2 msgid "Pending removal in future versions" @@ -969,6 +1007,13 @@ msgid "" "`148100`.)" msgstr "" +#: ../../deprecations/soft-deprecations.rst:23 +msgid "" +"Using ``'F'`` and ``'D'`` format type codes of the :mod:`struct` module now " +"are :term:`soft deprecated` in favor of two-letter forms ``'Zf'`` and " +"``'Zd'``. (Contributed by Sergey B Kirpichev in :gh:`121249`.)" +msgstr "" + #: ../../deprecations/index.rst:19 msgid "C API deprecations" msgstr "" diff --git a/deprecations/pending-removal-in-3.13.po b/deprecations/pending-removal-in-3.13.po index 7ca95dc12..21491dd76 100644 --- a/deprecations/pending-removal-in-3.13.po +++ b/deprecations/pending-removal-in-3.13.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/deprecations/pending-removal-in-3.14.po b/deprecations/pending-removal-in-3.14.po index e5293474f..5d890e294 100644 --- a/deprecations/pending-removal-in-3.14.po +++ b/deprecations/pending-removal-in-3.14.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/deprecations/pending-removal-in-3.15.po b/deprecations/pending-removal-in-3.15.po index 8411ef225..b481b529f 100644 --- a/deprecations/pending-removal-in-3.15.po +++ b/deprecations/pending-removal-in-3.15.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" @@ -155,7 +155,7 @@ msgstr "" #: ../../deprecations/pending-removal-in-3.15.rst:85 msgid "" -"The :func:`!typing.no_type_check_decorator` decorator function has been " +"The :deco:`!typing.no_type_check_decorator` decorator function has been " "deprecated since Python 3.13. After eight years in the :mod:`typing` module, " "it has yet to be supported by any major type checker." msgstr "" diff --git a/deprecations/pending-removal-in-3.16.po b/deprecations/pending-removal-in-3.16.po index 195e71d82..04dbd5f53 100644 --- a/deprecations/pending-removal-in-3.16.po +++ b/deprecations/pending-removal-in-3.16.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/deprecations/pending-removal-in-3.17.po b/deprecations/pending-removal-in-3.17.po index 039badef2..aebcedc23 100644 --- a/deprecations/pending-removal-in-3.17.po +++ b/deprecations/pending-removal-in-3.17.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" @@ -43,7 +43,7 @@ msgid "" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:16 -#: ../../deprecations/pending-removal-in-3.17.rst:55 +#: ../../deprecations/pending-removal-in-3.17.rst:62 msgid "" "Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` " "implements the :ref:`buffer protocol ` at runtime. For use in " @@ -53,7 +53,7 @@ msgid "" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:22 -#: ../../deprecations/pending-removal-in-3.17.rst:61 +#: ../../deprecations/pending-removal-in-3.17.rst:68 msgid "" ":class:`!ByteString` was originally intended to be an abstract class that " "would serve as a supertype of both :class:`bytes` and :class:`bytearray`. " @@ -65,7 +65,7 @@ msgid "" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:30 -#: ../../deprecations/pending-removal-in-3.17.rst:69 +#: ../../deprecations/pending-removal-in-3.17.rst:76 msgid "" "See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by " "Shantanu Jain in :gh:`91896`.)" @@ -83,20 +83,32 @@ msgid "" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:40 -msgid ":mod:`webbrowser`:" +msgid ":mod:`profile`:" msgstr "" #: ../../deprecations/pending-removal-in-3.17.rst:42 msgid "" +"The :mod:`!profile` module is deprecated and will be removed in Python 3.17. " +"Use :mod:`profiling.tracing` instead, which provides a compatible API. See :" +"pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár " +"in :gh:`138122`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:47 +msgid ":mod:`webbrowser`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:49 +msgid "" ":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!" "webbrowser.MacOS`. (:gh:`137586`)" msgstr "" -#: ../../deprecations/pending-removal-in-3.17.rst:45 +#: ../../deprecations/pending-removal-in-3.17.rst:52 msgid ":mod:`typing`:" msgstr "" -#: ../../deprecations/pending-removal-in-3.17.rst:47 +#: ../../deprecations/pending-removal-in-3.17.rst:54 msgid "" "Before Python 3.14, old-style unions were implemented using the private " "class ``typing._UnionGenericAlias``. This class is no longer needed for the " @@ -106,8 +118,21 @@ msgid "" "of relying on private implementation details." msgstr "" -#: ../../deprecations/pending-removal-in-3.17.rst:52 +#: ../../deprecations/pending-removal-in-3.17.rst:59 msgid "" ":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for " "removal in Python 3.17." msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:79 +msgid ":mod:`tkinter`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:81 +msgid "" +"The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!" +"trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :" +"meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal " +"in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!" +"trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "" diff --git a/deprecations/pending-removal-in-3.18.po b/deprecations/pending-removal-in-3.18.po index ed158d785..fee31e0d4 100644 --- a/deprecations/pending-removal-in-3.18.po +++ b/deprecations/pending-removal-in-3.18.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2026-01-07 14:20+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/deprecations/pending-removal-in-3.19.po b/deprecations/pending-removal-in-3.19.po index efda0dbc2..5da7b2f35 100644 --- a/deprecations/pending-removal-in-3.19.po +++ b/deprecations/pending-removal-in-3.19.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/deprecations/pending-removal-in-future.po b/deprecations/pending-removal-in-future.po index a072c490d..7e862c0ac 100644 --- a/deprecations/pending-removal-in-future.po +++ b/deprecations/pending-removal-in-future.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/distributing/index.po b/distributing/index.po index ac15ab8c8..811cbebfe 100644 --- a/distributing/index.po +++ b/distributing/index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/extending/building.po b/extending/building.po index 00c657f9e..622769ea6 100644 --- a/extending/building.po +++ b/extending/building.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: qqfunc, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/extending/embedding.po b/extending/embedding.po index 5b074056d..a5e1facf8 100644 --- a/extending/embedding.po +++ b/extending/embedding.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/extending/extending.po b/extending/extending.po index e91018021..48e941a6d 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-03 17:25+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1851,14 +1851,9 @@ msgid "" "which is especially useful for memory allocation and deallocation of the " "pointer stored in a Capsule. The details are described in the Python/C API " "Reference Manual in the section :ref:`capsules` and in the implementation of " -"Capsules (files :file:`Include/pycapsule.h` and :file:`Objects/pycapsule.c` " -"in the Python source code distribution)." -msgstr "" -"最後に、Capsule は、自身に保存されているポインタをメモリ確保したり解放したり" -"する際に特に便利な、もう一つの機能を提供しているということに触れておかねばな" -"りません。詳細は Python/C API リファレンスマニュアルの :ref:`capsules`, およ" -"び Capsule の実装部分 (Python ソースコード配布物中のファイル :file:`Include/" -"pycapsule.h` および :file:`Objects/pycapsule.c` に述べられています。" +"Capsules (files :file:`Include/pycapsule.h` and :file:`Objects/capsule.c` in " +"the Python source code distribution)." +msgstr "" #: ../../extending/extending.rst:1113 msgid "Footnotes" diff --git a/extending/index.po b/extending/index.po index 47bc5f309..b0e28f189 100644 --- a/extending/index.po +++ b/extending/index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -43,12 +43,13 @@ msgstr "" msgid "" "This document assumes basic knowledge about C and Python. For an informal " "introduction to Python, see :ref:`tutorial-index`. :ref:`reference-index` " -"gives a more formal definition of the language. :ref:`library-index` " -"documents the existing object types, functions and modules (both built-in " -"and written in Python) that give the language its wide application range." +"gives a more formal definition of the language. :ref:`builtins-index` " +"documents the built-in functions and object types, and :ref:`library-index` " +"documents the modules (both built-in and written in Python) that give the " +"language its wide application range." msgstr "" -#: ../../extending/index.rst:23 +#: ../../extending/index.rst:24 msgid "" "For a detailed description of the whole Python/C API, see the separate :ref:" "`c-api-index`." @@ -56,7 +57,7 @@ msgstr "" "Python/C API 全体の詳しい説明は、別のドキュメントである、 :ref:`c-api-index` " "を参照してください。" -#: ../../extending/index.rst:26 +#: ../../extending/index.rst:27 msgid "" "To support extensions, Python's C API (Application Programmers Interface) " "defines a set of functions, macros and variables that provide access to most " @@ -64,7 +65,7 @@ msgid "" "C source file by including the header ``\"Python.h\"``." msgstr "" -#: ../../extending/index.rst:33 +#: ../../extending/index.rst:34 msgid "" "The C extension interface is specific to CPython, and extension modules do " "not work on other Python implementations. In many cases, it is possible to " @@ -85,11 +86,11 @@ msgstr "" "書いてコンパイルするのに較べて Python 実装間のより高い移植性をもった Python " "コードを書かせてくれます。" -#: ../../extending/index.rst:58 +#: ../../extending/index.rst:59 msgid "Recommended third party tools" msgstr "おすすめのサードパーティツール" -#: ../../extending/index.rst:60 +#: ../../extending/index.rst:61 msgid "" "This document only covers the basic tools for creating extensions provided " "as part of this version of CPython. Some :ref:`third party tools ` and :ref:" +"`the tutorial ` for more information about :keyword:`match` " +"statements. An older alternative is a sequence of ``if... elif... elif... " +"else``." msgstr "" -"一般的に、構造化された switch 文は、式が特定の値または値の集合を持つとき、1" -"つのコードブロックを実行します。 Python 3.10 以降では、リテラル値や名前空間内" -"の定数を、 ``match ... case`` 文で簡単にマッチさせることができます。より古い" -"手段は一連の ``if... elif... elif... else`` です。" -#: ../../faq/design.rst:268 +#: ../../faq/design.rst:270 msgid "" "For cases where you need to choose from a very large number of " "possibilities, you can create a dictionary mapping case values to functions " @@ -569,7 +567,7 @@ msgstr "" "非常に大きな数の選択肢から選ぶとき、値を呼び出す関数に対応づける辞書を作れま" "す。例えば::" -#: ../../faq/design.rst:272 +#: ../../faq/design.rst:274 msgid "" "functions = {'a': function_1,\n" " 'b': function_2,\n" @@ -585,7 +583,7 @@ msgstr "" "func = functions[value]\n" "func()" -#: ../../faq/design.rst:279 +#: ../../faq/design.rst:281 msgid "" "For calling methods on objects, you can simplify yet further by using the :" "func:`getattr` built-in to retrieve methods with a particular name::" @@ -593,7 +591,7 @@ msgstr "" "オブジェクトのメソッドを呼び出すには、さらに単純に :func:`getattr` 組み込み関" "数で特定の名前のメソッドを検索できます::" -#: ../../faq/design.rst:282 +#: ../../faq/design.rst:284 msgid "" "class MyVisitor:\n" " def visit_a(self):\n" @@ -613,7 +611,7 @@ msgstr "" " method = getattr(self, method_name)\n" " method()" -#: ../../faq/design.rst:291 +#: ../../faq/design.rst:293 msgid "" "It's suggested that you use a prefix for the method names, such as " "``visit_`` in this example. Without such a prefix, if values are coming " @@ -624,7 +622,7 @@ msgstr "" "ような接頭辞がないと、信頼できないソースから値が与えられたときに、オブジェク" "トの任意のメソッドを呼び出す攻撃をされる可能性があります。" -#: ../../faq/design.rst:295 +#: ../../faq/design.rst:297 msgid "" "Imitating switch with fallthrough, as with C's switch-case-default, is " "possible, much harder, and less needed." @@ -632,7 +630,7 @@ msgstr "" "C の switch-case-default のような、フォールスルーのある switch を模倣すること" "もできますが、はるかに難しいうえに必要性も少ないでしょう。" -#: ../../faq/design.rst:300 +#: ../../faq/design.rst:302 msgid "" "Can't you emulate threads in the interpreter instead of relying on an OS-" "specific thread implementation?" @@ -640,7 +638,7 @@ msgstr "" "OS 特有のスレッド実装に依らずにインタプリタでスレッドをエミュレートすることは" "できないのですか?" -#: ../../faq/design.rst:302 +#: ../../faq/design.rst:304 msgid "" "Answer 1: Unfortunately, the interpreter pushes at least one C stack frame " "for each Python stack frame. Also, extensions can call back into Python at " @@ -652,7 +650,7 @@ msgstr "" "きに Python にコールバックすることがあります。よって、完全なスレッド実装には " "C のスレッドサポートが必要です。" -#: ../../faq/design.rst:307 +#: ../../faq/design.rst:309 msgid "" "Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " @@ -662,11 +660,11 @@ msgstr "" "stackless/wiki>`_ があります。これは完全に再デザインされたインタープリタで、C" "のスタックを回避しています。" -#: ../../faq/design.rst:312 +#: ../../faq/design.rst:314 msgid "Why can't lambda expressions contain statements?" msgstr "なぜラムダ式は文を含むことができないのですか?" -#: ../../faq/design.rst:314 +#: ../../faq/design.rst:316 msgid "" "Python lambda expressions cannot contain statements because Python's " "syntactic framework can't handle statements nested inside expressions. " @@ -680,7 +678,7 @@ msgstr "" "Python のラムダは単なる、関数を定義するのが面倒すぎる場合のための簡略な記法に" "過ぎないのです。" -#: ../../faq/design.rst:320 +#: ../../faq/design.rst:322 msgid "" "Functions are already first class objects in Python, and can be declared in " "a local scope. Therefore the only advantage of using a lambda instead of a " @@ -694,11 +692,11 @@ msgstr "" "る必要が無いことだけです -- しかし、(ラムダ式が生み出すオブジェクトと厳密に同" "じ型の) 関数オブジェクトが代入される先はただのローカル変数です!" -#: ../../faq/design.rst:328 +#: ../../faq/design.rst:330 msgid "Can Python be compiled to machine code, C or some other language?" msgstr "Python は C やその他の言語のように機械語にコンパイルできますか?" -#: ../../faq/design.rst:330 +#: ../../faq/design.rst:332 msgid "" "`Cython `_ compiles a modified version of Python with " "optional annotations into C extensions. `Nuitka `_ is " @@ -710,11 +708,11 @@ msgstr "" "nuitka.net/>`_ は Python から C++ コードへの有望なコンパイラで、 フルセット" "の Python 言語サポートを目指しています。" -#: ../../faq/design.rst:337 +#: ../../faq/design.rst:339 msgid "How does Python manage memory?" msgstr "Python はメモリをどのように管理するのですか?" -#: ../../faq/design.rst:339 +#: ../../faq/design.rst:341 msgid "" "The details of Python memory management depend on the implementation. The " "standard implementation of Python, :term:`CPython`, uses reference counting " @@ -731,7 +729,7 @@ msgstr "" "連のオブジェクトを削除します。 :mod:`gc` モジュールは、ガベージコレクションの" "実行、デバッグ統計の取得、コレクタのパラメータ調整を行う関数を提供します。" -#: ../../faq/design.rst:347 +#: ../../faq/design.rst:349 msgid "" "Other implementations (such as `Jython `_ or `PyPy " "`_), however, can rely on a different mechanism such as a " @@ -744,7 +742,7 @@ msgstr "" "しれません。 この違いは微妙な移植の問題を起こす可能性があります。もし あなた" "の Python コードが参照カウント実装の振る舞いに依存している場合には。" -#: ../../faq/design.rst:353 +#: ../../faq/design.rst:355 msgid "" "In some Python implementations, the following code (which is fine in " "CPython) will probably run out of file descriptors::" @@ -752,7 +750,7 @@ msgstr "" "Python の実装によっては、以下の (CPython では通る) コードはおそらく、ファイル" "ディスクリプタを使い果たすでしょう::" -#: ../../faq/design.rst:356 +#: ../../faq/design.rst:358 msgid "" "for file in very_long_list_of_files:\n" " f = open(file)\n" @@ -762,7 +760,7 @@ msgstr "" " f = open(file)\n" " c = f.read(1)" -#: ../../faq/design.rst:360 +#: ../../faq/design.rst:362 msgid "" "Indeed, using CPython's reference counting and destructor scheme, each new " "assignment to ``f`` closes the previous file. With a traditional GC, " @@ -774,7 +772,7 @@ msgstr "" "イルオブジェクトが回収され (て閉じられる) までに不定な、場合によっては長い、" "間隔が空くことがあります。" -#: ../../faq/design.rst:365 +#: ../../faq/design.rst:367 msgid "" "If you want to write code that will work with any Python implementation, you " "should explicitly close the file or use the :keyword:`with` statement; this " @@ -784,7 +782,7 @@ msgstr "" "keyword:`with` 文を使ってください。これでメモリ管理のスキームに関係なく動きま" "す::" -#: ../../faq/design.rst:369 +#: ../../faq/design.rst:371 msgid "" "for file in very_long_list_of_files:\n" " with open(file) as f:\n" @@ -794,11 +792,11 @@ msgstr "" " with open(file) as f:\n" " c = f.read(1)" -#: ../../faq/design.rst:375 +#: ../../faq/design.rst:377 msgid "Why doesn't CPython use a more traditional garbage collection scheme?" msgstr "CPython はなぜ伝統的なガベージコレクションスキームを使わないのですか?" -#: ../../faq/design.rst:377 +#: ../../faq/design.rst:379 msgid "" "For one thing, this is not a C standard feature and hence it's not portable. " "(Yes, we know about the Boehm GC library. It has bits of assembler code for " @@ -812,7 +810,7 @@ msgstr "" "ほとんど透過的ですが、完全に透過的ではありません。Python を対応させるにはパッ" "チが必要です。)" -#: ../../faq/design.rst:383 +#: ../../faq/design.rst:385 msgid "" "Traditional GC also becomes a problem when Python is embedded into other " "applications. While in a standalone Python it's fine to replace the " @@ -829,12 +827,12 @@ msgstr "" "おうとするかもしれません。現在のようにすることで、CPython は ``malloc()`` と " "``free()`` が適切に実装されている限りどんなものにも対応させられます。" -#: ../../faq/design.rst:392 +#: ../../faq/design.rst:394 msgid "Why isn't all memory freed when CPython exits?" msgstr "" "なぜ CPython の終了時にすべてのメモリが解放されるわけではないのですか?" -#: ../../faq/design.rst:394 +#: ../../faq/design.rst:396 msgid "" "Objects referenced from the global namespaces of Python modules are not " "always deallocated when Python exits. This may happen if there are circular " @@ -850,7 +848,7 @@ msgstr "" "かし、Python は終了時にメモリをクリーンアップすることには積極的で、全ての単一" "のオブジェクトを破棄しようとします。" -#: ../../faq/design.rst:401 +#: ../../faq/design.rst:403 msgid "" "If you want to force Python to delete certain things on deallocation use " "the :mod:`atexit` module to run a function that will force those deletions." @@ -858,11 +856,11 @@ msgstr "" "再割り当て時に Python が特定のものを削除するように強制したいときは、 :mod:" "`atexit` モジュールを使って削除を強制する関数を実行してください。" -#: ../../faq/design.rst:406 +#: ../../faq/design.rst:408 msgid "Why are there separate tuple and list data types?" msgstr "なぜタプルとリストという別のデータ型が用意されているのですか?" -#: ../../faq/design.rst:408 +#: ../../faq/design.rst:410 msgid "" "Lists and tuples, while similar in many respects, are generally used in " "fundamentally different ways. Tuples can be thought of as being similar to " @@ -877,7 +875,7 @@ msgstr "" "されます。例えば、デカルト座標は 2 つや 3 つの数のタプルとして適切に表せま" "す。" -#: ../../faq/design.rst:415 +#: ../../faq/design.rst:417 msgid "" "Lists, on the other hand, are more like arrays in other languages. They " "tend to hold a varying number of objects all of which have the same type and " @@ -892,7 +890,7 @@ msgstr "" "のリストを返します。この出力を演算する関数は一般に、ディレクトリに一つや二つ" "の別のファイルを加えても壊れません。" -#: ../../faq/design.rst:423 +#: ../../faq/design.rst:425 msgid "" "Tuples are :term:`immutable`, meaning that once a tuple has been created, " "you can't replace any of its elements with a new value. Lists are :term:" @@ -901,12 +899,18 @@ msgid "" "hashable, which is why tuples, but not lists, can be used as keys. Note, " "however, that a tuple is only hashable if all of its elements are hashable." msgstr "" +"タプルは :term:`immutable` なので、一度タプルが生成されたら、そのどの要素も新" +"しい値に置き換えられません。 リストは :term:`mutable` なので、リストの要素は" +"いつでも変更できます。 :term:`hashable` な要素だけが辞書のキーとして使えま" +"す。ほとんどの immutable 型は hashable のため、リストではなくタプルがキーとし" +"て使えます。ただし注意点として、あるタプルが hashable となるのは、そのすべて" +"の要素が hashable である場合に限られます。" -#: ../../faq/design.rst:432 +#: ../../faq/design.rst:436 msgid "How are lists implemented in CPython?" msgstr "CPythonでリストはどのように実装されているのですか?" -#: ../../faq/design.rst:434 +#: ../../faq/design.rst:438 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -917,7 +921,7 @@ msgstr "" "ません。この実装は他のオブジェクトへの参照の連続した配列を使用していて、この" "配列へのポインタおよび配列長はリストの先頭の構造体に保存されています。" -#: ../../faq/design.rst:438 +#: ../../faq/design.rst:442 msgid "" "This makes indexing a list ``a[i]`` an operation whose cost is independent " "of the size of the list or the value of the index." @@ -925,7 +929,7 @@ msgstr "" "これにより、リストのインデクシング ``a[i]`` は、リストの大きさやインデクスの" "値に依存しないコストで演算できます。" -#: ../../faq/design.rst:441 +#: ../../faq/design.rst:445 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -937,11 +941,16 @@ msgstr "" "くなるとき、次の何回かは実際に大きさを変更する必要がないように、いくらかの追" "加の領域が割り当てられます。" -#: ../../faq/design.rst:448 +#: ../../faq/design.rst:450 +msgid "" +"See :ref:`time-complexity` for the costs of the various list operations." +msgstr "" + +#: ../../faq/design.rst:456 msgid "How are dictionaries implemented in CPython?" msgstr "CPythonで辞書はどのように実装されていますか?" -#: ../../faq/design.rst:450 +#: ../../faq/design.rst:458 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -952,7 +961,7 @@ msgstr "" "木と比べて、ほとんどの条件下で (特に一般的な演算である) 探索のパフォーマンス" "が良いですし、実装も単純です。" -#: ../../faq/design.rst:454 +#: ../../faq/design.rst:462 msgid "" "Dictionaries work by computing a hash code for each key stored in the " "dictionary using the :func:`hash` built-in function. The hash code varies " @@ -973,11 +982,17 @@ msgstr "" "なるとすれば、一定の時間 − Big-O 記法では *O*\\ (1) − でキーを検索できること" "になります。" -#: ../../faq/design.rst:465 +#: ../../faq/design.rst:471 +msgid "" +"See :ref:`time-complexity` for the costs of the various dictionary " +"operations." +msgstr "" + +#: ../../faq/design.rst:475 msgid "Why must dictionary keys be immutable?" msgstr "なぜ辞書のキーはイミュータブルでなくてはならないのですか?" -#: ../../faq/design.rst:467 +#: ../../faq/design.rst:477 msgid "" "The hash table implementation of dictionaries uses a hash value calculated " "from the key value to find the key. If the key were a mutable object, its " @@ -998,7 +1013,7 @@ msgstr "" "ハッシュバイナリから見つかるオブジェクトの値は異なるでしょうから、これも見つ" "かりません。" -#: ../../faq/design.rst:476 +#: ../../faq/design.rst:486 msgid "" "If you want a dictionary indexed with a list, simply convert the list to a " "tuple first; the function ``tuple(L)`` creates a tuple with the same entries " @@ -1009,11 +1024,11 @@ msgstr "" "てください。関数 ``tuple(L)`` は、リスト ``L`` と同じエントリのタプルを生成し" "ます。タプルはイミュータブルなので、辞書のキーとして使えます。" -#: ../../faq/design.rst:480 +#: ../../faq/design.rst:490 msgid "Some unacceptable solutions that have been proposed:" msgstr "いくつかの受け入れられなかった提案:" -#: ../../faq/design.rst:482 +#: ../../faq/design.rst:492 msgid "" "Hash lists by their address (object ID). This doesn't work because if you " "construct a new list with the same value it won't be found; e.g.::" @@ -1021,7 +1036,7 @@ msgstr "" "アドレス (オブジェクト ID) のハッシュリスト。これは、同じ値の新しいリストを" "作っても見つからないので駄目です。例えば::" -#: ../../faq/design.rst:485 +#: ../../faq/design.rst:495 msgid "" "mydict = {[1, 2]: '12'}\n" "print(mydict[[1, 2]])" @@ -1029,7 +1044,7 @@ msgstr "" "mydict = {[1, 2]: '12'}\n" "print(mydict[[1, 2]])" -#: ../../faq/design.rst:488 +#: ../../faq/design.rst:498 msgid "" "would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` " "used in the second line differs from that in the first line. In other " @@ -1040,7 +1055,7 @@ msgstr "" "外を送出するでしょう。言い換えれば、辞書のキーは ``==`` を使って比較されるべ" "きであり、 :keyword:`is` ではないということです。" -#: ../../faq/design.rst:492 +#: ../../faq/design.rst:502 msgid "" "Make a copy when using a list as a key. This doesn't work because the list, " "being a mutable object, could contain a reference to itself, and then the " @@ -1050,7 +1065,7 @@ msgstr "" "身への参照を含むことができ、コードをコピーするときに無限ループにハマる可能性" "があるので、これは駄目です。" -#: ../../faq/design.rst:496 +#: ../../faq/design.rst:506 msgid "" "Allow lists as keys but tell the user not to modify them. This would allow " "a class of hard-to-track bugs in programs when you forgot or modified a list " @@ -1062,7 +1077,7 @@ msgstr "" "なバグの可能性を生じてしまいます。またこれは、 ``d.keys()`` のすべての値は辞" "書のキーとして使えるという、辞書の重要な不変性も潰してしまいます。" -#: ../../faq/design.rst:501 +#: ../../faq/design.rst:511 msgid "" "Mark lists as read-only once they are used as a dictionary key. The problem " "is that it's not just the top-level object that could change its value; you " @@ -1077,7 +1092,7 @@ msgstr "" "達可能な全てのオブジェクトに読み出し専用のマークを付ける必要があります -- そ" "して再び、自己参照オブジェクトが無限ループを引き起こします。" -#: ../../faq/design.rst:507 +#: ../../faq/design.rst:517 msgid "" "There is a trick to get around this if you need to, but use it at your own " "risk: You can wrap a mutable structure inside a class instance which has " @@ -1093,7 +1108,7 @@ msgstr "" "ハッシュ値が、そのオブジェクトが辞書 (その他の構造体) 中にある間固定され続け" "ることを確実にしてください。 ::" -#: ../../faq/design.rst:515 +#: ../../faq/design.rst:525 msgid "" "class ListWrapper:\n" " def __init__(self, the_list):\n" @@ -1129,7 +1144,7 @@ msgstr "" " result = (result % 7777777) + i * 333\n" " return result" -#: ../../faq/design.rst:532 +#: ../../faq/design.rst:542 msgid "" "Note that the hash computation is complicated by the possibility that some " "members of the list may be unhashable and also by the possibility of " @@ -1138,7 +1153,7 @@ msgstr "" "なお、リストのメンバーの中にハッシュ化できないものがある可能性や、算術オー" "バーフローの可能性から、ハッシュ計算は複雑になります。" -#: ../../faq/design.rst:536 +#: ../../faq/design.rst:546 msgid "" "Furthermore it must always be the case that if ``o1 == o2`` (ie ``o1." "__eq__(o2) is True``) then ``hash(o1) == hash(o2)`` (ie, ``o1.__hash__() == " @@ -1151,7 +1166,7 @@ msgstr "" "なわち ``o1.__hash__() == o2.__hash__()``) でなくてはなりません。その制限に適" "合できなければ、辞書やその他のハッシュに基づく構造体は間違いを起こします。" -#: ../../faq/design.rst:541 +#: ../../faq/design.rst:551 msgid "" "In the case of :class:`!ListWrapper`, whenever the wrapper object is in a " "dictionary the wrapped list must not change to avoid anomalies. Don't do " @@ -1163,11 +1178,11 @@ msgstr "" "かった時の結果について知恵を絞る覚悟がない限り、これをしてはいけません。よく" "考えてください。" -#: ../../faq/design.rst:548 +#: ../../faq/design.rst:558 msgid "Why doesn't list.sort() return the sorted list?" msgstr "なぜ list.sort() はソートされたリストを返さないのですか?" -#: ../../faq/design.rst:550 +#: ../../faq/design.rst:560 msgid "" "In situations where performance matters, making a copy of the list just to " "sort it would be wasteful. Therefore, :meth:`list.sort` sorts the list in " @@ -1182,7 +1197,7 @@ msgstr "" "うすることで、ソートされたコピーが必要で、ソートされていないものも残しておき" "たいときに、うっかり上書きしてしまうようなことがなくなります。" -#: ../../faq/design.rst:556 +#: ../../faq/design.rst:566 msgid "" "If you want to return a new list, use the built-in :func:`sorted` function " "instead. This function creates a new list from a provided iterable, sorts " @@ -1194,7 +1209,7 @@ msgstr "" "成し、ソートして返します。例えば、辞書のキーをソートされた順序でイテレートす" "る方法は::" -#: ../../faq/design.rst:561 +#: ../../faq/design.rst:571 msgid "" "for key in sorted(mydict):\n" " ... # do whatever with mydict[key]..." @@ -1202,11 +1217,11 @@ msgstr "" "for key in sorted(mydict):\n" " ... # mydict[key] を使って何でもできる ..." -#: ../../faq/design.rst:566 +#: ../../faq/design.rst:576 msgid "How do you specify and enforce an interface spec in Python?" msgstr "Python ではどのようにインターフェース仕様を特定し適用するのですか?" -#: ../../faq/design.rst:568 +#: ../../faq/design.rst:578 msgid "" "An interface specification for a module as provided by languages such as C++ " "and Java describes the prototypes for the methods and functions of the " @@ -1218,7 +1233,7 @@ msgstr "" "の特定がコンパイル時に適用されることが、大きなプログラムの構成に役立つと、広" "く感じられています。" -#: ../../faq/design.rst:573 +#: ../../faq/design.rst:583 msgid "" "Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base " "Classes (ABCs). You can then use :func:`isinstance` and :func:`issubclass` " @@ -1234,7 +1249,7 @@ msgstr "" "`~collections.abc.Iterable` 、 :class:`~collections.abc.Container` 、 :class:" "`~collections.abc.MutableMapping` などの便利な ABC が定義されています。" -#: ../../faq/design.rst:580 +#: ../../faq/design.rst:590 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." @@ -1242,7 +1257,7 @@ msgstr "" "Pythonでは、インターフェース仕様の多くの利点は、コンポーネントへの適切なテス" "ト規律により得られます。" -#: ../../faq/design.rst:583 +#: ../../faq/design.rst:593 msgid "" "A good test suite for a module can both provide a regression test and serve " "as a module interface specification and a set of examples. Many Python " @@ -1261,7 +1276,7 @@ msgstr "" "`unittest` モジュール、あるいはサードパーティのテストフレームワークで、モ" "ジュールのコードの全ての行に及ぶ徹底的なテストスイートを構成できます。" -#: ../../faq/design.rst:591 +#: ../../faq/design.rst:601 msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " @@ -1279,7 +1294,7 @@ msgstr "" "ンターフェース仕様ではこの :meth:`list.append` の実装が実際にこれを行うかをテ" "ストできませんが、テストスイートならこの機能を簡単に確かめられます。" -#: ../../faq/design.rst:599 +#: ../../faq/design.rst:609 msgid "" "Writing test suites is very helpful, and you might want to design your code " "to make it easily tested. One increasingly popular technique, test-driven " @@ -1293,11 +1308,11 @@ msgstr "" "ます。ご心配なく、Python は、あなたがいい加減でもテストケースを全く書かなくて" "も構いません。" -#: ../../faq/design.rst:607 +#: ../../faq/design.rst:617 msgid "Why is there no goto?" msgstr "なぜ goto が無いのですか?" -#: ../../faq/design.rst:609 +#: ../../faq/design.rst:619 msgid "" "In the 1970s people realized that unrestricted goto could lead to messy " "\"spaghetti\" code that was hard to understand and revise. In a high-level " @@ -1315,7 +1330,7 @@ msgstr "" "と :keyword:`for` 文を使い、 ループ内に :keyword:`continue` ・ :keyword:" "`break` を含むことがあります)" -#: ../../faq/design.rst:616 +#: ../../faq/design.rst:626 msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " "across function calls. Many feel that exceptions can conveniently emulate " @@ -1327,7 +1342,7 @@ msgstr "" "適切な用途は全て、例外で同じようなことをすれば便利であると、広く感じられてい" "ます。例えば::" -#: ../../faq/design.rst:622 +#: ../../faq/design.rst:632 msgid "" "class label(Exception): pass # declare a label\n" "\n" @@ -1349,7 +1364,7 @@ msgstr "" " pass\n" "..." -#: ../../faq/design.rst:632 +#: ../../faq/design.rst:642 msgid "" "This doesn't allow you to jump into the middle of a loop, but that's usually " "considered an abuse of ``goto`` anyway. Use sparingly." @@ -1357,12 +1372,12 @@ msgstr "" "例外ではループ内へ跳ぶことはできませんが、どちらにしてもそれは ``goto`` の乱" "用と見なされるものです。使うのは控えてください。" -#: ../../faq/design.rst:637 +#: ../../faq/design.rst:647 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "" "なぜ raw 文字列 (r-strings) はバックスラッシュで終わってはいけないのですか?" -#: ../../faq/design.rst:639 +#: ../../faq/design.rst:649 msgid "" "More precisely, they can't end with an odd number of backslashes: the " "unpaired backslash at the end escapes the closing quote character, leaving " @@ -1372,7 +1387,7 @@ msgstr "" "いないバックスラッシュは、閉じ引用文字をエスケープし、終っていない文字列を残" "してしまいます。" -#: ../../faq/design.rst:643 +#: ../../faq/design.rst:653 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -1388,7 +1403,7 @@ msgstr "" "ことで、引用文字を文字列として渡すことができます。r-string が意図された目的に" "使われるときに、この規則が役に立つのです。" -#: ../../faq/design.rst:650 +#: ../../faq/design.rst:660 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" @@ -1396,18 +1411,18 @@ msgstr "" "Windows のパス名を構築するときには、Windows のシステムコールは普通のスラッ" "シュも受け付けることを憶えておいてください::" -#: ../../faq/design.rst:653 +#: ../../faq/design.rst:663 msgid "f = open(\"/mydir/file.txt\") # works fine!" msgstr "f = open(\"/mydir/file.txt\") # 正常に動く!" -#: ../../faq/design.rst:655 +#: ../../faq/design.rst:665 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" "DOS コマンドのパス名を構築するときには、例えばこの中のどれかを試してくださ" "い::" -#: ../../faq/design.rst:657 +#: ../../faq/design.rst:667 msgid "" "dir = r\"\\this\\is\\my\\dos\\dir\" \"\\\\\"\n" "dir = r\"\\this\\is\\my\\dos\\dir\\ \"[:-1]\n" @@ -1417,11 +1432,11 @@ msgstr "" "dir = r\"\\this\\is\\my\\dos\\dir\\ \"[:-1]\n" "dir = \"\\\\this\\\\is\\\\my\\\\dos\\\\dir\\\\\"" -#: ../../faq/design.rst:663 +#: ../../faq/design.rst:673 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "属性の代入に \"with\" 文が使えないのはなぜですか?" -#: ../../faq/design.rst:665 +#: ../../faq/design.rst:675 msgid "" "Python has a :keyword:`with` statement that wraps the execution of a block, " "calling code on the entrance and exit from the block. Some languages have a " @@ -1431,7 +1446,7 @@ msgstr "" "きとブロックから出るときに、コードを呼び出します。以下のような構造を持つ言語" "があります::" -#: ../../faq/design.rst:669 +#: ../../faq/design.rst:679 msgid "" "with obj:\n" " a = 1 # equivalent to obj.a = 1\n" @@ -1441,11 +1456,11 @@ msgstr "" " a = 1 # これに相当: obj.a = 1\n" " total = total + 1 # obj.total = obj.total + 1" -#: ../../faq/design.rst:673 +#: ../../faq/design.rst:683 msgid "In Python, such a construct would be ambiguous." msgstr "Python では、このような構造は曖昧になるでしょう。" -#: ../../faq/design.rst:675 +#: ../../faq/design.rst:685 msgid "" "Other languages, such as Object Pascal, Delphi, and C++, use static types, " "so it's possible to know, in an unambiguous way, what member is being " @@ -1456,7 +1471,7 @@ msgstr "" "法でも、どのメンバに代入されているのか分かります。これが静的型付けの要点です " "-- コンパイラは *いつでも* コンパイル時にすべての変数のスコープを知るのです。" -#: ../../faq/design.rst:680 +#: ../../faq/design.rst:690 msgid "" "Python uses dynamic types. It is impossible to know in advance which " "attribute will be referenced at runtime. Member attributes may be added or " @@ -1469,11 +1484,11 @@ msgstr "" "に読むだけではどのアトリビュートが参照されているか分かりません。ローカルなの" "か、グローバルなのか、メンバ属性なのか?" -#: ../../faq/design.rst:686 +#: ../../faq/design.rst:696 msgid "For instance, take the following incomplete snippet::" msgstr "例えば、以下の不完全なコード片を考えましょう::" -#: ../../faq/design.rst:688 +#: ../../faq/design.rst:698 msgid "" "def foo(a):\n" " with a:\n" @@ -1483,7 +1498,7 @@ msgstr "" " with a:\n" " print(x)" -#: ../../faq/design.rst:692 +#: ../../faq/design.rst:702 msgid "" "The snippet assumes that ``a`` must have a member attribute called ``x``. " "However, there is nothing in Python that tells the interpreter this. What " @@ -1498,7 +1513,7 @@ msgstr "" "のでしょうか。この通り、Python の動的な特質から、このような選択はとても難しい" "物になっています。" -#: ../../faq/design.rst:698 +#: ../../faq/design.rst:708 msgid "" "The primary benefit of :keyword:`with` and similar language features " "(reduction of code volume) can, however, easily be achieved in Python by " @@ -1507,7 +1522,7 @@ msgstr "" "しかし、:keyword:`with` やそれに類する言語の機能の一番の利点 (コード量の削" "減) は、 Python では代入により簡単に手に入れられます::" -#: ../../faq/design.rst:701 +#: ../../faq/design.rst:711 msgid "" "function(args).mydict[index][index].a = 21\n" "function(args).mydict[index][index].b = 42\n" @@ -1517,11 +1532,11 @@ msgstr "" "function(args).mydict[index][index].b = 42\n" "function(args).mydict[index][index].c = 63" -#: ../../faq/design.rst:705 +#: ../../faq/design.rst:715 msgid "write this::" msgstr "こう書いてください::" -#: ../../faq/design.rst:707 +#: ../../faq/design.rst:717 msgid "" "ref = function(args).mydict[index][index]\n" "ref.a = 21\n" @@ -1533,7 +1548,7 @@ msgstr "" "ref.b = 42\n" "ref.c = 63" -#: ../../faq/design.rst:712 +#: ../../faq/design.rst:722 msgid "" "This also has the side-effect of increasing execution speed because name " "bindings are resolved at run-time in Python, and the second version only " @@ -1542,7 +1557,7 @@ msgstr "" "Python では実行時に名前束縛が解決され、後者はその解決が一度で済むため、これに" "は実行速度をあげる副作用もあります。" -#: ../../faq/design.rst:716 +#: ../../faq/design.rst:726 msgid "" "Similar proposals that would introduce syntax to further reduce code volume, " "such as using a 'leading dot', have been rejected in favour of explicitness " @@ -1552,11 +1567,11 @@ msgstr "" "明白さを優先して却下されました (https://mail.python.org/pipermail/python-" "ideas/2016-May/040070.html 参照)。" -#: ../../faq/design.rst:722 +#: ../../faq/design.rst:732 msgid "Why don't generators support the with statement?" msgstr "なぜジェネレータは with 文をサポートしないのですか?" -#: ../../faq/design.rst:724 +#: ../../faq/design.rst:734 msgid "" "For technical reasons, a generator used directly as a context manager would " "not work correctly. When, as is most common, a generator is used as an " @@ -1570,18 +1585,18 @@ msgstr "" "func:`contextlib.closing(generator) ` のようにラップしま" "す。" -#: ../../faq/design.rst:732 +#: ../../faq/design.rst:742 msgid "Why are colons required for the if/while/def/class statements?" msgstr "if/while/def/class 文にコロンが必要なのはなぜですか?" -#: ../../faq/design.rst:734 +#: ../../faq/design.rst:744 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" msgstr "" "主に可読性を高めるため (実験的な ABC 言語の結果の一つ) に、コロンが必要です::" -#: ../../faq/design.rst:737 +#: ../../faq/design.rst:747 msgid "" "if a == b\n" " print(a)" @@ -1589,11 +1604,11 @@ msgstr "" "if a == b\n" " print(a)" -#: ../../faq/design.rst:740 +#: ../../faq/design.rst:750 msgid "versus ::" msgstr "と::" -#: ../../faq/design.rst:742 +#: ../../faq/design.rst:752 msgid "" "if a == b:\n" " print(a)" @@ -1601,7 +1616,7 @@ msgstr "" "if a == b:\n" " print(a)" -#: ../../faq/design.rst:745 +#: ../../faq/design.rst:755 msgid "" "Notice how the second one is slightly easier to read. Notice further how a " "colon sets off the example in this FAQ answer; it's a standard usage in " @@ -1610,7 +1625,7 @@ msgstr "" "を考えれば、後者のほうが少し読みやすいでしょう。さらに言えば、この FAQ の解答" "例は次のようになるでしょう。これは、英語の標準的な用法です。" -#: ../../faq/design.rst:748 +#: ../../faq/design.rst:758 msgid "" "Another minor reason is that the colon makes it easier for editors with " "syntax highlighting; they can look for colons to decide when indentation " @@ -1621,11 +1636,11 @@ msgstr "" "ることです。プログラムテキストの手の込んだ解析をしなくても、コロンを探せばい" "つインデントを増やすべきかを決められます。" -#: ../../faq/design.rst:754 +#: ../../faq/design.rst:764 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "なぜ Python ではリストやタプルの最後にカンマがあっても良いのですか?" -#: ../../faq/design.rst:756 +#: ../../faq/design.rst:766 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" @@ -1633,7 +1648,7 @@ msgstr "" "Python では、リスト、タプル、辞書の最後の要素の後端にカンマをつけても良いこと" "になっています::" -#: ../../faq/design.rst:759 +#: ../../faq/design.rst:769 msgid "" "[1, 2, 3,]\n" "('a', 'b', 'c',)\n" @@ -1649,11 +1664,11 @@ msgstr "" " \"B\": [6, 7], # 最後のカンマはオプションだが良いスタイル\n" "}" -#: ../../faq/design.rst:767 +#: ../../faq/design.rst:777 msgid "There are several reasons to allow this." msgstr "これを許すのには、いくつかの理由があります。" -#: ../../faq/design.rst:769 +#: ../../faq/design.rst:779 msgid "" "When you have a literal value for a list, tuple, or dictionary spread across " "multiple lines, it's easier to add more elements because you don't have to " @@ -1664,14 +1679,14 @@ msgstr "" "加するのを覚えておく必要が無いため、要素を追加するのが楽になります。また、文" "法エラーを起こすこと無く、行の並べ替えを行うことができます。" -#: ../../faq/design.rst:774 +#: ../../faq/design.rst:784 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" msgstr "" "間違えてカンマを落としてしまうと、診断しづらいエラーにつながります。例えば::" -#: ../../faq/design.rst:777 +#: ../../faq/design.rst:787 msgid "" "x = [\n" " \"fee\",\n" @@ -1687,7 +1702,7 @@ msgstr "" " \"fum\"\n" "]" -#: ../../faq/design.rst:784 +#: ../../faq/design.rst:794 msgid "" "This list looks like it has four elements, but it actually contains three: " "\"fee\", \"fiefoo\" and \"fum\". Always adding the comma avoids this source " @@ -1697,7 +1712,7 @@ msgstr "" "\"fee\"、\"fiefoo\"、\"fum\" です。\n" "常にカンマを付けるようにすれば、この種のエラーが避けられます。" -#: ../../faq/design.rst:787 +#: ../../faq/design.rst:797 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." diff --git a/faq/extending.po b/faq/extending.po index 37986e42a..47a055d2f 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/faq/general.po b/faq/general.po index f4d1bdc63..b979625f3 100644 --- a/faq/general.po +++ b/faq/general.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-31 19:47+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: TENMYO Masakazu, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -343,18 +343,14 @@ msgstr "" #: ../../faq/general.rst:155 msgid "" -"You may also find version numbers with a \"+\" suffix, e.g. \"2.2+\". These " -"are unreleased versions, built directly from the CPython development " -"repository. In practice, after a final minor release is made, the version " -"is incremented to the next minor version, which becomes the \"a0\" version, " -"e.g. \"2.4a0\"." +"You may also find version numbers with a \"+dev\" suffix, such as " +"\"3.15.0b3+dev\". These are unreleased versions, built directly from the " +"CPython development repository. After the first beta release is made, the " +"version is incremented to the next feature version, which becomes the \"a0\" " +"version, such as \"3.16.0a0\"." msgstr "" -"また、\"2.2+\" のように \"+\" 接尾語が付いたバージョン番号もあります。これは" -"未発表のバージョンで、 CPython 開発リポジトリから直接ビルドされています。実" -"際、最後のマイナーリリースが行われた後、バージョンは \"2.4a0\" のように " -"\"a0\" がつく次のマイナーバージョンになります。" -#: ../../faq/general.rst:160 +#: ../../faq/general.rst:161 msgid "" "See the `Developer's Guide `__ for more information about the development cycle, " @@ -368,11 +364,11 @@ msgstr "" "version` 、 :data:`sys.hexversion` 、 :data:`sys.version_info` も参照してくだ" "さい。" -#: ../../faq/general.rst:169 +#: ../../faq/general.rst:170 msgid "How do I obtain a copy of the Python source?" msgstr "Python のソースのコピーはどこで手に入りますか?" -#: ../../faq/general.rst:171 +#: ../../faq/general.rst:172 msgid "" "The latest Python source distribution is always available from python.org, " "at https://www.python.org/downloads/. The latest development sources can be " @@ -382,7 +378,7 @@ msgstr "" "つでも手に入れることができます。最新の開発版ソースは https://github.com/" "python/cpython/ にアクセスして手に入れることができます。" -#: ../../faq/general.rst:175 +#: ../../faq/general.rst:176 msgid "" "The source distribution is a gzipped tar file containing the complete C " "source, Sphinx-formatted documentation, Python library modules, example " @@ -394,7 +390,7 @@ msgstr "" "ム、そしていくつかの役立つ配布自由なソフトウェアを含んでいます。このソースは" "ほとんどの UNIX プラットフォームでそのままコンパイルして動かせます。" -#: ../../faq/general.rst:180 +#: ../../faq/general.rst:181 msgid "" "Consult the `Getting Started section of the Python Developer's Guide " "`__ for more information on getting the " @@ -404,11 +400,11 @@ msgstr "" "section of the Python Developer's Guide `__ を参照してください。" -#: ../../faq/general.rst:186 +#: ../../faq/general.rst:187 msgid "How do I get documentation on Python?" msgstr "Python のドキュメントはどこで手に入りますか?" -#: ../../faq/general.rst:188 +#: ../../faq/general.rst:189 msgid "" "The standard documentation for the current stable version of Python is " "available at https://docs.python.org/3/. EPUB, plain text, and downloadable " @@ -418,7 +414,7 @@ msgstr "" "できます。 また、 EPUB 、プレーンテキスト、ダウンロード可能な HTML 版も " "https://docs.python.org/3/download.html から利用できます。" -#: ../../faq/general.rst:192 +#: ../../faq/general.rst:193 msgid "" "The documentation is written in reStructuredText and processed by `the " "Sphinx documentation tool `__. The " @@ -429,12 +425,12 @@ msgstr "" "`__ で構成されました。このドキュメントに使われ" "た reStructuredText のソースは Python のソース配布に含まれます。" -#: ../../faq/general.rst:198 +#: ../../faq/general.rst:199 msgid "I've never programmed before. Is there a Python tutorial?" msgstr "" "プログラミングをしたことがないのですが、Python のチュートリアルはありますか?" -#: ../../faq/general.rst:200 +#: ../../faq/general.rst:201 msgid "" "There are numerous tutorials and books available. The standard " "documentation includes :ref:`tutorial-index`." @@ -442,7 +438,7 @@ msgstr "" "膨大な量の役に立つチュートリアルや書籍があります。標準のドキュメントには :" "ref:`tutorial-index` などがあります。" -#: ../../faq/general.rst:203 +#: ../../faq/general.rst:204 msgid "" "Consult `the Beginner's Guide `_ to find information for beginning Python programmers, " @@ -452,11 +448,11 @@ msgstr "" "Beginner's Guide `_ を参照してく" "ださい。" -#: ../../faq/general.rst:208 +#: ../../faq/general.rst:209 msgid "Is there a newsgroup or mailing list devoted to Python?" msgstr "Python のためのニュースグループやメーリングリストはありますか?" -#: ../../faq/general.rst:210 +#: ../../faq/general.rst:211 msgid "" "There is a newsgroup, :newsgroup:`comp.lang.python`, and a mailing list, " "`python-list `_. The " @@ -472,7 +468,7 @@ msgstr "" "は一日に数百のポスティングを受ける高いトラフィックで、USENET 読者は多くの場" "合、このボリュームに応えることができます。" -#: ../../faq/general.rst:217 +#: ../../faq/general.rst:218 msgid "" "Announcements of new software releases and events can be found in comp.lang." "python.announce, a low-traffic moderated list that receives about five " @@ -484,7 +480,7 @@ msgstr "" "リングリストです。`the python-announce mailing list `_ から利用可能です。" -#: ../../faq/general.rst:222 +#: ../../faq/general.rst:223 msgid "" "More info about other mailing lists and newsgroups can be found at https://" "www.python.org/community/lists/." @@ -492,11 +488,11 @@ msgstr "" "その他のメーリングリストやニュースグループについての詳しい情報は https://www." "python.org/community/lists/ にあります。" -#: ../../faq/general.rst:227 +#: ../../faq/general.rst:228 msgid "How do I get a beta test version of Python?" msgstr "Python のベータテスト版はどこで手に入りますか?" -#: ../../faq/general.rst:229 +#: ../../faq/general.rst:230 msgid "" "Alpha and beta releases are available from https://www.python.org/" "downloads/. All releases are announced on the comp.lang.python and comp." @@ -508,7 +504,7 @@ msgstr "" "ループと Python ホームページ https://www.python.org/ で告知され、RSS ニュース" "フィードが利用できます。" -#: ../../faq/general.rst:234 +#: ../../faq/general.rst:235 msgid "" "You can also access the development version of Python through Git. See `The " "Python Developer's Guide `_ for details." @@ -516,11 +512,11 @@ msgstr "" "Git から開発版を手に入れることもできます。詳細は `The Python Developer's " "guide `_ を参照してください。" -#: ../../faq/general.rst:239 +#: ../../faq/general.rst:240 msgid "How do I submit bug reports and patches for Python?" msgstr "Python のバグ報告やパッチを上げるにはどうしたら良いですか?" -#: ../../faq/general.rst:241 +#: ../../faq/general.rst:242 msgid "" "To report a bug or submit a patch, use the issue tracker at https://github." "com/python/cpython/issues." @@ -528,7 +524,7 @@ msgstr "" "バグの報告やパッチの提出には、issue tracker https://github.com/python/" "CPython/issues をご利用ください。" -#: ../../faq/general.rst:244 +#: ../../faq/general.rst:245 msgid "" "For more information on how Python is developed, consult `the Python " "Developer's Guide `_." @@ -536,15 +532,15 @@ msgstr "" "Python 開発の工程について、詳しくは `the Python Developer's Guide `_ を参照してください。" -#: ../../faq/general.rst:249 +#: ../../faq/general.rst:250 msgid "Are there any published articles about Python that I can reference?" msgstr "Python について発行された記事を何か参照できますか?" -#: ../../faq/general.rst:251 +#: ../../faq/general.rst:252 msgid "It's probably best to cite your favorite book about Python." msgstr "Python に関するあなたの愛読書を引用するのが一番でしょう。" -#: ../../faq/general.rst:253 +#: ../../faq/general.rst:254 msgid "" "The `very first article `_ about Python was " "written in 1991 and is now quite outdated." @@ -552,7 +548,7 @@ msgstr "" "Python に関する `一番初めの記事 `_ はとても古" "く、1991年に書かれています。" -#: ../../faq/general.rst:256 +#: ../../faq/general.rst:257 msgid "" "Guido van Rossum and Jelke de Boer, \"Interactively Testing Remote Servers " "Using the Python Programming Language\", CWI Quarterly, Volume 4, Issue 4 " @@ -562,11 +558,11 @@ msgstr "" "Using the Python Programming Language\", CWI Quarterly, Volume 4, Issue 4 " "(December 1991), Amsterdam, pp 283--303." -#: ../../faq/general.rst:262 +#: ../../faq/general.rst:263 msgid "Are there any books on Python?" msgstr "Python の本はありますか?" -#: ../../faq/general.rst:264 +#: ../../faq/general.rst:265 msgid "" "Yes, there are many, and more are being published. See the python.org wiki " "at https://wiki.python.org/moin/PythonBooks for a list." @@ -574,7 +570,7 @@ msgstr "" "はい、たくさんあり、そのほとんどは現在も出版されています。リストは python." "org wiki https://wiki.python.org/moin/PythonBooks にあります。" -#: ../../faq/general.rst:267 +#: ../../faq/general.rst:268 msgid "" "You can also search online bookstores for \"Python\" and filter out the " "Monty Python references; or perhaps search for \"Python\" and \"language\"." @@ -582,11 +578,11 @@ msgstr "" "また、オンライン書店で \"Python\" で検索し、Monty Python をフィルタで除外して" "もいいです (または、\"Python\" と \"言語\" で検索してください)。" -#: ../../faq/general.rst:272 +#: ../../faq/general.rst:273 msgid "Where in the world is www.python.org located?" msgstr "www.python.org は世界のどこにあるのですか?" -#: ../../faq/general.rst:274 +#: ../../faq/general.rst:275 msgid "" "The Python project's infrastructure is located all over the world and is " "managed by the Python Infrastructure Team. Details `here `__." -#: ../../faq/general.rst:279 +#: ../../faq/general.rst:280 msgid "Why is it called Python?" msgstr "なぜ Python という名前なのですか?" -#: ../../faq/general.rst:281 +#: ../../faq/general.rst:282 msgid "" "When he began implementing Python, Guido van Rossum was also reading the " "published scripts from `\"Monty Python's Flying Circus\" `_. Python 3.x is the recommended version " @@ -667,11 +663,11 @@ msgstr "" "ライブラリでサポートされています。 Python 2.x :pep:`は もはや保守されていませ" "ん<373>` 。" -#: ../../faq/general.rst:317 +#: ../../faq/general.rst:318 msgid "How many people are using Python?" msgstr "どれくらいの人が Python を使っていますか?" -#: ../../faq/general.rst:319 +#: ../../faq/general.rst:320 msgid "" "There are probably millions of users, though it's difficult to obtain an " "exact count." @@ -679,7 +675,7 @@ msgstr "" "正確な人数を調べるのは難しいですが、おそらく何百万人ものユーザーがいるでしょ" "う。" -#: ../../faq/general.rst:322 +#: ../../faq/general.rst:323 msgid "" "Python is available for free download, so there are no sales figures, and " "it's available from many different sites and packaged with many Linux " @@ -689,7 +685,7 @@ msgstr "" "き、多くの Linux ディストーションに同梱されているので、ダウンロード統計から全" "体の状況を知ることはできません。" -#: ../../faq/general.rst:326 +#: ../../faq/general.rst:327 msgid "" "The comp.lang.python newsgroup is very active, but not all Python users post " "to the group or even read it." @@ -697,11 +693,11 @@ msgstr "" "comp.lang.python ニュースグループはとても活発ですが、すべての Python ユーザー" "が投稿するわけではなく、読みすらしない人もいます。" -#: ../../faq/general.rst:331 +#: ../../faq/general.rst:332 msgid "Have any significant projects been done in Python?" msgstr "Python で行われた大きなプロジェクトはありますか?" -#: ../../faq/general.rst:333 +#: ../../faq/general.rst:334 msgid "" "See https://www.python.org/about/success for a list of projects that use " "Python. Consulting the proceedings for `past Python conferences `_ から議事録を参照すると、多くの会社や組織の貢献がわか" "るでしょう。" -#: ../../faq/general.rst:338 +#: ../../faq/general.rst:339 msgid "" "High-profile Python projects include `the Mailman mailing list manager " "`_ and `the Zope application server `_." @@ -754,11 +750,11 @@ msgstr "" "新しい開発については `the python-dev mailing list `_ で議論されています。" -#: ../../faq/general.rst:360 +#: ../../faq/general.rst:361 msgid "Is it reasonable to propose incompatible changes to Python?" msgstr "Python の互換性を無くすような提案をしてもいいのですか?" -#: ../../faq/general.rst:362 +#: ../../faq/general.rst:363 msgid "" "In general, no. There are already millions of lines of Python code around " "the world, so any change in the language that invalidates more than a very " @@ -774,7 +770,7 @@ msgstr "" "に関する多くの本が出版されているので、それらを一発で不適切にするようなことは" "したくないです。" -#: ../../faq/general.rst:369 +#: ../../faq/general.rst:370 msgid "" "Providing a gradual upgrade path is necessary if a feature has to be " "changed. :pep:`5` describes the procedure followed for introducing backward-" @@ -784,15 +780,15 @@ msgstr "" "なりません。 :pep:`5` で、ユーザーの受ける分裂を最小限にしながら後方互換性の" "ない変更を行うために従うべき手順について説明しています。" -#: ../../faq/general.rst:375 +#: ../../faq/general.rst:376 msgid "Is Python a good language for beginning programmers?" msgstr "Python は初心者プログラマに向いている言語ですか?" -#: ../../faq/general.rst:377 +#: ../../faq/general.rst:378 msgid "Yes." msgstr "はい。" -#: ../../faq/general.rst:379 +#: ../../faq/general.rst:380 msgid "" "It is still common to start students with a procedural and statically typed " "language such as Pascal, C, or a subset of C++ or Java. Students may be " @@ -813,7 +809,7 @@ msgstr "" "や手続きなどの基本概念をすぐに取り入れられます。最初の課程でいきなりユーザ定" "義のオブジェクトを操ることさえできるでしょう。" -#: ../../faq/general.rst:389 +#: ../../faq/general.rst:390 msgid "" "For a student who has never programmed before, using a statically typed " "language seems unnatural. It presents additional complexity that the " @@ -831,7 +827,7 @@ msgstr "" "見れば静的型付け言語を学ぶことは重要ですが、それが最初のプログラミングの授業" "で学ぶべき最高の話題とは限りません。" -#: ../../faq/general.rst:397 +#: ../../faq/general.rst:398 msgid "" "Many other aspects of Python make it a good first language. Like Java, " "Python has a large standard library so that students can be assigned " @@ -852,7 +848,7 @@ msgstr "" "PyGame などのサードパーティモジュールもまた手が届く範囲を広げるのに役立ちま" "す。" -#: ../../faq/general.rst:406 +#: ../../faq/general.rst:407 msgid "" "Python's interactive interpreter enables students to test language features " "while they're programming. They can keep a window with the interpreter " @@ -864,7 +860,7 @@ msgstr "" "間、ウィンドウでインタプリタを起動させたままにしておくことができます。リスト" "のメソッドを思い出せないときは、例えばこのようにできます::" -#: ../../faq/general.rst:411 +#: ../../faq/general.rst:412 msgid "" ">>> L = []\n" ">>> dir(L)\n" @@ -916,7 +912,7 @@ msgstr "" ">>> L\n" "[1]" -#: ../../faq/general.rst:435 +#: ../../faq/general.rst:436 msgid "" "With the interpreter, documentation is never far from the student as they " "are programming." @@ -924,7 +920,7 @@ msgstr "" "インタプリタがあれば、プログラミングをしている間にドキュメントは生徒のそばを" "離れません。" -#: ../../faq/general.rst:438 +#: ../../faq/general.rst:439 msgid "" "There are also good IDEs for Python. IDLE is a cross-platform IDE for " "Python that is written in Python using Tkinter. Emacs users will be happy to " @@ -941,7 +937,7 @@ msgstr "" "プリタへのアクセスが使えます。`the Python wiki `_ から Python 編集環境の一覧を参照してください。" -#: ../../faq/general.rst:446 +#: ../../faq/general.rst:447 msgid "" "If you want to discuss Python's use in education, you may be interested in " "joining `the edu-sig mailing list , 2026 +# Maciej Olko, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" -"Last-Translator: Maciej Olko , 2026\n" +"Last-Translator: Maciej Olko, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "MIME-Version: 1.0\n" diff --git a/faq/programming.po b/faq/programming.po index 6dacc02d2..8fb166e91 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-07 15:19+0000\n" +"POT-Creation-Date: 2026-08-25 14:37+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: TENMYO Masakazu, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -907,7 +907,7 @@ msgid "" "you might be wondering why appending an element to ``y`` changed ``x`` too." msgstr "" "どうして ``y`` への要素の追加が ``x`` も変更してしまうのか疑問に思うかもしれ" -"ません。 " +"ません。" #: ../../faq/programming.rst:450 msgid "There are two factors that produce this result:" @@ -2355,11 +2355,9 @@ msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " "creates a new object. In the general case, the total runtime cost is " -"quadratic in the total string length." +"quadratic in the total string length. See :ref:`time-complexity` for more " +"information." msgstr "" -":class:`str` および :class:`bytes` オブジェクトはイミュータブルなので、多くの" -"文字列の結合は結合ごとに新しいオブジェクトを作成し、効率が悪いです。\n" -"一般的に、全体の実行時間のコストは文字列の長さの二乗に比例します。" #: ../../faq/programming.rst:1141 msgid "" @@ -3597,7 +3595,7 @@ msgstr "" "同一性テストの最も重要な特性は、オブジェクトは常にそれ自身と同一であり、 ``a " "is a`` は常に ``True`` を返すということです。 同一性テストは通常、等価性テス" "トよりも高速です。 また、等価性テストとは異なり、同一性テストは真偽値 " -"``True`` または``False`` を返すことが保証されています。" +"``True`` または ``False`` を返すことが保証されています。" #: ../../faq/programming.rst:1874 msgid "" @@ -3809,13 +3807,10 @@ msgstr "メソッド呼び出しをキャッシュするには どうしたら #: ../../faq/programming.rst:2005 msgid "" -"The two principal tools for caching methods are :func:`functools." -"cached_property` and :func:`functools.lru_cache`. The former stores results " +"The two principal tools for caching methods are :deco:`functools." +"cached_property` and :deco:`functools.lru_cache`. The former stores results " "at the instance level and the latter at the class level." msgstr "" -"メソッドキャッシュの主な道具は2つあり、 :func:`functools.cached_property` " -"と :func:`functools.lru_cache` です。前者はインスタンスレベル、後者はクラスレ" -"ベルで結果を保存します。" #: ../../faq/programming.rst:2010 msgid "" diff --git a/faq/windows.po b/faq/windows.po index 4249dca4d..568c94f4b 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/glossary.po b/glossary.po index d82e1c815..01b232eea 100644 --- a/glossary.po +++ b/glossary.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-21 15:47+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -899,11 +899,8 @@ msgstr "decorator" msgid "" "A function returning another function, usually applied as a function " "transformation using the ``@wrapper`` syntax. Common examples for " -"decorators are :func:`classmethod` and :func:`staticmethod`." +"decorators are :deco:`classmethod` and :deco:`staticmethod`." msgstr "" -"(デコレータ) 別の関数を返す関数で、通常、 ``@wrapper`` 構文で関数変換として適" -"用されます。デコレータの一般的な利用例は、 :func:`classmethod` と :func:" -"`staticmethod` です。" #: ../../glossary.rst:421 msgid "" @@ -1090,30 +1087,36 @@ msgid "" msgstr "" #: ../../glossary.rst:507 +msgid "exhausted" +msgstr "" + +#: ../../glossary.rst:509 +msgid "" +"An :term:`iterator` that has produced all of its values is said to be :dfn:" +"`exhausted`. Further attempts to get the next value (for example, calls to :" +"func:`next`) raise :exc:`StopIteration` (or :exc:`StopAsyncIteration` in the " +"case of an :term:`asynchronous iterator`)." +msgstr "" + +#: ../../glossary.rst:515 msgid "expression" msgstr "expression" -#: ../../glossary.rst:509 +#: ../../glossary.rst:517 msgid "" "A piece of syntax which can be evaluated to some value. In other words, an " "expression is an accumulation of expression elements like literals, names, " -"attribute access, operators or function calls which all return a value. In " -"contrast to many other languages, not all language constructs are " -"expressions. There are also :term:`statement`\\s which cannot be used as " -"expressions, such as :keyword:`while`. Assignments are also statements, not " -"expressions." -msgstr "" -"(式) 何かの値と評価される、一まとまりの構文 (a piece of syntax) です。言い換" -"えると、式とはリテラル、名前、属性アクセス、演算子や関数呼び出しなど、値を返" -"す式の要素の積み重ねです。他の多くの言語と違い、Python では言語の全ての構成要" -"素が式というわけではありません。 :keyword:`while` のように、式としては使えな" -"い :term:`文 ` もあります。代入も式ではなく文です。" - -#: ../../glossary.rst:516 +"attribute access, operators or function calls which all return a value. Not " +"all language constructs are expressions. There are also :term:" +"`statement`\\s which cannot be used as expressions, such as :keyword:" +"`while`. Assignments are also statements, not expressions." +msgstr "" + +#: ../../glossary.rst:524 msgid "extension module" msgstr "extension module" -#: ../../glossary.rst:518 +#: ../../glossary.rst:526 msgid "" "A module written in C or C++, using Python's C API to interact with the core " "and with user code." @@ -1121,26 +1124,26 @@ msgstr "" "(拡張モジュール) C や C++ で書かれたモジュールで、Python の C API を利用して " "Python コアやユーザーコードとやりとりします。" -#: ../../glossary.rst:520 +#: ../../glossary.rst:528 msgid "f-string" msgstr "f-string" -#: ../../glossary.rst:521 +#: ../../glossary.rst:529 msgid "f-strings" msgstr "" -#: ../../glossary.rst:523 +#: ../../glossary.rst:531 msgid "" "String literals prefixed with ``f`` or ``F`` are commonly called \"f-" "strings\" which is short for :ref:`formatted string literals `. " "See also :pep:`498`." msgstr "" -#: ../../glossary.rst:526 +#: ../../glossary.rst:534 msgid "file object" msgstr "file object" -#: ../../glossary.rst:528 +#: ../../glossary.rst:536 msgid "" "An object exposing a file-oriented API (with methods such as :meth:`!read` " "or :meth:`!write`) to an underlying resource. Depending on the way it was " @@ -1150,7 +1153,7 @@ msgid "" "called :dfn:`file-like objects` or :dfn:`streams`." msgstr "" -#: ../../glossary.rst:536 +#: ../../glossary.rst:544 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -1164,25 +1167,25 @@ msgstr "" "`io` モジュールで定義されています。ファイルオブジェクトを作る標準的な方法は :" "func:`open` 関数を使うことです。" -#: ../../glossary.rst:541 +#: ../../glossary.rst:549 msgid "file-like object" msgstr "file-like object" -#: ../../glossary.rst:543 +#: ../../glossary.rst:551 msgid "A synonym for :term:`file object`." msgstr ":term:`file object` と同義です。" -#: ../../glossary.rst:544 +#: ../../glossary.rst:552 msgid "filesystem encoding and error handler" msgstr "" -#: ../../glossary.rst:546 +#: ../../glossary.rst:554 msgid "" "Encoding and error handler used by Python to decode bytes from the operating " "system and encode Unicode to the operating system." msgstr "" -#: ../../glossary.rst:549 +#: ../../glossary.rst:557 msgid "" "The filesystem encoding must guarantee to successfully decode all bytes " "below 128. If the file system encoding fails to provide this guarantee, API " @@ -1193,14 +1196,14 @@ msgstr "" "でこれが保証されなかった場合は、API 関数が :exc:`UnicodeError` を送出すること" "があります。" -#: ../../glossary.rst:553 +#: ../../glossary.rst:561 msgid "" "The :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors` functions can be used to get the filesystem " "encoding and error handler." msgstr "" -#: ../../glossary.rst:557 +#: ../../glossary.rst:565 msgid "" "The :term:`filesystem encoding and error handler` are configured at Python " "startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." @@ -1213,15 +1216,15 @@ msgstr "" "filesystem_encoding` と :c:member:`~PyConfig.filesystem_errors` を参照してく" "ださい。" -#: ../../glossary.rst:562 +#: ../../glossary.rst:570 msgid "See also the :term:`locale encoding`." msgstr "" -#: ../../glossary.rst:563 +#: ../../glossary.rst:571 msgid "finder" msgstr "finder" -#: ../../glossary.rst:565 +#: ../../glossary.rst:573 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." @@ -1230,23 +1233,23 @@ msgstr "" "インポートされているモジュールの :term:`loader` の発見を試行するオブジェクト" "です。" -#: ../../glossary.rst:568 +#: ../../glossary.rst:576 msgid "" "There are two types of finder: :term:`meta path finders ` " "for use with :data:`sys.meta_path`, and :term:`path entry finders ` for use with :data:`sys.path_hooks`." msgstr "" -#: ../../glossary.rst:572 +#: ../../glossary.rst:580 msgid "" "See :ref:`finders-and-loaders` and :mod:`importlib` for much more detail." msgstr "" -#: ../../glossary.rst:573 +#: ../../glossary.rst:581 msgid "floor division" msgstr "floor division" -#: ../../glossary.rst:575 +#: ../../glossary.rst:583 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -1262,11 +1265,11 @@ msgstr "" "を行う) ので ``-3`` になることに注意してください。\n" ":pep:`238` を参照してください。" -#: ../../glossary.rst:580 +#: ../../glossary.rst:588 msgid "free threading" msgstr "" -#: ../../glossary.rst:582 +#: ../../glossary.rst:590 msgid "" "A threading model where multiple threads can run Python bytecode " "simultaneously within the same interpreter. This is in contrast to the :" @@ -1274,25 +1277,25 @@ msgid "" "Python bytecode at a time. See :pep:`703`." msgstr "" -#: ../../glossary.rst:586 +#: ../../glossary.rst:594 msgid "free-threaded build" msgstr "" -#: ../../glossary.rst:589 +#: ../../glossary.rst:597 msgid "" "A build of :term:`CPython` that supports :term:`free threading`, configured " "using the :option:`--disable-gil` option before compilation." msgstr "" -#: ../../glossary.rst:592 +#: ../../glossary.rst:600 msgid "See :ref:`freethreading-python-howto`." msgstr "" -#: ../../glossary.rst:593 +#: ../../glossary.rst:601 msgid "free variable" msgstr "" -#: ../../glossary.rst:595 +#: ../../glossary.rst:603 msgid "" "Formally, as defined in the :ref:`language execution model `, a " "free variable is any variable used in a namespace which is not a local " @@ -1302,11 +1305,11 @@ msgid "" "variable`." msgstr "" -#: ../../glossary.rst:600 +#: ../../glossary.rst:608 msgid "function" msgstr "関数" -#: ../../glossary.rst:602 +#: ../../glossary.rst:610 msgid "" "A series of statements which returns some value to a caller. It can also be " "passed zero or more :term:`arguments ` which may be used in the " @@ -1318,16 +1321,16 @@ msgstr "" "す。 :term:`仮引数 `、:term:`メソッド `、:ref:`function` " "を参照してください。" -#: ../../glossary.rst:606 +#: ../../glossary.rst:614 msgid "function annotation" msgstr "function annotation" -#: ../../glossary.rst:608 +#: ../../glossary.rst:616 msgid "An :term:`annotation` of a function parameter or return value." msgstr "" "(関数アノテーション) 関数のパラメータや返り値の :term:`annotation` です。" -#: ../../glossary.rst:610 +#: ../../glossary.rst:618 msgid "" "Function annotations are usually used for :term:`type hints `: " "for example, this function is expected to take two :class:`int` arguments " @@ -1337,17 +1340,17 @@ msgstr "" "す: 例えば、この関数は 2 つの :class:`int` 型の引数を取ると期待され、また :" "class:`int` 型の返り値を持つと期待されています。" -#: ../../glossary.rst:615 +#: ../../glossary.rst:623 msgid "" "def sum_two_numbers(a: int, b: int) -> int:\n" " return a + b" msgstr "" -#: ../../glossary.rst:618 +#: ../../glossary.rst:626 msgid "Function annotation syntax is explained in section :ref:`function`." msgstr "関数アノテーションの文法は :ref:`function` の節で解説されています。" -#: ../../glossary.rst:620 +#: ../../glossary.rst:628 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality. Also see :ref:`annotations-howto` for best practices on " @@ -1357,11 +1360,11 @@ msgstr "" "また、アノテーションを利用するベストプラクティスとして :ref:`annotations-" "howto` も参照してください。" -#: ../../glossary.rst:624 +#: ../../glossary.rst:632 msgid "__future__" msgstr "__future__" -#: ../../glossary.rst:626 +#: ../../glossary.rst:634 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " @@ -1378,18 +1381,18 @@ msgstr "" "し、その変数を評価することで、新機能が最初に言語に追加されたのはいつかや、い" "つデフォルトになるか (またはなったか) を見ることができます::" -#: ../../glossary.rst:634 +#: ../../glossary.rst:642 msgid "" ">>> import __future__\n" ">>> __future__.division\n" "_Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)" msgstr "" -#: ../../glossary.rst:637 +#: ../../glossary.rst:645 msgid "garbage collection" msgstr "garbage collection" -#: ../../glossary.rst:639 +#: ../../glossary.rst:647 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " @@ -1401,11 +1404,11 @@ msgstr "" "てガベージコレクションを行います。\n" "ガベージコレクタは :mod:`gc` モジュールを使って操作できます。" -#: ../../glossary.rst:644 ../../glossary.rst:645 +#: ../../glossary.rst:652 ../../glossary.rst:653 msgid "generator" msgstr "ジェネレータ" -#: ../../glossary.rst:647 +#: ../../glossary.rst:655 msgid "" "Informally used to mean either a :term:`generator function` or a :term:" "`generator iterator`, depending on context. The formal terms :term:" @@ -1413,11 +1416,11 @@ msgid "" "practice; \"generator\" alone is almost always sufficient." msgstr "" -#: ../../glossary.rst:652 ../../glossary.rst:653 +#: ../../glossary.rst:660 ../../glossary.rst:661 msgid "generator function" msgstr "" -#: ../../glossary.rst:655 +#: ../../glossary.rst:663 msgid "" "A function which returns a :term:`generator` object. It looks like a normal " "function except that it contains :keyword:`yield` expressions for producing " @@ -1425,17 +1428,17 @@ msgid "" "retrieved one at a time with the :func:`next` function. See :ref:`yieldexpr`." msgstr "" -#: ../../glossary.rst:660 +#: ../../glossary.rst:668 msgid "generator iterator" msgstr "generator iterator" -#: ../../glossary.rst:662 +#: ../../glossary.rst:670 msgid "" "An object created by a :term:`generator function` or a :term:`generator " "expression`." msgstr "" -#: ../../glossary.rst:665 +#: ../../glossary.rst:673 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "execution state (including local variables and pending try-statements). When " @@ -1443,7 +1446,7 @@ msgid "" "to functions which start fresh on every invocation)." msgstr "" -#: ../../glossary.rst:670 +#: ../../glossary.rst:678 msgid "" "Generator iterators also implement the :meth:`~generator.send` method to " "send a value into the suspended generator, and the :meth:`~generator.throw` " @@ -1451,11 +1454,11 @@ msgid "" "See :ref:`generator-methods`." msgstr "" -#: ../../glossary.rst:675 ../../glossary.rst:676 +#: ../../glossary.rst:683 ../../glossary.rst:684 msgid "generator expression" msgstr "generator expression" -#: ../../glossary.rst:678 +#: ../../glossary.rst:686 msgid "" "An :term:`expression` that returns an :term:`iterator`. It looks like a " "normal expression followed by a :keyword:`!for` clause defining a loop " @@ -1468,17 +1471,17 @@ msgstr "" "keyword:`!if` 節がつづいているように見えます。\n" "こうして構成された式は、外側の関数に向けて値を生成します::" -#: ../../glossary.rst:683 +#: ../../glossary.rst:691 msgid "" ">>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81\n" "285" msgstr "" -#: ../../glossary.rst:685 +#: ../../glossary.rst:693 msgid "generic function" msgstr "generic function" -#: ../../glossary.rst:687 +#: ../../glossary.rst:695 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " @@ -1487,44 +1490,42 @@ msgstr "" "(ジェネリック関数) 異なる型に対し同じ操作をする関数群から構成される関数です。" "呼び出し時にどの実装を用いるかはディスパッチアルゴリズムにより決定されます。" -#: ../../glossary.rst:691 +#: ../../glossary.rst:699 msgid "" -"See also the :term:`single dispatch` glossary entry, the :func:`functools." +"See also the :term:`single dispatch` glossary entry, the :deco:`functools." "singledispatch` decorator, and :pep:`443`." msgstr "" -":term:`single dispatch`、:func:`functools.singledispatch` デコレータ、:pep:" -"`443` を参照してください。" -#: ../../glossary.rst:693 +#: ../../glossary.rst:701 msgid "generic type" msgstr "" -#: ../../glossary.rst:695 +#: ../../glossary.rst:703 msgid "" "A :term:`type` that can be parameterized; typically a :ref:`container " "class` such as :class:`list` or :class:`dict`. Used for :" "term:`type hints ` and :term:`annotations `." msgstr "" -#: ../../glossary.rst:700 +#: ../../glossary.rst:708 msgid "" "For more details, see :ref:`generic alias types`, :pep:" "`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." msgstr "" -#: ../../glossary.rst:702 +#: ../../glossary.rst:710 msgid "GIL" msgstr "GIL" -#: ../../glossary.rst:704 +#: ../../glossary.rst:712 msgid "See :term:`global interpreter lock`." msgstr ":term:`global interpreter lock` を参照してください。" -#: ../../glossary.rst:705 +#: ../../glossary.rst:713 msgid "global interpreter lock" msgstr "global interpreter lock" -#: ../../glossary.rst:707 +#: ../../glossary.rst:715 msgid "" "The mechanism used by the :term:`CPython` interpreter to assure that only " "one thread executes Python :term:`bytecode` at a time. This simplifies the " @@ -1542,7 +1543,7 @@ msgstr "" "チプロセッサマシンが生じる並列化のコストと引き換えに、インタプリタを簡単にマ" "ルチスレッド化できるようになります。" -#: ../../glossary.rst:716 +#: ../../glossary.rst:724 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally intensive tasks " @@ -1553,7 +1554,7 @@ msgstr "" "の計算の重い処理をするときに GIL を解除するように設計されています。また、I/O " "処理をする場合 GIL は常に解除されます。" -#: ../../glossary.rst:721 +#: ../../glossary.rst:729 msgid "" "As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil` " "build configuration. After building Python with this option, code must be " @@ -1563,18 +1564,18 @@ msgid "" "core CPUs efficiently. For more details, see :pep:`703`." msgstr "" -#: ../../glossary.rst:728 +#: ../../glossary.rst:736 msgid "" "In prior versions of Python's C API, a function might declare that it " "requires the GIL to be held in order to use it. This refers to having an :" "term:`attached thread state`." msgstr "" -#: ../../glossary.rst:731 +#: ../../glossary.rst:739 msgid "global state" msgstr "" -#: ../../glossary.rst:733 +#: ../../glossary.rst:741 msgid "" "Data that is accessible throughout a program, such as module-level " "variables, class variables, or C static variables in :term:`extension " @@ -1583,11 +1584,11 @@ msgid "" "`race conditions ` and :term:`data races `." msgstr "" -#: ../../glossary.rst:739 +#: ../../glossary.rst:747 msgid "hash-based pyc" msgstr "hash-based pyc" -#: ../../glossary.rst:741 +#: ../../glossary.rst:749 msgid "" "A bytecode cache file that uses the hash rather than the last-modified time " "of the corresponding source file to determine its validity. See :ref:`pyc-" @@ -1597,11 +1598,11 @@ msgstr "" "の最終更新時刻ではなくハッシュ値を使用するバイトコードのキャッシュファイルで" "す。:ref:`pyc-invalidation` を参照してください。" -#: ../../glossary.rst:744 +#: ../../glossary.rst:752 msgid "hashable" msgstr "hashable" -#: ../../glossary.rst:746 +#: ../../glossary.rst:754 msgid "" "An object is *hashable* if it has a hash value which never changes during " "its lifetime (it needs a :meth:`~object.__hash__` method), and can be " @@ -1609,7 +1610,7 @@ msgid "" "Hashable objects which compare equal must have the same hash value." msgstr "" -#: ../../glossary.rst:752 +#: ../../glossary.rst:760 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." @@ -1617,7 +1618,7 @@ msgstr "" "ハッシュ可能なオブジェクトは辞書のキーや集合のメンバーとして使えます。辞書や" "集合のデータ構造は内部でハッシュ値を使っているからです。" -#: ../../glossary.rst:755 +#: ../../glossary.rst:763 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " @@ -1635,11 +1636,11 @@ msgstr "" "それらは全て (自身を除いて) 比較結果は非等価であり、ハッシュ値は :func:`id` " "より得られます。" -#: ../../glossary.rst:762 +#: ../../glossary.rst:770 msgid "IDLE" msgstr "IDLE" -#: ../../glossary.rst:764 +#: ../../glossary.rst:772 msgid "" "An Integrated Development and Learning Environment for Python. :ref:`idle` " "is a basic editor and interpreter environment which ships with the standard " @@ -1649,34 +1650,34 @@ msgstr "" "(Learning Environment) です。:ref:`idle` は Python の標準的な配布に同梱されて" "いる基本的な機能のエディタとインタプリタ環境です。" -#: ../../glossary.rst:767 +#: ../../glossary.rst:775 msgid "immortal" msgstr "永続オブジェクト (immortal)" -#: ../../glossary.rst:769 +#: ../../glossary.rst:777 msgid "" "*Immortal objects* are a CPython implementation detail introduced in :pep:" "`683`." msgstr "" -#: ../../glossary.rst:772 +#: ../../glossary.rst:780 msgid "" "If an object is immortal, its :term:`reference count` is never modified, and " "therefore it is never deallocated while the interpreter is running. For " "example, :const:`True` and :const:`None` are immortal in CPython." msgstr "" -#: ../../glossary.rst:776 +#: ../../glossary.rst:784 msgid "" "Immortal objects can be identified via :func:`sys._is_immortal`, or via :c:" "func:`PyUnstable_IsImmortal` in the C API." msgstr "" -#: ../../glossary.rst:778 +#: ../../glossary.rst:786 msgid "immutable" msgstr "immutable" -#: ../../glossary.rst:780 +#: ../../glossary.rst:788 msgid "" "An object with a fixed value. Immutable objects include numbers, strings " "and tuples. Such an object cannot be altered. A new object has to be " @@ -1687,11 +1688,11 @@ msgid "" "improperly synchronized :term:`concurrent modification`." msgstr "" -#: ../../glossary.rst:787 +#: ../../glossary.rst:795 msgid "import path" msgstr "import path" -#: ../../glossary.rst:789 +#: ../../glossary.rst:797 msgid "" "A list of locations (or :term:`path entries `) that are searched " "by the :term:`path based finder` for modules to import. During import, this " @@ -1703,11 +1704,11 @@ msgstr "" "ら来ますが、サブパッケージの場合は親パッケージの ``__path__`` 属性からも来ま" "す。" -#: ../../glossary.rst:794 +#: ../../glossary.rst:802 msgid "importing" msgstr "importing" -#: ../../glossary.rst:796 +#: ../../glossary.rst:804 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." @@ -1715,11 +1716,11 @@ msgstr "" "あるモジュールの Python コードが別のモジュールの Python コードで使えるように" "する処理です。" -#: ../../glossary.rst:798 +#: ../../glossary.rst:806 msgid "importer" msgstr "importer" -#: ../../glossary.rst:800 +#: ../../glossary.rst:808 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." @@ -1727,37 +1728,37 @@ msgstr "" "モジュールを探してロードするオブジェクト。 :term:`finder` と :term:`loader` " "のどちらでもあるオブジェクト。" -#: ../../glossary.rst:802 +#: ../../glossary.rst:810 msgid "index" msgstr "" -#: ../../glossary.rst:804 +#: ../../glossary.rst:812 msgid "" "A numeric value that represents the position of an element in a :term:" "`sequence`." msgstr "" -#: ../../glossary.rst:807 +#: ../../glossary.rst:815 msgid "" "In Python, indexing starts at zero. For example, ``things[0]`` names the " "*first* element of ``things``; ``things[1]`` names the second one." msgstr "" -#: ../../glossary.rst:811 +#: ../../glossary.rst:819 msgid "" "In some contexts, Python allows negative indexes for counting from the end " "of a sequence, and indexing using :term:`slices `." msgstr "" -#: ../../glossary.rst:814 +#: ../../glossary.rst:822 msgid "See also :term:`subscript`." msgstr "" -#: ../../glossary.rst:815 +#: ../../glossary.rst:823 msgid "interactive" msgstr "interactive" -#: ../../glossary.rst:817 +#: ../../glossary.rst:825 msgid "" "Python has an interactive interpreter which means you can enter statements " "and expressions at the interpreter prompt, immediately execute them and see " @@ -1767,11 +1768,11 @@ msgid "" "For more on interactive mode, see :ref:`tut-interac`." msgstr "" -#: ../../glossary.rst:824 +#: ../../glossary.rst:832 msgid "interpreted" msgstr "interpreted" -#: ../../glossary.rst:826 +#: ../../glossary.rst:834 msgid "" "Python is an interpreted language, as opposed to a compiled one, though the " "distinction can be blurry because of the presence of the bytecode compiler. " @@ -1787,11 +1788,11 @@ msgstr "" "常、コンパイラ形式の言語よりも開発/デバッグのサイクルは短いものの、プログラ" "ムの実行は一般に遅いです。 :term:`対話的 ` も参照してください。" -#: ../../glossary.rst:833 +#: ../../glossary.rst:841 msgid "interpreter shutdown" msgstr "interpreter shutdown" -#: ../../glossary.rst:835 +#: ../../glossary.rst:843 msgid "" "When asked to shut down, the Python interpreter enters a special phase where " "it gradually releases all allocated resources, such as modules and various " @@ -1813,7 +1814,7 @@ msgstr "" "機能しない(よくある例はライブラリーモジュールや warning 機構です) ために様々" "な例外に直面します。" -#: ../../glossary.rst:844 +#: ../../glossary.rst:852 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." @@ -1821,11 +1822,11 @@ msgstr "" "インタープリタがシャットダウンする主な理由は ``__main__`` モジュールや実行さ" "れていたスクリプトの実行が終了したことです。" -#: ../../glossary.rst:846 +#: ../../glossary.rst:854 msgid "iterable" msgstr "iterable" -#: ../../glossary.rst:848 +#: ../../glossary.rst:856 msgid "" "An object capable of returning its members one at a time. Examples of " "iterables include all sequence types (such as :class:`list`, :class:`str`, " @@ -1835,7 +1836,7 @@ msgid "" "that implements :term:`sequence` semantics." msgstr "" -#: ../../glossary.rst:856 +#: ../../glossary.rst:864 msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " "where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " @@ -1860,46 +1861,34 @@ msgstr "" ":term:`イテレータ ` 、 :term:`シーケンス ` 、 :term:`ジェ" "ネレータ ` も参照してください。 " -#: ../../glossary.rst:866 +#: ../../glossary.rst:874 msgid "iterator" msgstr "iterator" -#: ../../glossary.rst:868 +#: ../../glossary.rst:876 msgid "" "An object representing a stream of data. Repeated calls to the iterator's :" "meth:`~iterator.__next__` method (or passing it to the built-in function :" "func:`next`) return successive items in the stream. When no more data are " "available a :exc:`StopIteration` exception is raised instead. At this " -"point, the iterator object is exhausted and any further calls to its :meth:`!" -"__next__` method just raise :exc:`StopIteration` again. Iterators are " -"required to have an :meth:`~iterator.__iter__` method that returns the " -"iterator object itself so every iterator is also iterable and may be used in " -"most places where other iterables are accepted. One notable exception is " -"code which attempts multiple iteration passes. A container object (such as " -"a :class:`list`) produces a fresh new iterator each time you pass it to the :" -"func:`iter` function or use it in a :keyword:`for` loop. Attempting this " -"with an iterator will just return the same exhausted iterator object used in " -"the previous iteration pass, making it appear like an empty container." -msgstr "" -"データの流れを表現するオブジェクトです。イテレータの :meth:`~iterator." -"__next__` メソッドを繰り返し呼び出す (または組み込み関数 :func:`next` に渡" -"す) と、流れの中の要素を一つずつ返します。データがなくなると、代わりに :exc:" -"`StopIteration` 例外を送出します。その時点で、イテレータオブジェクトは尽きて" -"おり、それ以降は :meth:`!__next__` を何度呼んでも :exc:`StopIteration` を送出" -"します。イテレータは、そのイテレータオブジェクト自体を返す :meth:`~iterator." -"__iter__` メソッドを実装しなければならないので、イテレータは他の iterable を" -"受理するほとんどの場所で利用できます。はっきりとした例外は複数の反復を行うよ" -"うなコードです。 (:class:`list` のような) コンテナオブジェクトは、自身を :" -"func:`iter` 関数にオブジェクトに渡したり :keyword:`for` ループ内で使うたび" -"に、新たな未使用のイテレータを生成します。これをイテレータで行おうとすると、" -"前回のイテレーションで使用済みの同じイテレータオブジェクトを単純に返すため、" -"空のコンテナのようになってしまいます。" - -#: ../../glossary.rst:883 +"point, the iterator object is :term:`exhausted` and any further calls to " +"its :meth:`!__next__` method just raise :exc:`StopIteration` again. " +"Iterators are required to have an :meth:`~iterator.__iter__` method that " +"returns the iterator object itself so every iterator is also iterable and " +"may be used in most places where other iterables are accepted. One notable " +"exception is code which attempts multiple iteration passes. A container " +"object (such as a :class:`list`) produces a fresh new iterator each time you " +"pass it to the :func:`iter` function or use it in a :keyword:`for` loop. " +"Attempting this with an iterator will just return the same exhausted " +"iterator object used in the previous iteration pass, making it appear like " +"an empty container." +msgstr "" + +#: ../../glossary.rst:891 msgid "More information can be found in :ref:`typeiter`." msgstr "詳細な情報は :ref:`typeiter` にあります。" -#: ../../glossary.rst:887 +#: ../../glossary.rst:895 msgid "" "CPython does not consistently apply the requirement that an iterator define :" "meth:`~iterator.__iter__`. And also please note that :term:`free-threaded " @@ -1907,21 +1896,21 @@ msgid "" "iterator operations." msgstr "" -#: ../../glossary.rst:892 +#: ../../glossary.rst:900 msgid "key" msgstr "キー" -#: ../../glossary.rst:894 +#: ../../glossary.rst:902 msgid "" "A value that identifies an entry in a :term:`mapping`. See also :term:" "`subscript`." msgstr "" -#: ../../glossary.rst:896 +#: ../../glossary.rst:904 msgid "key function" msgstr "key function" -#: ../../glossary.rst:898 +#: ../../glossary.rst:906 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " @@ -1931,7 +1920,7 @@ msgstr "" "び出し可能オブジェクト(callable)です。例えば、 :func:`locale.strxfrm` をキー" "関数に使えば、ロケール依存のソートの慣習にのっとったソートキーを返します。" -#: ../../glossary.rst:903 +#: ../../glossary.rst:911 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" @@ -1944,7 +1933,7 @@ msgstr "" "merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest`, :func:`itertools." "groupby` 等があります。" -#: ../../glossary.rst:909 +#: ../../glossary.rst:917 msgid "" "There are several ways to create a key function. For example. the :meth:" "`str.casefold` method can serve as a key function for case insensitive " @@ -1955,19 +1944,19 @@ msgid "" "` for examples of how to create and use key functions." msgstr "" -#: ../../glossary.rst:916 +#: ../../glossary.rst:924 msgid "keyword argument" msgstr "keyword argument" -#: ../../glossary.rst:918 ../../glossary.rst:1305 +#: ../../glossary.rst:926 ../../glossary.rst:1313 msgid "See :term:`argument`." msgstr ":term:`実引数 ` を参照してください。" -#: ../../glossary.rst:919 +#: ../../glossary.rst:927 msgid "lambda" msgstr "lambda" -#: ../../glossary.rst:921 +#: ../../glossary.rst:929 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " @@ -1977,11 +1966,11 @@ msgstr "" "term:`式 ` を含みます。ラムダ関数を作る構文は ``lambda " "[parameters]: expression`` です。" -#: ../../glossary.rst:924 +#: ../../glossary.rst:932 msgid "LBYL" msgstr "LBYL" -#: ../../glossary.rst:926 +#: ../../glossary.rst:934 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -1993,7 +1982,7 @@ msgstr "" "す。 :term:`EAFP` アプローチと対照的で、 :keyword:`if` 文がたくさん使われるの" "が特徴的です。" -#: ../../glossary.rst:931 +#: ../../glossary.rst:939 msgid "" "In a multi-threaded environment, the LBYL approach can risk introducing a :" "term:`race condition` between \"the looking\" and \"the leaping\". For " @@ -2003,30 +1992,30 @@ msgid "" "term:`EAFP` approach. See also :term:`thread-safe`." msgstr "" -#: ../../glossary.rst:937 +#: ../../glossary.rst:945 msgid "lexical analyzer" msgstr "" -#: ../../glossary.rst:940 +#: ../../glossary.rst:948 msgid "Formal name for the *tokenizer*; see :term:`token`." msgstr "" -#: ../../glossary.rst:941 +#: ../../glossary.rst:949 msgid "list" msgstr "list" -#: ../../glossary.rst:943 +#: ../../glossary.rst:951 msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " -"*O*\\ (1)." +"*O*\\ (1). See :ref:`time-complexity`." msgstr "" -#: ../../glossary.rst:946 +#: ../../glossary.rst:954 msgid "list comprehension" msgstr "list comprehension" -#: ../../glossary.rst:948 +#: ../../glossary.rst:956 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -2041,11 +2030,11 @@ msgstr "" "です。 :keyword:`if` 節がない場合、 ``range(256)`` の全ての要素が処理されま" "す。" -#: ../../glossary.rst:954 +#: ../../glossary.rst:962 msgid "lock" msgstr "" -#: ../../glossary.rst:956 +#: ../../glossary.rst:964 msgid "" "A :term:`synchronization primitive` that allows only one thread at a time to " "access a shared resource. A thread must acquire a lock before accessing the " @@ -2060,11 +2049,11 @@ msgid "" "`reentrant`." msgstr "" -#: ../../glossary.rst:967 +#: ../../glossary.rst:975 msgid "lock-free" msgstr "" -#: ../../glossary.rst:969 +#: ../../glossary.rst:977 msgid "" "An operation that does not acquire any :term:`lock` and uses atomic CPU " "instructions to ensure correctness. Lock-free operations can execute " @@ -2076,11 +2065,11 @@ msgid "" "object lock`." msgstr "" -#: ../../glossary.rst:977 +#: ../../glossary.rst:985 msgid "loader" msgstr "loader" -#: ../../glossary.rst:979 +#: ../../glossary.rst:987 msgid "" "An object that loads a module. It must define the :meth:`!exec_module` and :" "meth:`!create_module` methods to implement the :class:`~importlib.abc." @@ -2088,58 +2077,58 @@ msgid "" "also:" msgstr "" -#: ../../glossary.rst:985 +#: ../../glossary.rst:993 msgid ":ref:`finders-and-loaders`" msgstr "" -#: ../../glossary.rst:986 +#: ../../glossary.rst:994 msgid ":class:`importlib.abc.Loader`" msgstr "" -#: ../../glossary.rst:987 +#: ../../glossary.rst:995 msgid ":pep:`302`" msgstr ":pep:`302`" -#: ../../glossary.rst:988 +#: ../../glossary.rst:996 msgid "locale encoding" msgstr "ロケールエンコーディング" -#: ../../glossary.rst:990 +#: ../../glossary.rst:998 msgid "" "On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" "`locale.setlocale(locale.LC_CTYPE, new_locale) `." msgstr "" -#: ../../glossary.rst:993 +#: ../../glossary.rst:1001 msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." msgstr "" -#: ../../glossary.rst:995 +#: ../../glossary.rst:1003 msgid "" "On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." msgstr "" -#: ../../glossary.rst:997 +#: ../../glossary.rst:1005 msgid ":func:`locale.getencoding` can be used to get the locale encoding." msgstr "" -#: ../../glossary.rst:999 +#: ../../glossary.rst:1007 msgid "See also the :term:`filesystem encoding and error handler`." msgstr "" -#: ../../glossary.rst:1000 +#: ../../glossary.rst:1008 msgid "magic method" msgstr "magic method" -#: ../../glossary.rst:1004 +#: ../../glossary.rst:1012 msgid "An informal synonym for :term:`special method`." msgstr ":term:`special method` のくだけた同義語です。" -#: ../../glossary.rst:1005 +#: ../../glossary.rst:1013 msgid "mapping" msgstr "mapping" -#: ../../glossary.rst:1007 +#: ../../glossary.rst:1015 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`collections.abc.Mapping` or :class:" @@ -2155,11 +2144,11 @@ msgstr "" "defaultdict`, :class:`collections.OrderedDict`, :class:`collections.Counter` " "などです。" -#: ../../glossary.rst:1013 +#: ../../glossary.rst:1021 msgid "meta path finder" msgstr "meta path finder" -#: ../../glossary.rst:1015 +#: ../../glossary.rst:1023 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders ` と :term:`ネストされたスコープ ` も参照" "してください。" -#: ../../glossary.rst:1040 +#: ../../glossary.rst:1048 msgid "method resolution order" msgstr "method resolution order" -#: ../../glossary.rst:1042 +#: ../../glossary.rst:1050 msgid "" "Method Resolution Order is the order in which base classes are searched for " "a member during lookup. See :ref:`python_2.3_mro` for details of the " "algorithm used by the Python interpreter since the 2.3 release." msgstr "" -#: ../../glossary.rst:1045 +#: ../../glossary.rst:1053 msgid "module" msgstr "module" -#: ../../glossary.rst:1047 +#: ../../glossary.rst:1055 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -2248,15 +2237,15 @@ msgstr "" "ルは任意の Python オブジェクトを含む名前空間を持ちます。モジュールは :term:" "`importing` の処理によって Python に読み込まれます。" -#: ../../glossary.rst:1051 +#: ../../glossary.rst:1059 msgid "See also :term:`package`." msgstr ":term:`パッケージ ` を参照してください。" -#: ../../glossary.rst:1052 +#: ../../glossary.rst:1060 msgid "module spec" msgstr "module spec" -#: ../../glossary.rst:1054 +#: ../../glossary.rst:1062 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -2264,23 +2253,23 @@ msgstr "" "モジュールをロードするのに使われるインポート関連の情報を含む名前空間です。\n" ":class:`importlib.machinery.ModuleSpec` のインスタンスです。" -#: ../../glossary.rst:1057 +#: ../../glossary.rst:1065 msgid "See also :ref:`module-specs`." msgstr "" -#: ../../glossary.rst:1058 +#: ../../glossary.rst:1066 msgid "MRO" msgstr "MRO" -#: ../../glossary.rst:1060 +#: ../../glossary.rst:1068 msgid "See :term:`method resolution order`." msgstr ":term:`method resolution order` を参照してください。" -#: ../../glossary.rst:1061 +#: ../../glossary.rst:1069 msgid "mutable" msgstr "mutable" -#: ../../glossary.rst:1063 +#: ../../glossary.rst:1071 msgid "" "An :term:`object` with state that is allowed to change during the course of " "the program. In multi-threaded programs, mutable objects that are shared " @@ -2289,11 +2278,11 @@ msgid "" "safe`, and :term:`concurrent modification`." msgstr "" -#: ../../glossary.rst:1068 +#: ../../glossary.rst:1076 msgid "named tuple" msgstr "named tuple" -#: ../../glossary.rst:1070 +#: ../../glossary.rst:1078 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -2303,7 +2292,7 @@ msgstr "" "に対し属性を使ってのアクセスもできる任意の型やクラスに応用されています。\n" "その型やクラスは他の機能も持っていることもあります。" -#: ../../glossary.rst:1074 +#: ../../glossary.rst:1082 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." @@ -2313,7 +2302,7 @@ msgstr "" "は名前付きタプルです。\n" "他の例は :data:`sys.float_info` です::" -#: ../../glossary.rst:1078 +#: ../../glossary.rst:1086 msgid "" ">>> sys.float_info[1] # indexed access\n" "1024\n" @@ -2323,7 +2312,7 @@ msgid "" "True" msgstr "" -#: ../../glossary.rst:1085 +#: ../../glossary.rst:1093 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " @@ -2334,11 +2323,11 @@ msgid "" "be found in hand-written or built-in named tuples." msgstr "" -#: ../../glossary.rst:1093 +#: ../../glossary.rst:1101 msgid "namespace" msgstr "namespace" -#: ../../glossary.rst:1095 +#: ../../glossary.rst:1103 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " @@ -2360,38 +2349,38 @@ msgstr "" "れモジュール :mod:`random` や :mod:`itertools` で実装されていることが明らかで" "す。" -#: ../../glossary.rst:1105 +#: ../../glossary.rst:1113 msgid "namespace package" msgstr "namespace package" -#: ../../glossary.rst:1107 +#: ../../glossary.rst:1115 msgid "" "A :term:`package` which serves only as a container for subpackages. " "Namespace packages may have no physical representation, and specifically are " "not like a :term:`regular package` because they have no ``__init__.py`` file." msgstr "" -#: ../../glossary.rst:1112 +#: ../../glossary.rst:1120 msgid "" "Namespace packages allow several individually installable packages to have a " "common parent package. Otherwise, it is recommended to use a :term:`regular " "package`." msgstr "" -#: ../../glossary.rst:1115 +#: ../../glossary.rst:1123 msgid "" "For more information, see :pep:`420` and :ref:`reference-namespace-package`." msgstr "" -#: ../../glossary.rst:1117 +#: ../../glossary.rst:1125 msgid "See also :term:`module`." msgstr ":term:`module` を参照してください。" -#: ../../glossary.rst:1118 +#: ../../glossary.rst:1126 msgid "native code" msgstr "" -#: ../../glossary.rst:1120 +#: ../../glossary.rst:1128 msgid "" "Code that is compiled to machine instructions and runs directly on the " "processor, as opposed to code that is interpreted or runs in a virtual " @@ -2400,11 +2389,11 @@ msgid "" "can be called from Python. See also :term:`extension module`." msgstr "" -#: ../../glossary.rst:1125 +#: ../../glossary.rst:1133 msgid "nested scope" msgstr "nested scope" -#: ../../glossary.rst:1127 +#: ../../glossary.rst:1135 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -2420,11 +2409,11 @@ msgstr "" "を読み書きします。同様に、グローバル変数を使うとグローバル名前空間の値を読み" "書きします。 :keyword:`nonlocal` で外側の変数に書き込めます。" -#: ../../glossary.rst:1134 +#: ../../glossary.rst:1142 msgid "new-style class" msgstr "new-style class" -#: ../../glossary.rst:1136 +#: ../../glossary.rst:1144 msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " @@ -2432,11 +2421,11 @@ msgid "" "meth:`~object.__getattribute__`, class methods, and static methods." msgstr "" -#: ../../glossary.rst:1141 +#: ../../glossary.rst:1149 msgid "non-deterministic" msgstr "" -#: ../../glossary.rst:1143 +#: ../../glossary.rst:1151 msgid "" "Behavior where the outcome of a program can vary between executions with the " "same inputs. In multi-threaded programs, non-deterministic behavior often " @@ -2446,11 +2435,11 @@ msgid "" "` helps ensure deterministic behavior." msgstr "" -#: ../../glossary.rst:1150 +#: ../../glossary.rst:1158 msgid "object" msgstr "object" -#: ../../glossary.rst:1152 +#: ../../glossary.rst:1160 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." @@ -2459,11 +2448,11 @@ msgstr "" "データ。もしくは、全ての :term:`新スタイルクラス ` の究極の" "基底クラスのこと。" -#: ../../glossary.rst:1155 +#: ../../glossary.rst:1163 msgid "optimized scope" msgstr "" -#: ../../glossary.rst:1157 +#: ../../glossary.rst:1165 msgid "" "A scope where target local variable names are reliably known to the compiler " "when the code is compiled, allowing optimization of read and write access to " @@ -2474,11 +2463,11 @@ msgid "" "to optimized scopes." msgstr "" -#: ../../glossary.rst:1164 +#: ../../glossary.rst:1172 msgid "optional module" msgstr "" -#: ../../glossary.rst:1166 +#: ../../glossary.rst:1174 msgid "" "An :term:`extension module` that is part of the :term:`standard library`, " "but may be absent in some builds of :term:`CPython`, usually due to missing " @@ -2486,17 +2475,17 @@ msgid "" "platform." msgstr "" -#: ../../glossary.rst:1171 +#: ../../glossary.rst:1179 msgid "" "See :ref:`optional-module-requirements` for a list of optional modules that " "require third-party libraries." msgstr "" -#: ../../glossary.rst:1173 +#: ../../glossary.rst:1181 msgid "package" msgstr "package" -#: ../../glossary.rst:1175 +#: ../../glossary.rst:1183 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with a ``__path__`` " @@ -2506,16 +2495,16 @@ msgstr "" "`module` のことです。専門的には、パッケージは ``__path__`` 属性を持つ Python " "オブジェクトです。" -#: ../../glossary.rst:1179 +#: ../../glossary.rst:1187 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "" ":term:`regular package` と :term:`namespace package` を参照してください。" -#: ../../glossary.rst:1180 +#: ../../glossary.rst:1188 msgid "parallelism" msgstr "" -#: ../../glossary.rst:1182 +#: ../../glossary.rst:1190 msgid "" "Executing multiple operations at the same time (e.g. on multiple CPU " "cores). In Python builds with the :term:`global interpreter lock (GIL) " @@ -2526,11 +2515,11 @@ msgid "" "threads can run Python code simultaneously on different cores." msgstr "" -#: ../../glossary.rst:1190 +#: ../../glossary.rst:1198 msgid "parameter" msgstr "parameter" -#: ../../glossary.rst:1192 +#: ../../glossary.rst:1200 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " @@ -2540,7 +2529,7 @@ msgstr "" "` ) の定義において関数が受ける :term:`実引数 ` を指定しま" "す。仮引数には5種類あります:" -#: ../../glossary.rst:1196 +#: ../../glossary.rst:1204 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -2551,11 +2540,11 @@ msgstr "" "ワード引数 ` として渡すことができる引数を指定します。\n" "これはたとえば以下の *foo* や *bar* のように、デフォルトの仮引数の種類です::" -#: ../../glossary.rst:1201 +#: ../../glossary.rst:1209 msgid "def func(foo, bar=None): ..." msgstr "def func(foo, bar=None): ..." -#: ../../glossary.rst:1205 +#: ../../glossary.rst:1213 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -2566,11 +2555,11 @@ msgstr "" "関数定義の引数のリストの中でそれらの後ろに ``/`` を含めることで定義できます。" "例えば下記の *posonly1* と *posonly2* は位置専用引数になります:: " -#: ../../glossary.rst:1210 +#: ../../glossary.rst:1218 msgid "def func(posonly1, posonly2, /, positional_or_keyword): ..." msgstr "def func(posonly1, posonly2, /, positional_or_keyword): ..." -#: ../../glossary.rst:1214 +#: ../../glossary.rst:1222 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -2583,11 +2572,11 @@ msgstr "" "ように、関数定義の仮引数リストに含めた可変長位置引数または裸の ``*`` の後で" "す::" -#: ../../glossary.rst:1220 +#: ../../glossary.rst:1228 msgid "def func(arg, *, kw_only1, kw_only2): ..." msgstr "" -#: ../../glossary.rst:1222 +#: ../../glossary.rst:1230 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -2599,11 +2588,11 @@ msgstr "" "個数の位置引数が与えられることを指定します。このような仮引数は、以下の " "*args* のように仮引数名の前に ``*`` をつけることで定義できます::" -#: ../../glossary.rst:1228 +#: ../../glossary.rst:1236 msgid "def func(*args, **kwargs): ..." msgstr "" -#: ../../glossary.rst:1230 +#: ../../glossary.rst:1238 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -2615,7 +2604,7 @@ msgstr "" "数は、上の例の *kwargs* のように仮引数名の前に ``**`` をつけることで定義でき" "ます。" -#: ../../glossary.rst:1236 +#: ../../glossary.rst:1244 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." @@ -2623,7 +2612,7 @@ msgstr "" "仮引数はオプションと必須の引数のどちらも指定でき、オプションの引数にはデフォ" "ルト値も指定できます。" -#: ../../glossary.rst:1239 +#: ../../glossary.rst:1247 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -2634,11 +2623,11 @@ msgstr "" "` 、:class:`inspect.Parameter` クラス、 :ref:" "`function` セクション、:pep:`362` を参照してください。" -#: ../../glossary.rst:1243 +#: ../../glossary.rst:1251 msgid "per-object lock" msgstr "" -#: ../../glossary.rst:1245 +#: ../../glossary.rst:1253 msgid "" "A :term:`lock` associated with an individual object instance rather than a " "global lock shared across all objects. In :term:`free-threaded ` which " "searches an :term:`import path` for modules." @@ -2706,11 +2695,11 @@ msgstr "" "デフォルトの :term:`meta path finder` の1つは、モジュールの :term:`import " "path` を検索します。" -#: ../../glossary.rst:1274 +#: ../../glossary.rst:1282 msgid "path-like object" msgstr "path-like object" -#: ../../glossary.rst:1276 +#: ../../glossary.rst:1284 msgid "" "An object representing a file system path. A path-like object is either a :" "class:`str` or :class:`bytes` object representing a path, or an object " @@ -2731,11 +2720,11 @@ msgstr "" "れ :class:`str` あるいは :class:`bytes` になるのを保証するのに使えます。\n" ":pep:`519` で導入されました。" -#: ../../glossary.rst:1284 +#: ../../glossary.rst:1292 msgid "PEP" msgstr "PEP" -#: ../../glossary.rst:1286 +#: ../../glossary.rst:1294 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -2747,7 +2736,7 @@ msgstr "" "PEP は、機能についての簡潔な技術的仕様と提案する機能の論拠 (理論) を伝えるべ" "きです。" -#: ../../glossary.rst:1292 +#: ../../glossary.rst:1300 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -2760,15 +2749,15 @@ msgstr "" "著者にはコミュニティ内の合意形成を行うこと、反対意見を文書化することの責務が" "あります。" -#: ../../glossary.rst:1298 +#: ../../glossary.rst:1306 msgid "See :pep:`1`." msgstr ":pep:`1` を参照してください。" -#: ../../glossary.rst:1299 +#: ../../glossary.rst:1307 msgid "portion" msgstr "portion" -#: ../../glossary.rst:1301 +#: ../../glossary.rst:1309 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." @@ -2776,15 +2765,15 @@ msgstr "" ":pep:`420` で定義されている、namespace package に属する、複数のファイルが " "(zipファイルに格納されている場合もある) 1つのディレクトリに格納されたもの。" -#: ../../glossary.rst:1303 +#: ../../glossary.rst:1311 msgid "positional argument" msgstr "位置引数 (positional argument)" -#: ../../glossary.rst:1306 +#: ../../glossary.rst:1314 msgid "provisional API" msgstr "provisional API" -#: ../../glossary.rst:1308 +#: ../../glossary.rst:1316 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -2801,7 +2790,7 @@ msgstr "" "ものではありません -- これは API を組み込む前には見落とされていた重大な欠陥が" "露呈したときにのみ行われます。" -#: ../../glossary.rst:1317 +#: ../../glossary.rst:1325 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " @@ -2810,7 +2799,7 @@ msgstr "" "暫定 API についても、後方互換性のない変更は「最終手段」とみなされています。問" "題点が判明した場合でも後方互換な解決策を探すべきです。" -#: ../../glossary.rst:1321 +#: ../../glossary.rst:1329 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " @@ -2820,19 +2809,19 @@ msgstr "" "られることなく、時代を超えて進化を続けられます。詳細は :pep:`411` を参照して" "ください。" -#: ../../glossary.rst:1324 +#: ../../glossary.rst:1332 msgid "provisional package" msgstr "provisional package" -#: ../../glossary.rst:1326 +#: ../../glossary.rst:1334 msgid "See :term:`provisional API`." msgstr ":term:`provisional API` を参照してください。" -#: ../../glossary.rst:1327 +#: ../../glossary.rst:1335 msgid "Python 3000" msgstr "Python 3000" -#: ../../glossary.rst:1329 +#: ../../glossary.rst:1337 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " @@ -2841,11 +2830,11 @@ msgstr "" "Python 3.x リリースラインのニックネームです。(Python 3 が遠い将来の話だった頃" "に作られた言葉です。) \"Py3k\" と略されることもあります。" -#: ../../glossary.rst:1332 +#: ../../glossary.rst:1340 msgid "Pythonic" msgstr "Pythonic" -#: ../../glossary.rst:1334 +#: ../../glossary.rst:1342 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -2860,27 +2849,27 @@ msgstr "" "くの言語にはこの仕組みはないので、Python に慣れていない人は代わりに数値のカウ" "ンターを使うかもしれません::" -#: ../../glossary.rst:1341 +#: ../../glossary.rst:1349 msgid "" "for i in range(len(food)):\n" " print(food[i])" msgstr "" -#: ../../glossary.rst:1344 +#: ../../glossary.rst:1352 msgid "As opposed to the cleaner, Pythonic method::" msgstr "これに対し、きれいな Pythonic な方法は::" -#: ../../glossary.rst:1346 +#: ../../glossary.rst:1354 msgid "" "for piece in food:\n" " print(piece)" msgstr "" -#: ../../glossary.rst:1348 +#: ../../glossary.rst:1356 msgid "qualified name" msgstr "qualified name" -#: ../../glossary.rst:1350 +#: ../../glossary.rst:1358 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -2892,7 +2881,7 @@ msgstr "" "されています。トップレベルの関数やクラスでは、修飾名はオブジェクトの名前と同" "じです::" -#: ../../glossary.rst:1355 +#: ../../glossary.rst:1363 msgid "" ">>> class C:\n" "... class D:\n" @@ -2907,7 +2896,7 @@ msgid "" "'C.D.meth'" msgstr "" -#: ../../glossary.rst:1367 +#: ../../glossary.rst:1375 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " "dotted path to the module, including any parent packages, e.g. ``email.mime." @@ -2917,18 +2906,18 @@ msgstr "" "の親パッケージを含む全体のドット名表記、例えば ``email.mime.text`` を意味しま" "す::" -#: ../../glossary.rst:1371 +#: ../../glossary.rst:1379 msgid "" ">>> import email.mime.text\n" ">>> email.mime.text.__name__\n" "'email.mime.text'" msgstr "" -#: ../../glossary.rst:1374 +#: ../../glossary.rst:1382 msgid "race condition" msgstr "" -#: ../../glossary.rst:1376 +#: ../../glossary.rst:1384 msgid "" "A condition of a program where the behavior depends on the relative timing " "or ordering of events, particularly in multi-threaded programs. Race " @@ -2940,11 +2929,11 @@ msgid "" "primitives ` helps prevent race conditions." msgstr "" -#: ../../glossary.rst:1386 +#: ../../glossary.rst:1394 msgid "reference count" msgstr "reference count" -#: ../../glossary.rst:1388 +#: ../../glossary.rst:1396 msgid "" "The number of references to an object. When the reference count of an " "object drops to zero, it is deallocated. Some objects are :term:`immortal` " @@ -2961,18 +2950,18 @@ msgstr "" "の重要な要素です。プログラマーは、 任意のオブジェクトの参照カウントを知るため" "に :func:`sys.getrefcount` 関数を呼び出すことが出来ます。" -#: ../../glossary.rst:1397 +#: ../../glossary.rst:1405 msgid "" "In :term:`CPython`, reference counts are not considered to be stable or well-" "defined values; the number of references to an object, and how that number " "is affected by Python code, may be different between versions." msgstr "" -#: ../../glossary.rst:1401 +#: ../../glossary.rst:1409 msgid "regular package" msgstr "regular package" -#: ../../glossary.rst:1403 +#: ../../glossary.rst:1411 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2980,22 +2969,22 @@ msgstr "" "伝統的な、 ``__init__.py`` ファイルを含むディレクトリとしての :term:" "`package`。" -#: ../../glossary.rst:1406 +#: ../../glossary.rst:1414 msgid "See also :term:`namespace package`." msgstr ":term:`namespace package` を参照してください。" -#: ../../glossary.rst:1407 +#: ../../glossary.rst:1415 msgid "reentrant" msgstr "" -#: ../../glossary.rst:1409 +#: ../../glossary.rst:1417 msgid "" "A property of a function or :term:`lock` that allows it to be called or " "acquired multiple times by the same thread without causing errors or a :term:" "`deadlock`." msgstr "" -#: ../../glossary.rst:1413 +#: ../../glossary.rst:1421 msgid "" "For functions, reentrancy means the function can be safely called again " "before a previous invocation has completed, which is important when " @@ -3004,7 +2993,7 @@ msgid "" "a multithreaded program." msgstr "" -#: ../../glossary.rst:1419 +#: ../../glossary.rst:1427 msgid "" "For locks, Python's :class:`threading.RLock` (reentrant lock) is reentrant, " "meaning a thread that already holds the lock can acquire it again without " @@ -3012,15 +3001,15 @@ msgid "" "attempting to acquire it twice from the same thread will cause a deadlock." msgstr "" -#: ../../glossary.rst:1425 +#: ../../glossary.rst:1433 msgid "See also :term:`lock` and :term:`deadlock`." msgstr "" -#: ../../glossary.rst:1426 +#: ../../glossary.rst:1434 msgid "REPL" msgstr "REPL" -#: ../../glossary.rst:1428 +#: ../../glossary.rst:1436 msgid "" "An acronym for the \"read–eval–print loop\", another name for the :term:" "`interactive` interpreter shell." @@ -3028,11 +3017,11 @@ msgstr "" "\"read–eval–print loop\" の頭字語で、 :term:`対話型 ` インタープ" "リターシェルの別名。" -#: ../../glossary.rst:1430 +#: ../../glossary.rst:1438 msgid "__slots__" msgstr "__slots__" -#: ../../glossary.rst:1432 +#: ../../glossary.rst:1440 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -3046,11 +3035,11 @@ msgstr "" "となるアプリケーションでインスタンスが大量に存在する、といったときを除き、使" "わないのがベストです。" -#: ../../glossary.rst:1437 +#: ../../glossary.rst:1445 msgid "sequence" msgstr "sequence" -#: ../../glossary.rst:1439 +#: ../../glossary.rst:1447 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`~object.__getitem__` special method and defines a :" @@ -3062,7 +3051,7 @@ msgid "" "integers." msgstr "" -#: ../../glossary.rst:1448 +#: ../../glossary.rst:1456 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" @@ -3073,11 +3062,11 @@ msgid "" "generally, see :ref:`Common Sequence Operations `." msgstr "" -#: ../../glossary.rst:1458 +#: ../../glossary.rst:1466 msgid "set comprehension" msgstr "" -#: ../../glossary.rst:1460 +#: ../../glossary.rst:1468 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -3089,22 +3078,22 @@ msgstr "" "if c not in 'abc'}`` とすると、``{'r', 'd'}`` という文字列の辞書を生成しま" "す。 :ref:`comprehensions` を参照してください。" -#: ../../glossary.rst:1464 +#: ../../glossary.rst:1472 msgid "single dispatch" msgstr "single dispatch" -#: ../../glossary.rst:1466 +#: ../../glossary.rst:1474 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." msgstr "" ":term:`generic function` の一種で実装は一つの引数の型により選択されます。" -#: ../../glossary.rst:1468 +#: ../../glossary.rst:1476 msgid "slice" msgstr "slice" -#: ../../glossary.rst:1470 +#: ../../glossary.rst:1478 msgid "" "An object of type :class:`slice`, used to describe a portion of a :term:" "`sequence`. A slice object is created when using the :ref:`slicing " @@ -3112,34 +3101,34 @@ msgid "" "inside square brackets, such as in ``variable_name[1:3:5]``." msgstr "" -#: ../../glossary.rst:1475 +#: ../../glossary.rst:1483 msgid "soft deprecated" msgstr "" -#: ../../glossary.rst:1477 +#: ../../glossary.rst:1485 msgid "" "A soft deprecated API should not be used in new code, but it is safe for " "already existing code to use it. The API remains documented and tested, but " "will not be enhanced further." msgstr "" -#: ../../glossary.rst:1481 +#: ../../glossary.rst:1489 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." msgstr "" -#: ../../glossary.rst:1484 +#: ../../glossary.rst:1492 msgid "" "See `PEP 387: Soft Deprecation `_." msgstr "" -#: ../../glossary.rst:1486 +#: ../../glossary.rst:1494 msgid "special method" msgstr "special method" -#: ../../glossary.rst:1490 +#: ../../glossary.rst:1498 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -3151,11 +3140,11 @@ msgstr "" "コア 2 つがついています。特殊メソッドについては :ref:`specialnames` で解説さ" "れています。" -#: ../../glossary.rst:1494 +#: ../../glossary.rst:1502 msgid "standard library" msgstr "" -#: ../../glossary.rst:1496 +#: ../../glossary.rst:1504 msgid "" "The collection of :term:`packages `, :term:`modules ` and :" "term:`extension modules ` distributed as a part of the " @@ -3164,17 +3153,17 @@ msgid "" "Documentation can be found at :ref:`library-index`." msgstr "" -#: ../../glossary.rst:1502 +#: ../../glossary.rst:1510 msgid "" "See also :data:`sys.stdlib_module_names` for a list of all possible standard " "library module names." msgstr "" -#: ../../glossary.rst:1504 +#: ../../glossary.rst:1512 msgid "statement" msgstr "statement" -#: ../../glossary.rst:1506 +#: ../../glossary.rst:1514 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -3184,30 +3173,46 @@ msgstr "" "` かキーワードから構成されるもののどちらかです。後者には :" "keyword:`if`、:keyword:`while`、:keyword:`for` があります。" -#: ../../glossary.rst:1509 +#: ../../glossary.rst:1517 msgid "static type checker" msgstr "" -#: ../../glossary.rst:1511 +#: ../../glossary.rst:1519 msgid "" "An external tool that reads Python code and analyzes it, looking for issues " "such as incorrect types. See also :term:`type hints ` and the :" "mod:`typing` module." msgstr "" -#: ../../glossary.rst:1514 +#: ../../glossary.rst:1522 msgid "stdlib" msgstr "" -#: ../../glossary.rst:1516 +#: ../../glossary.rst:1524 msgid "An abbreviation of :term:`standard library`." msgstr "" -#: ../../glossary.rst:1517 +#: ../../glossary.rst:1525 +msgid "steal" +msgstr "" + +#: ../../glossary.rst:1527 +msgid "" +"In Python's C API, \"*stealing*\" an argument means that ownership of the " +"argument is transferred to the called function. The caller must not use that " +"reference after the call. Generally, functions that \"steal\" an argument do " +"so even if they fail." +msgstr "" + +#: ../../glossary.rst:1532 +msgid "See :ref:`api-refcountdetails` for a full explanation." +msgstr "" + +#: ../../glossary.rst:1533 msgid "strong reference" msgstr "" -#: ../../glossary.rst:1519 +#: ../../glossary.rst:1535 msgid "" "In Python's C API, a strong reference is a reference to an object which is " "owned by the code holding the reference. The strong reference is taken by " @@ -3215,7 +3220,7 @@ msgid "" "c:func:`Py_DECREF` when the reference is deleted." msgstr "" -#: ../../glossary.rst:1525 +#: ../../glossary.rst:1541 msgid "" "The :c:func:`Py_NewRef` function can be used to create a strong reference to " "an object. Usually, the :c:func:`Py_DECREF` function must be called on the " @@ -3223,15 +3228,15 @@ msgid "" "leaking one reference." msgstr "" -#: ../../glossary.rst:1530 +#: ../../glossary.rst:1546 msgid "See also :term:`borrowed reference`." msgstr "" -#: ../../glossary.rst:1531 +#: ../../glossary.rst:1547 msgid "subscript" msgstr "添字" -#: ../../glossary.rst:1533 +#: ../../glossary.rst:1549 msgid "" "The expression in square brackets of a :ref:`subscription expression " "`, for example, the ``3`` in ``items[3]``. Usually used to " @@ -3240,11 +3245,11 @@ msgid "" "term:`sequence`." msgstr "" -#: ../../glossary.rst:1539 +#: ../../glossary.rst:1555 msgid "synchronization primitive" msgstr "" -#: ../../glossary.rst:1541 +#: ../../glossary.rst:1557 msgid "" "A basic building block for coordinating (synchronizing) the execution of " "multiple threads to ensure :term:`thread-safe` access to shared resources. " @@ -3258,48 +3263,48 @@ msgid "" "term:`lock`." msgstr "" -#: ../../glossary.rst:1551 +#: ../../glossary.rst:1567 msgid "t-string" msgstr "" -#: ../../glossary.rst:1552 +#: ../../glossary.rst:1568 msgid "t-strings" msgstr "" -#: ../../glossary.rst:1554 +#: ../../glossary.rst:1570 msgid "" "String literals prefixed with ``t`` or ``T`` are commonly called \"t-" "strings\" which is short for :ref:`template string literals `." msgstr "" -#: ../../glossary.rst:1557 +#: ../../glossary.rst:1573 msgid "text encoding" msgstr "text encoding" -#: ../../glossary.rst:1559 +#: ../../glossary.rst:1575 msgid "" "A string in Python is a sequence of Unicode code points (in range " "``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " "serialized as a sequence of bytes." msgstr "" -#: ../../glossary.rst:1563 +#: ../../glossary.rst:1579 msgid "" "Serializing a string into a sequence of bytes is known as \"encoding\", and " "recreating the string from the sequence of bytes is known as \"decoding\"." msgstr "" -#: ../../glossary.rst:1566 +#: ../../glossary.rst:1582 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." msgstr "" -#: ../../glossary.rst:1569 +#: ../../glossary.rst:1585 msgid "text file" msgstr "text file" -#: ../../glossary.rst:1571 +#: ../../glossary.rst:1587 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -3315,7 +3320,7 @@ msgstr "" "StringIO` インスタンスなどをテキストモード (``'r'`` or ``'w'``) で開いたファ" "イルです。" -#: ../../glossary.rst:1578 +#: ../../glossary.rst:1594 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -3324,32 +3329,32 @@ msgstr "" "オブジェクトについては、 :term:`バイナリファイル ` も参照してく" "ださい。" -#: ../../glossary.rst:1580 +#: ../../glossary.rst:1596 msgid "thread state" msgstr "" -#: ../../glossary.rst:1583 +#: ../../glossary.rst:1599 msgid "" "The information used by the :term:`CPython` runtime to run in an OS thread. " "For example, this includes the current exception, if any, and the state of " "the bytecode interpreter." msgstr "" -#: ../../glossary.rst:1587 +#: ../../glossary.rst:1603 msgid "" "Each thread state is bound to a single OS thread, but threads may have many " "thread states available. At most, one of them may be :term:`attached " "` at once." msgstr "" -#: ../../glossary.rst:1591 +#: ../../glossary.rst:1607 msgid "" "An :term:`attached thread state` is required to call most of Python's C API, " "unless a function explicitly documents otherwise. The bytecode interpreter " "only runs under an attached thread state." msgstr "" -#: ../../glossary.rst:1595 +#: ../../glossary.rst:1611 msgid "" "Each thread state belongs to a single interpreter, but each interpreter may " "have many thread states, including multiple for the same OS thread. Thread " @@ -3358,17 +3363,17 @@ msgid "" "given moment." msgstr "" -#: ../../glossary.rst:1601 +#: ../../glossary.rst:1617 msgid "" "See :ref:`Thread State and the Global Interpreter Lock ` for more " "information." msgstr "" -#: ../../glossary.rst:1603 +#: ../../glossary.rst:1619 msgid "thread-safe" msgstr "" -#: ../../glossary.rst:1605 +#: ../../glossary.rst:1621 msgid "" "A module, function, or class that behaves correctly when used by multiple " "threads concurrently. Thread-safe code uses appropriate :term:" @@ -3382,28 +3387,28 @@ msgid "" "` when used in multi-threaded programs." msgstr "" -#: ../../glossary.rst:1616 +#: ../../glossary.rst:1632 msgid "token" msgstr "トークン" -#: ../../glossary.rst:1619 +#: ../../glossary.rst:1635 msgid "" "A small unit of source code, generated by the :ref:`lexical analyzer " "` (also called the *tokenizer*). Names, numbers, strings, " "operators, newlines and similar are represented by tokens." msgstr "" -#: ../../glossary.rst:1624 +#: ../../glossary.rst:1640 msgid "" "The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" "`token` module contains information on the various types of tokens." msgstr "" -#: ../../glossary.rst:1627 +#: ../../glossary.rst:1643 msgid "triple-quoted string" msgstr "triple-quoted string" -#: ../../glossary.rst:1629 +#: ../../glossary.rst:1645 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -3419,26 +3424,26 @@ msgstr "" "しに書くことができますし、行継続文字(\\\\)を使わなくても複数行にまたがること" "ができるので、ドキュメンテーション文字列を書く時に特に便利です。" -#: ../../glossary.rst:1636 +#: ../../glossary.rst:1652 msgid "type" msgstr "type" -#: ../../glossary.rst:1638 +#: ../../glossary.rst:1654 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~object." "__class__` attribute or can be retrieved with ``type(obj)``." msgstr "" -#: ../../glossary.rst:1642 +#: ../../glossary.rst:1658 msgid "type alias" msgstr "type alias" -#: ../../glossary.rst:1644 +#: ../../glossary.rst:1660 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "(型エイリアス) 型の別名で、型を識別子に代入して作成します。" -#: ../../glossary.rst:1646 +#: ../../glossary.rst:1662 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -3446,18 +3451,18 @@ msgstr "" "型エイリアスは :term:`型ヒント ` を単純化するのに有用です。例え" "ば::" -#: ../../glossary.rst:1649 +#: ../../glossary.rst:1665 msgid "" "def remove_gray_shades(\n" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" " pass" msgstr "" -#: ../../glossary.rst:1653 +#: ../../glossary.rst:1669 msgid "could be made more readable like this::" msgstr "これは次のようにより読みやすくできます::" -#: ../../glossary.rst:1655 +#: ../../glossary.rst:1671 msgid "" "Color = tuple[int, int, int]\n" "\n" @@ -3465,15 +3470,15 @@ msgid "" " pass" msgstr "" -#: ../../glossary.rst:1660 ../../glossary.rst:1674 +#: ../../glossary.rst:1676 ../../glossary.rst:1690 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "機能の説明がある :mod:`typing` と :pep:`484` を参照してください。" -#: ../../glossary.rst:1661 +#: ../../glossary.rst:1677 msgid "type hint" msgstr "type hint" -#: ../../glossary.rst:1663 +#: ../../glossary.rst:1679 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -3481,14 +3486,14 @@ msgstr "" "(型ヒント) 変数、クラス属性、関数のパラメータや返り値の期待される型を指定す" "る :term:`annotation` です。" -#: ../../glossary.rst:1666 +#: ../../glossary.rst:1682 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to :term:`static type checkers `. They can also aid " "IDEs with code completion and refactoring." msgstr "" -#: ../../glossary.rst:1670 +#: ../../glossary.rst:1686 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -3496,11 +3501,11 @@ msgstr "" "グローバル変数、クラス属性、関数で、ローカル変数でないものの型ヒントは :func:" "`typing.get_type_hints` で取得できます。" -#: ../../glossary.rst:1675 +#: ../../glossary.rst:1691 msgid "universal newlines" msgstr "universal newlines" -#: ../../glossary.rst:1677 +#: ../../glossary.rst:1693 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -3513,26 +3518,26 @@ msgstr "" "``'\\r'``。利用法について詳しくは、 :pep:`278` と :pep:`3116` 、さらに :func:" "`bytes.splitlines` も参照してください。" -#: ../../glossary.rst:1682 +#: ../../glossary.rst:1698 msgid "variable annotation" msgstr "variable annotation" -#: ../../glossary.rst:1684 +#: ../../glossary.rst:1700 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "(変数アノテーション) 変数あるいはクラス属性の :term:`annotation` 。" -#: ../../glossary.rst:1686 +#: ../../glossary.rst:1702 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "変数あるいはクラス属性に注釈を付けたときは、代入部分は任意です::" -#: ../../glossary.rst:1688 +#: ../../glossary.rst:1704 msgid "" "class C:\n" " field: 'annotation'" msgstr "" -#: ../../glossary.rst:1691 +#: ../../glossary.rst:1707 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -3540,16 +3545,16 @@ msgstr "" "変数アノテーションは通常は :term:`型ヒント` のために使われます: 例" "えば、この変数は :class:`int` の値を取ることを期待されています::" -#: ../../glossary.rst:1695 +#: ../../glossary.rst:1711 msgid "count: int = 0" msgstr "" -#: ../../glossary.rst:1697 +#: ../../glossary.rst:1713 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" "変数アノテーションの構文については :ref:`annassign` 節で解説しています。" -#: ../../glossary.rst:1699 +#: ../../glossary.rst:1715 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " @@ -3559,11 +3564,11 @@ msgstr "" "してください。また、アノテーションを利用するベストプラクティスとして :ref:" "`annotations-howto` も参照してください。" -#: ../../glossary.rst:1703 +#: ../../glossary.rst:1719 msgid "virtual environment" msgstr "virtual environment" -#: ../../glossary.rst:1705 +#: ../../glossary.rst:1721 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -3574,15 +3579,15 @@ msgstr "" "ケーションは同じシステム上で動いている他の Python アプリケーションの挙動に干" "渉することなく Python パッケージのインストールと更新を行うことができます。" -#: ../../glossary.rst:1710 +#: ../../glossary.rst:1726 msgid "See also :mod:`venv`." msgstr ":mod:`venv` を参照してください。" -#: ../../glossary.rst:1711 +#: ../../glossary.rst:1727 msgid "virtual machine" msgstr "virtual machine" -#: ../../glossary.rst:1713 +#: ../../glossary.rst:1729 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -3591,22 +3596,22 @@ msgstr "" "シンは、バイトコードコンパイラが出力した :term:`バイトコード ` を実" "行します。" -#: ../../glossary.rst:1715 +#: ../../glossary.rst:1731 msgid "walrus operator" msgstr "" -#: ../../glossary.rst:1717 +#: ../../glossary.rst:1733 msgid "" "A light-hearted way to refer to the :ref:`assignment expression ` operator ``:=`` because it looks a bit like a walrus if you " "turn your head." msgstr "" -#: ../../glossary.rst:1720 +#: ../../glossary.rst:1736 msgid "Zen of Python" msgstr "Zen of Python" -#: ../../glossary.rst:1722 +#: ../../glossary.rst:1738 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -3632,10 +3637,10 @@ msgstr "" msgid "Fortran contiguous" msgstr "" -#: ../../glossary.rst:1002 +#: ../../glossary.rst:1010 msgid "magic" msgstr "" -#: ../../glossary.rst:1488 +#: ../../glossary.rst:1496 msgid "special" msgstr "特殊" diff --git a/howto/a-conceptual-overview-of-asyncio.po b/howto/a-conceptual-overview-of-asyncio.po index 6de0002cb..89229780a 100644 --- a/howto/a-conceptual-overview-of-asyncio.po +++ b/howto/a-conceptual-overview-of-asyncio.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/annotations.po b/howto/annotations.po index cd842d51b..0c62a59df 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: digdugdog, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -313,14 +313,11 @@ msgstr "" #: ../../howto/annotations.rst:154 msgid "" -"If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, :func:" +"If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, :deco:" "`functools.wraps`, or :func:`functools.partial`, iteratively unwrap it by " "accessing either ``o.__wrapped__`` or ``o.func`` as appropriate, until you " "have found the root unwrapped function." msgstr "" -"``o`` が :func:`functools.update_wrapper` か :func:`functools.wraps` か :" -"func:`functools.partial` でラップされた callable ならば、一番内部の関数に到達" -"するまで、 ``o.__wrapped__`` か ``o.func`` のどちらかを繰り返し取得する。" #: ../../howto/annotations.rst:158 msgid "" diff --git a/howto/argparse-optparse.po b/howto/argparse-optparse.po index 76a06cc32..4d4076294 100644 --- a/howto/argparse-optparse.po +++ b/howto/argparse-optparse.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/argparse.po b/howto/argparse.po index 1b5b0a821..e6ce282a7 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/clinic.po b/howto/clinic.po index b15fd7c41..1654b4724 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/cporting.po b/howto/cporting.po index 8abb639ca..98d7d2f1b 100644 --- a/howto/cporting.po +++ b/howto/cporting.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/curses.po b/howto/curses.po index c4a5f287f..64b5cba44 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-05 16:26+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -110,8 +110,9 @@ msgstr "" #: ../../howto/curses.rst:55 msgid "" -"The Windows version of Python doesn't include the :mod:`curses` module. A " -"ported version called :pypi:`UniCurses` is available." +"The Windows version of Python doesn't include the :mod:`curses` module. The " +"third-party :pypi:`windows-curses` package provides the same interface on " +"Windows." msgstr "" #: ../../howto/curses.rst:60 @@ -459,7 +460,7 @@ msgstr "" msgid "Form" msgstr "形式" -#: ../../howto/curses.rst:277 ../../howto/curses.rst:345 +#: ../../howto/curses.rst:277 ../../howto/curses.rst:348 msgid "Description" msgstr "説明" @@ -515,26 +516,27 @@ msgstr "" msgid "" "The :meth:`~curses.window.addstr` method takes a Python string or bytestring " "as the value to be displayed. The contents of bytestrings are sent to the " -"terminal as-is. Strings are encoded to bytes using the value of the " -"window's :attr:`~window.encoding` attribute; this defaults to the default " -"system encoding as returned by :func:`locale.getencoding`." +"terminal as-is. On a build without wide-character support strings are " +"encoded using the value of the window's :attr:`~window.encoding` attribute; " +"this defaults to the default system encoding as returned by :func:`locale." +"getencoding`." msgstr "" -#: ../../howto/curses.rst:304 +#: ../../howto/curses.rst:306 msgid "" "The :meth:`~curses.window.addch` methods take a character, which can be " "either a string of length 1, a bytestring of length 1, or an integer." msgstr "" -#: ../../howto/curses.rst:307 +#: ../../howto/curses.rst:309 msgid "" -"Constants are provided for extension characters; these constants are " -"integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " -"symbol, and :const:`ACS_ULCORNER` is the upper left corner of a box (handy " -"for drawing borders). You can also use the appropriate Unicode character." +"Constants are provided for the characters of the terminal's alternate " +"character set. For example, :const:`ACS_PLMINUS` is a +/- symbol, and :const:" +"`ACS_ULCORNER` is the upper left corner of a box (handy for drawing " +"borders). You can also use the appropriate Unicode character." msgstr "" -#: ../../howto/curses.rst:313 +#: ../../howto/curses.rst:316 msgid "" "Windows remember where the cursor was left after the last operation, so if " "you leave out the *y,x* coordinates, the string or character will be " @@ -551,21 +553,20 @@ msgstr "" "うにしたいと思うかもしれません; ランダムに見える位置でカーソルが点滅すると面" "を食らってしまいます。" -#: ../../howto/curses.rst:321 +#: ../../howto/curses.rst:324 msgid "" "If your application doesn't need a blinking cursor at all, you can call " -"``curs_set(False)`` to make it invisible. For compatibility with older " -"curses versions, there's a ``leaveok(bool)`` function that's a synonym for :" -"func:`~curses.curs_set`. When *bool* is true, the curses library will " -"attempt to suppress the flashing cursor, and you won't need to worry about " -"leaving it in odd locations." +"``curs_set(False)`` to make it invisible. The window method :meth:`~curses." +"window.leaveok` does something different: when its argument is true, curses " +"leaves the cursor wherever the last update put it, instead of moving it back " +"to the window's cursor position." msgstr "" -#: ../../howto/curses.rst:330 +#: ../../howto/curses.rst:333 msgid "Attributes and Color" msgstr "属性とカラー" -#: ../../howto/curses.rst:332 +#: ../../howto/curses.rst:335 msgid "" "Characters can be displayed in different ways. Status lines in a text-based " "application are commonly shown in reverse video, or a text viewer may need " @@ -573,7 +574,7 @@ msgid "" "an attribute for each cell on the screen." msgstr "" -#: ../../howto/curses.rst:337 +#: ../../howto/curses.rst:340 msgid "" "An attribute is an integer, each bit representing a different attribute. " "You can try to display text with multiple attribute bits set, but curses " @@ -588,59 +589,59 @@ msgstr "" "用している端末の能力に依存しているため、最も安全なのは、最も一般的に利用可能" "な属性を設定する方法です、ここに列挙します。" -#: ../../howto/curses.rst:345 +#: ../../howto/curses.rst:348 msgid "Attribute" msgstr "属性" -#: ../../howto/curses.rst:347 +#: ../../howto/curses.rst:350 msgid ":const:`A_BLINK`" msgstr ":const:`A_BLINK`" -#: ../../howto/curses.rst:347 +#: ../../howto/curses.rst:350 msgid "Blinking text" msgstr "テキストを点滅" -#: ../../howto/curses.rst:349 +#: ../../howto/curses.rst:352 msgid ":const:`A_BOLD`" msgstr ":const:`A_BOLD`" -#: ../../howto/curses.rst:349 +#: ../../howto/curses.rst:352 msgid "Extra bright or bold text" msgstr "高輝度またはボールドテキスト" -#: ../../howto/curses.rst:351 +#: ../../howto/curses.rst:354 msgid ":const:`A_DIM`" msgstr ":const:`A_DIM`" -#: ../../howto/curses.rst:351 +#: ../../howto/curses.rst:354 msgid "Half bright text" msgstr "低輝度テキスト" -#: ../../howto/curses.rst:353 +#: ../../howto/curses.rst:356 msgid ":const:`A_REVERSE`" msgstr ":const:`A_REVERSE`" -#: ../../howto/curses.rst:353 +#: ../../howto/curses.rst:356 msgid "Reverse-video text" msgstr "反転テキスト" -#: ../../howto/curses.rst:355 +#: ../../howto/curses.rst:358 msgid ":const:`A_STANDOUT`" msgstr ":const:`A_STANDOUT`" -#: ../../howto/curses.rst:355 +#: ../../howto/curses.rst:358 msgid "The best highlighting mode available" msgstr "利用できる最良のハイライトモード" -#: ../../howto/curses.rst:357 +#: ../../howto/curses.rst:360 msgid ":const:`A_UNDERLINE`" msgstr ":const:`A_UNDERLINE`" -#: ../../howto/curses.rst:357 +#: ../../howto/curses.rst:360 msgid "Underlined text" msgstr "下線付きテキスト" -#: ../../howto/curses.rst:360 +#: ../../howto/curses.rst:363 msgid "" "So, to display a reverse-video status line on the top line of the screen, " "you could code::" @@ -648,14 +649,14 @@ msgstr "" "つまり、反転するステータスラインを画面の最上部に表示するには、コードをこうし" "ます::" -#: ../../howto/curses.rst:363 +#: ../../howto/curses.rst:366 msgid "" "stdscr.addstr(0, 0, \"Current mode: Typing mode\",\n" " curses.A_REVERSE)\n" "stdscr.refresh()" msgstr "" -#: ../../howto/curses.rst:367 +#: ../../howto/curses.rst:370 msgid "" "The curses library also supports color on those terminals that provide it. " "The most common such terminal is probably the Linux console, followed by " @@ -665,7 +666,7 @@ msgstr "" "す。そんな端末の中で最も一般的なものは Linux コンソールで、color xterm もそれ" "に続きます。" -#: ../../howto/curses.rst:371 +#: ../../howto/curses.rst:374 msgid "" "To use color, you must call the :func:`~curses.start_color` function soon " "after calling :func:`~curses.initscr`, to initialize the default color set " @@ -677,7 +678,7 @@ msgid "" "for the sake of these functions.)" msgstr "" -#: ../../howto/curses.rst:381 +#: ../../howto/curses.rst:384 msgid "" "The curses library maintains a finite number of color pairs, containing a " "foreground (or text) color and a background color. You can get the " @@ -687,17 +688,17 @@ msgid "" "work on all terminals." msgstr "" -#: ../../howto/curses.rst:388 +#: ../../howto/curses.rst:391 msgid "An example, which displays a line of text using color pair 1::" msgstr "例として、テキスト行をカラーペア 1 を使って表示します::" -#: ../../howto/curses.rst:390 +#: ../../howto/curses.rst:393 msgid "" "stdscr.addstr(\"Pretty text\", curses.color_pair(1))\n" "stdscr.refresh()" msgstr "" -#: ../../howto/curses.rst:393 +#: ../../howto/curses.rst:396 msgid "" "As I said before, a color pair consists of a foreground and background " "color. The ``init_pair(n, f, b)`` function changes the definition of color " @@ -705,7 +706,7 @@ msgid "" "hard-wired to white on black, and cannot be changed." msgstr "" -#: ../../howto/curses.rst:398 +#: ../../howto/curses.rst:401 msgid "" "Colors are numbered, and :func:`start_color` initializes 8 basic colors when " "it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" @@ -714,7 +715,7 @@ msgid "" "const:`curses.COLOR_RED`, and so forth." msgstr "" -#: ../../howto/curses.rst:404 +#: ../../howto/curses.rst:407 msgid "" "Let's put all this together. To change color 1 to red text on a white " "background, you would call::" @@ -722,11 +723,11 @@ msgstr "" "やってみましょう。カラー 1 を白背景に赤に変更してみましょう、こうして呼び出し" "ます::" -#: ../../howto/curses.rst:407 +#: ../../howto/curses.rst:410 msgid "curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)" msgstr "" -#: ../../howto/curses.rst:409 +#: ../../howto/curses.rst:412 msgid "" "When you change a color pair, any text already displayed using that color " "pair will change to the new colors. You can also display new text in this " @@ -735,11 +736,11 @@ msgstr "" "カラーペアを変更するときには、既に表示された任意のテキストが利用するカラーペ" "アを新しい色に変更します。新しいテキストをこの色で使うこともできます::" -#: ../../howto/curses.rst:413 +#: ../../howto/curses.rst:416 msgid "stdscr.addstr(0,0, \"RED ALERT!\", curses.color_pair(1))" msgstr "" -#: ../../howto/curses.rst:415 +#: ../../howto/curses.rst:418 msgid "" "Very fancy terminals can change the definitions of the actual colors to a " "given RGB value. This lets you change color 1, which is usually red, to " @@ -751,72 +752,78 @@ msgid "" "your system's man pages for more information." msgstr "" -#: ../../howto/curses.rst:426 +#: ../../howto/curses.rst:429 msgid "User Input" msgstr "ユーザ入力" -#: ../../howto/curses.rst:428 +#: ../../howto/curses.rst:431 msgid "" "The C curses library offers only very simple input mechanisms. Python's :mod:" "`curses` module adds a basic text-input widget. (Other libraries such as :" "pypi:`Urwid` have more extensive collections of widgets.)" msgstr "" -#: ../../howto/curses.rst:432 -msgid "There are two methods for getting input from a window:" -msgstr "ウィンドウから入力を得るための2つのメソッドがあります。" +#: ../../howto/curses.rst:435 +msgid "There are three methods for getting input from a window:" +msgstr "" -#: ../../howto/curses.rst:434 +#: ../../howto/curses.rst:437 msgid "" -":meth:`~curses.window.getch` refreshes the screen and then waits for the " +":meth:`~curses.window.get_wch` refreshes the screen and then waits for the " "user to hit a key, displaying the key if :func:`~curses.echo` has been " "called earlier. You can optionally specify a coordinate to which the cursor " "should be moved before pausing." msgstr "" -#: ../../howto/curses.rst:439 +#: ../../howto/curses.rst:442 msgid "" -":meth:`~curses.window.getkey` does the same thing but converts the integer " -"to a string. Individual characters are returned as 1-character strings, and " -"special keys such as function keys return longer strings containing a key " -"name such as ``KEY_UP`` or ``^G``." +":meth:`~curses.window.getch` does the same thing but returns the code of the " +"key instead of a character. With ncurses this is a single byte of the key's " +"encoding in the current locale, so a character encoded with several bytes " +"takes several calls, one byte per call." msgstr "" -#: ../../howto/curses.rst:444 +#: ../../howto/curses.rst:448 +msgid "" +":meth:`~curses.window.getkey` does the same as :meth:`!getch` but returns a " +"string: an ordinary key as a 1-character string, and a special key as its " +"name, such as ``KEY_UP``." +msgstr "" + +#: ../../howto/curses.rst:453 msgid "" "It's possible to not wait for the user using the :meth:`~curses.window." -"nodelay` window method. After ``nodelay(True)``, :meth:`!getch` and :meth:`!" -"getkey` for the window become non-blocking. To signal that no input is " -"ready, :meth:`!getch` returns ``curses.ERR`` (a value of -1) and :meth:`!" -"getkey` raises an exception. There's also a :func:`~curses.halfdelay` " -"function, which can be used to (in effect) set a timer on each :meth:`!" -"getch`; if no input becomes available within a specified delay (measured in " -"tenths of a second), curses raises an exception." +"nodelay` window method. After ``nodelay(True)``, the reads for the window " +"become non-blocking. To signal that no input is ready, :meth:`!get_wch` and :" +"meth:`!getkey` raise an exception, and :meth:`!getch` returns ``-1``. " +"There's also a :func:`~curses.halfdelay` function, which can be used to (in " +"effect) set a timer on each read; if no input becomes available within a " +"specified delay (measured in tenths of a second), the read fails the same " +"way." msgstr "" -#: ../../howto/curses.rst:454 +#: ../../howto/curses.rst:464 msgid "" -"The :meth:`!getch` method returns an integer; if it's between 0 and 255, it " -"represents the ASCII code of the key pressed. Values greater than 255 are " -"special keys such as Page Up, Home, or the cursor keys. You can compare the " -"value returned to constants such as :const:`curses.KEY_PPAGE`, :const:" -"`curses.KEY_HOME`, or :const:`curses.KEY_LEFT`. The main loop of your " -"program may look something like this::" +"Special keys such as Page Up, Home, or the cursor keys are returned by all " +"three as one of the :ref:`KEY_* constants `, all " +"larger than 255. You can compare the value returned to constants such as :" +"const:`curses.KEY_PPAGE`, :const:`curses.KEY_HOME`, or :const:`curses." +"KEY_LEFT`. The main loop of your program may look something like this::" msgstr "" -#: ../../howto/curses.rst:461 +#: ../../howto/curses.rst:472 msgid "" "while True:\n" -" c = stdscr.getch()\n" -" if c == ord('p'):\n" +" c = stdscr.get_wch()\n" +" if c == 'p':\n" " PrintDocument()\n" -" elif c == ord('q'):\n" +" elif c == 'q':\n" " break # Exit the while loop\n" " elif c == curses.KEY_HOME:\n" " x = y = 0" msgstr "" -#: ../../howto/curses.rst:470 +#: ../../howto/curses.rst:481 msgid "" "The :mod:`curses.ascii` module supplies ASCII class membership functions " "that take either integer or 1-character string arguments; these may be " @@ -826,24 +833,24 @@ msgid "" "returns the control character corresponding to its argument." msgstr "" -#: ../../howto/curses.rst:477 +#: ../../howto/curses.rst:488 msgid "" -"There's also a method to retrieve an entire string, :meth:`~curses.window." +"There's also a method to retrieve an entire line, :meth:`~curses.window." "getstr`. It isn't used very often, because its functionality is quite " -"limited; the only editing keys available are the backspace key and the Enter " -"key, which terminates the string. It can optionally be limited to a fixed " -"number of characters. ::" +"limited; the only editing keys available are the erase and kill characters, " +"and the Enter key, which terminates the line. It returns a bytes object, and " +"can optionally be limited to a fixed number of bytes. ::" msgstr "" -#: ../../howto/curses.rst:483 +#: ../../howto/curses.rst:495 msgid "" "curses.echo() # Enable echoing of characters\n" "\n" -"# Get a 15-character string, with the cursor on the top line\n" +"# Get a line of at most 15 bytes, with the cursor on the top line\n" "s = stdscr.getstr(0,0, 15)" msgstr "" -#: ../../howto/curses.rst:488 +#: ../../howto/curses.rst:500 msgid "" "The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" "like set of keybindings. Various methods of the :class:`~curses.textpad." @@ -851,7 +858,7 @@ msgid "" "results either with or without trailing spaces. Here's an example::" msgstr "" -#: ../../howto/curses.rst:494 +#: ../../howto/curses.rst:506 msgid "" "import curses\n" "from curses.textpad import Textbox, rectangle\n" @@ -872,18 +879,18 @@ msgid "" " message = box.gather()" msgstr "" -#: ../../howto/curses.rst:512 +#: ../../howto/curses.rst:524 msgid "" "See the library documentation on :mod:`curses.textpad` for more details." msgstr "" "さらなる詳細についてはライブラリのドキュメント :mod:`curses.textpad` を参照" "してください。" -#: ../../howto/curses.rst:516 +#: ../../howto/curses.rst:528 msgid "For More Information" msgstr "より多くの情報" -#: ../../howto/curses.rst:518 +#: ../../howto/curses.rst:530 msgid "" "This HOWTO doesn't cover some advanced topics, such as reading the contents " "of the screen or capturing mouse events from an xterm instance, but the " @@ -895,7 +902,7 @@ msgstr "" "Python の :mod:`curses` モジュールのライブラリページはいまやかなり充実してい" "ます。次はこれを見るべきです。" -#: ../../howto/curses.rst:523 +#: ../../howto/curses.rst:535 msgid "" "If you're in doubt about the detailed behavior of the curses functions, " "consult the manual pages for your curses implementation, whether it's " @@ -904,7 +911,7 @@ msgid "" "ref:`ACS_\\* ` characters available to you." msgstr "" -#: ../../howto/curses.rst:530 +#: ../../howto/curses.rst:542 msgid "" "Because the curses API is so large, some functions aren't supported in the " "Python interface. Often this isn't because they're difficult to implement, " @@ -914,22 +921,22 @@ msgid "" "org/>`_ to learn more about submitting patches to Python." msgstr "" -#: ../../howto/curses.rst:538 +#: ../../howto/curses.rst:550 msgid "" "`Writing Programs with NCURSES `_: a lengthy tutorial for C programmers." msgstr "" -#: ../../howto/curses.rst:540 +#: ../../howto/curses.rst:552 msgid "`The ncurses man page `_" msgstr "`The ncurses man page `_" -#: ../../howto/curses.rst:541 +#: ../../howto/curses.rst:553 msgid "" "`The ncurses FAQ `_" msgstr "" -#: ../../howto/curses.rst:542 +#: ../../howto/curses.rst:554 msgid "" "`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " @@ -939,7 +946,7 @@ msgstr "" "v=eN1eZtjLEnU>`_: curses または Urwid を使って端末を制御する PyCon 2013 講演" "ビデオです。" -#: ../../howto/curses.rst:544 +#: ../../howto/curses.rst:556 msgid "" "`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk demonstrating some " diff --git a/howto/descriptor.po b/howto/descriptor.po index 88ac4dc6c..9b397144c 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: souma987, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -74,14 +74,9 @@ msgstr "" msgid "" "The last section has pure Python equivalents for built-in descriptors that " "are written in C. Read this if you're curious about how functions turn into " -"bound methods or about the implementation of common tools like :func:" -"`classmethod`, :func:`staticmethod`, :func:`property`, and :term:`__slots__`." +"bound methods or about the implementation of common tools like :deco:" +"`classmethod`, :deco:`staticmethod`, :deco:`property`, and :term:`__slots__`." msgstr "" -"最後のセクションは、Cで書かれた組み込みのデスクリプタをピュアPythonで実現する" -"方法を紹介します。このセクションがどのように関数が束縛メソッドになるのか、 :" -"func:`classmethod` や :func:`staticmethod`, :func:`property`, :term:" -"`__slots__` といった一般的なツールの実装がどのようになっているのか興味を持っ" -"たら読んでください。" #: ../../howto/descriptor.rst:33 msgid "Primer" @@ -495,14 +490,10 @@ msgstr "" #: ../../howto/descriptor.rst:316 msgid "" "Descriptors are used throughout the language. It is how functions turn into " -"bound methods. Common tools like :func:`classmethod`, :func:" -"`staticmethod`, :func:`property`, and :func:`functools.cached_property` are " +"bound methods. Common tools like :deco:`classmethod`, :deco:" +"`staticmethod`, :deco:`property`, and :deco:`functools.cached_property` are " "all implemented as descriptors." msgstr "" -"デスクリプタは、Pythonのさまざまなところで利用されています。これにより、単な" -"る関数は、インスタンスに束縛されたメソッドになります。 :func:`classmethod`, :" -"func:`staticmethod`, :func:`property`, :func:`functools.cached_property` と" -"いったツールもすべて、デスクリプタとして実装されています。" #: ../../howto/descriptor.rst:323 msgid "Complete Practical Example" @@ -1637,11 +1628,9 @@ msgstr "" #: ../../howto/descriptor.rst:1325 msgid "" -"Using the non-data descriptor protocol, a pure Python version of :func:" +"Using the non-data descriptor protocol, a pure Python version of :deco:" "`staticmethod` would look like this:" msgstr "" -"非データデスクリプタプロトコルを使うと、pure Python 版の :func:" -"`staticmethod` は以下のようになります:" #: ../../howto/descriptor.rst:1328 msgid "" @@ -1744,11 +1733,9 @@ msgstr "" #: ../../howto/descriptor.rst:1465 msgid "" -"Using the non-data descriptor protocol, a pure Python version of :func:" +"Using the non-data descriptor protocol, a pure Python version of :deco:" "`classmethod` would look like this:" msgstr "" -"非データデスクリプタプロトコルを使った、 :func:`classmethod` の pure Python " -"版はこのようになります:" #: ../../howto/descriptor.rst:1468 msgid "" @@ -1887,11 +1874,9 @@ msgstr "" #: ../../howto/descriptor.rst:1604 msgid "" -"5. Blocks tools like :func:`functools.cached_property` which require an " +"5. Blocks tools like :deco:`functools.cached_property` which require an " "instance dictionary to function correctly:" msgstr "" -"5. :func:`functools.cached_property` のような、動作にインスタンス辞書が必要な" -"ツールが使えなくなる。" #: ../../howto/descriptor.rst:1607 msgid "" diff --git a/howto/enum.po b/howto/enum.po index 1715f1edf..52987e866 100644 --- a/howto/enum.po +++ b/howto/enum.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -448,10 +448,8 @@ msgstr "番号付けの値が一意であることの確認" #: ../../howto/enum.rst:258 msgid "" "By default, enumerations allow multiple names as aliases for the same value. " -"When this behavior isn't desired, you can use the :func:`unique` decorator::" +"When this behavior isn't desired, you can use the :deco:`unique` decorator::" msgstr "" -"デフォルトでは、列挙型は同じ値のエイリアスとして複数の名前を許容します。この" -"振る舞いを望まない場合は、 :func:`unique` デコレータを使用できます::" #: ../../howto/enum.rst:261 msgid "" @@ -856,14 +854,11 @@ msgstr "" #: ../../howto/enum.rst:512 msgid "" -"Adding :func:`~dataclasses.dataclass` decorator to :class:`Enum` and its " +"Adding :deco:`~dataclasses.dataclass` decorator to :class:`Enum` and its " "subclasses is not supported. It will not raise any errors, but it will " "produce very strange results at runtime, such as members being equal to each " "other::" msgstr "" -":class:`Enum` やそのサブクラスに :func:`~dataclasses.dataclass` デコレータを" -"加えることはサポートされていません。そうしてもエラーは送出されませんが、実行" -"時にそれぞれのメンバが互いに等しいなど、非常に奇妙な結果が起こります::" #: ../../howto/enum.rst:517 msgid "" diff --git a/howto/free-threading-extensions.po b/howto/free-threading-extensions.po index 6b7d7d318..bd166eb70 100644 --- a/howto/free-threading-extensions.po +++ b/howto/free-threading-extensions.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/free-threading-python.po b/howto/free-threading-python.po index 99c06170f..9b0a61f5d 100644 --- a/howto/free-threading-python.po +++ b/howto/free-threading-python.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/functional.po b/howto/functional.po index 9e55867df..5e142c701 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1262,18 +1262,13 @@ msgstr "" #: ../../howto/functional.rst:723 msgid "" -"It doesn't construct an in-memory list and exhaust all the input iterators " -"before returning; instead tuples are constructed and returned only if " -"they're requested. (The technical term for this behaviour is `lazy " -"evaluation `__.)" +"It doesn't construct an in-memory list and :term:`exhaust ` all " +"the input iterators before returning; instead tuples are constructed and " +"returned only if they're requested. (The technical term for this behaviour " +"is `lazy evaluation `__.)" msgstr "" -":func:`zip` は結果を返す前に入力のイテレーターを全て消費してメモリ上に list " -"を作成しません。代わりに要求されるたびに tuple を生成して返します。(この動作" -"を技術的な用語で `lazy evaluation `__ (訳: `遅延評価 `__) と呼びます。)" -#: ../../howto/functional.rst:728 +#: ../../howto/functional.rst:729 msgid "" "This iterator is intended to be used with iterables that are all of the same " "length. If the iterables are of different lengths, the resulting stream " @@ -1283,13 +1278,13 @@ msgstr "" "違っていれば、出力されるストリームは一番短いイテラブルと同じ長さになりま" "す。 ::" -#: ../../howto/functional.rst:732 +#: ../../howto/functional.rst:733 msgid "" "zip(['a', 'b'], (1, 2, 3)) =>\n" " ('a', 1), ('b', 2)" msgstr "" -#: ../../howto/functional.rst:735 +#: ../../howto/functional.rst:736 msgid "" "You should avoid doing this, though, because an element may be taken from " "the longer iterators and discarded. This means you can't go on to use the " @@ -1300,11 +1295,11 @@ msgstr "" "素を抜かしてしまう危険があるので、もうそのイテレータはそれ以上使えなくなって" "しまいます。" -#: ../../howto/functional.rst:741 +#: ../../howto/functional.rst:742 msgid "The itertools module" msgstr "itertools モジュール" -#: ../../howto/functional.rst:743 +#: ../../howto/functional.rst:744 msgid "" "The :mod:`itertools` module contains a number of commonly used iterators as " "well as functions for combining several iterators. This section will " @@ -1314,31 +1309,31 @@ msgstr "" "使う関数がたくさん含まれています。この章では、そのモジュールの内容を小さな例" "で紹介していきたいと思います。" -#: ../../howto/functional.rst:747 +#: ../../howto/functional.rst:748 msgid "The module's functions fall into a few broad classes:" msgstr "このモジュールの関数を大まかに分けるとこうなります:" -#: ../../howto/functional.rst:749 +#: ../../howto/functional.rst:750 msgid "Functions that create a new iterator based on an existing iterator." msgstr "既存のイテレータに基づいて新しいイテレータを作る関数。" -#: ../../howto/functional.rst:750 +#: ../../howto/functional.rst:751 msgid "Functions for treating an iterator's elements as function arguments." msgstr "イテレータの要素を引数として扱う関数。" -#: ../../howto/functional.rst:751 +#: ../../howto/functional.rst:752 msgid "Functions for selecting portions of an iterator's output." msgstr "イテレータの出力から一部を取り出す関数。" -#: ../../howto/functional.rst:752 +#: ../../howto/functional.rst:753 msgid "A function for grouping an iterator's output." msgstr "イテレータの出力をグループ分けする関数。" -#: ../../howto/functional.rst:755 +#: ../../howto/functional.rst:756 msgid "Creating new iterators" msgstr "新しいイテレータを作る" -#: ../../howto/functional.rst:757 +#: ../../howto/functional.rst:758 msgid "" ":func:`itertools.count(start, step) ` returns an infinite " "stream of evenly spaced values. You can optionally supply the starting " @@ -1350,7 +1345,7 @@ msgstr "" "オプションで開始する数 (デフォルトは 0) や数どうしの間隔 (デフォルトは 1) を" "与えられます::" -#: ../../howto/functional.rst:761 +#: ../../howto/functional.rst:762 msgid "" "itertools.count() =>\n" " 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...\n" @@ -1360,7 +1355,7 @@ msgid "" " 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, ..." msgstr "" -#: ../../howto/functional.rst:768 +#: ../../howto/functional.rst:769 msgid "" ":func:`itertools.cycle(iter) ` saves a copy of the contents " "of a provided iterable and returns a new iterator that returns its elements " @@ -1371,13 +1366,13 @@ msgstr "" "をコピーして、 その要素を最初から最後まで無限に繰り返していくイテレータを返し" "ます。 ::" -#: ../../howto/functional.rst:772 +#: ../../howto/functional.rst:773 msgid "" "itertools.cycle([1, 2, 3, 4, 5]) =>\n" " 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, ..." msgstr "" -#: ../../howto/functional.rst:775 +#: ../../howto/functional.rst:776 msgid "" ":func:`itertools.repeat(elem, [n]) ` returns the provided " "element *n* times, or returns the element endlessly if *n* is not " @@ -1386,7 +1381,7 @@ msgstr "" ":func:`itertools.repeat(elem, [n]) ` は、与えられた要素を " "*n* 回返しますが、 *n* がなければ永遠に返し続けます。 ::" -#: ../../howto/functional.rst:778 +#: ../../howto/functional.rst:779 msgid "" "itertools.repeat('abc') =>\n" " abc, abc, abc, abc, abc, abc, abc, abc, abc, abc, ...\n" @@ -1394,24 +1389,21 @@ msgid "" " abc, abc, abc, abc, abc" msgstr "" -#: ../../howto/functional.rst:783 +#: ../../howto/functional.rst:784 msgid "" ":func:`itertools.chain(iterA, iterB, ...) ` takes an " "arbitrary number of iterables as input, and returns all the elements of the " "first iterator, then all the elements of the second, and so on, until all of " -"the iterables have been exhausted. ::" +"the iterables have been :term:`exhausted`. ::" msgstr "" -":func:`itertools.chain(iterA, iterB, ...) ` は任意の数のイテ" -"ラブルを受け取って、最初のイテレータから要素をすべて返し、次に二番目から 要素" -"をすべて返し、ということを要素がなくなるまで続けます。 ::" -#: ../../howto/functional.rst:788 +#: ../../howto/functional.rst:789 msgid "" "itertools.chain(['a', 'b', 'c'], (1, 2, 3)) =>\n" " a, b, c, 1, 2, 3" msgstr "" -#: ../../howto/functional.rst:791 +#: ../../howto/functional.rst:792 msgid "" ":func:`itertools.islice(iter, [start], stop, [step]) ` " "returns a stream that's a slice of the iterator. With a single *stop* " @@ -1428,7 +1420,7 @@ msgstr "" "トのスライスとは違って、マイナスの値は *start*, *stop*, *step* に使えませ" "ん。 ::" -#: ../../howto/functional.rst:798 +#: ../../howto/functional.rst:799 msgid "" "itertools.islice(range(10), 8) =>\n" " 0, 1, 2, 3, 4, 5, 6, 7\n" @@ -1438,7 +1430,7 @@ msgid "" " 2, 4, 6" msgstr "" -#: ../../howto/functional.rst:805 +#: ../../howto/functional.rst:806 msgid "" ":func:`itertools.tee(iter, [n]) ` replicates an iterator; it " "returns *n* independent iterators that will all return the contents of the " @@ -1454,7 +1446,7 @@ msgstr "" "たうちの一つが他よりも進んでいってしまうと、大量のメモリを消費することがあり" "ます。 ::" -#: ../../howto/functional.rst:813 +#: ../../howto/functional.rst:814 msgid "" "itertools.tee( itertools.count() ) =>\n" " iterA, iterB\n" @@ -1466,11 +1458,11 @@ msgid "" " 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ..." msgstr "" -#: ../../howto/functional.rst:824 +#: ../../howto/functional.rst:825 msgid "Calling functions on elements" msgstr "要素に対して関数を呼ぶ" -#: ../../howto/functional.rst:826 +#: ../../howto/functional.rst:827 msgid "" "The :mod:`operator` module contains a set of functions corresponding to " "Python's operators. Some examples are :func:`operator.add(a, b) ` (``.id`` 属" "性を取得するコーラブルを返す) といった関数です。" -#: ../../howto/functional.rst:832 +#: ../../howto/functional.rst:833 msgid "" ":func:`itertools.starmap(func, iter) ` assumes that the " "iterable will return a stream of tuples, and calls *func* using these tuples " @@ -1494,7 +1486,7 @@ msgstr "" "プルのストリームを返すとみなして、 そのタプルを引数に使って *func* を呼びま" "す::" -#: ../../howto/functional.rst:836 +#: ../../howto/functional.rst:837 msgid "" "itertools.starmap(os.path.join,\n" " [('/bin', 'python'), ('/usr', 'bin', 'java'),\n" @@ -1503,11 +1495,11 @@ msgid "" " /bin/python, /usr/bin/java, /usr/bin/perl, /usr/bin/ruby" msgstr "" -#: ../../howto/functional.rst:844 +#: ../../howto/functional.rst:845 msgid "Selecting elements" msgstr "要素を選択する" -#: ../../howto/functional.rst:846 +#: ../../howto/functional.rst:847 msgid "" "Another group of functions chooses a subset of an iterator's elements based " "on a predicate." @@ -1515,7 +1507,7 @@ msgstr "" "さらに別のグループとして、述語 (predicate) に基づいてイテレータの要素からサブ" "セットを選び出す関数があります。" -#: ../../howto/functional.rst:849 +#: ../../howto/functional.rst:850 msgid "" ":func:`itertools.filterfalse(predicate, iter) ` is " "the opposite of :func:`filter`, returning all elements for which the " @@ -1524,13 +1516,13 @@ msgstr "" ":func:`itertools.filterfalse(predicate, iter) ` は :" "func:`filter` とは反対に、 述語が偽を返す要素をすべて返します::" -#: ../../howto/functional.rst:853 +#: ../../howto/functional.rst:854 msgid "" "itertools.filterfalse(is_even, itertools.count()) =>\n" " 1, 3, 5, 7, 9, 11, 13, 15, ..." msgstr "" -#: ../../howto/functional.rst:856 +#: ../../howto/functional.rst:857 msgid "" ":func:`itertools.takewhile(predicate, iter) ` returns " "elements for as long as the predicate returns true. Once the predicate " @@ -1540,7 +1532,7 @@ msgstr "" "を返している間だけ要素を返します。一度でも述語が偽を返すと、イテレータは出力" "終了の合図をします。 ::" -#: ../../howto/functional.rst:860 +#: ../../howto/functional.rst:861 msgid "" "def less_than_10(x):\n" " return x < 10\n" @@ -1552,7 +1544,7 @@ msgid "" " 0" msgstr "" -#: ../../howto/functional.rst:869 +#: ../../howto/functional.rst:870 msgid "" ":func:`itertools.dropwhile(predicate, iter) ` discards " "elements while the predicate returns true, and then returns the rest of the " @@ -1562,7 +1554,7 @@ msgstr "" "真を返しているうちは要素を無視し、偽になってから残りの出力をすべて返しま" "す。 ::" -#: ../../howto/functional.rst:873 +#: ../../howto/functional.rst:874 msgid "" "itertools.dropwhile(less_than_10, itertools.count()) =>\n" " 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ...\n" @@ -1571,28 +1563,25 @@ msgid "" " 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ..." msgstr "" -#: ../../howto/functional.rst:879 +#: ../../howto/functional.rst:880 msgid "" ":func:`itertools.compress(data, selectors) ` takes two " "iterators and returns only those elements of *data* for which the " "corresponding element of *selectors* is true, stopping whenever either one " -"is exhausted::" +"is :term:`exhausted`::" msgstr "" -":func:`itertools.compress(data, selectors) ` は 2つのイテ" -"レータを取り、 どちらかのイテレータを使い果たすまでの、 *selectors* が真とな" -"る要素に対応する *data* 要素だけを返します::" -#: ../../howto/functional.rst:883 +#: ../../howto/functional.rst:884 msgid "" "itertools.compress([1, 2, 3, 4, 5], [True, True, False, False, True]) =>\n" " 1, 2, 5" msgstr "" -#: ../../howto/functional.rst:888 +#: ../../howto/functional.rst:889 msgid "Combinatoric functions" msgstr "組合せ関数" -#: ../../howto/functional.rst:890 +#: ../../howto/functional.rst:891 msgid "" "The :func:`itertools.combinations(iterable, r) ` " "returns an iterator giving all possible *r*-tuple combinations of the " @@ -1602,7 +1591,7 @@ msgstr "" "*iterable* から *r*-tuple 選択する全ての組み合わせを提供するイテレータを返し" "ます ::" -#: ../../howto/functional.rst:894 +#: ../../howto/functional.rst:895 msgid "" "itertools.combinations([1, 2, 3, 4, 5], 2) =>\n" " (1, 2), (1, 3), (1, 4), (1, 5),\n" @@ -1616,7 +1605,7 @@ msgid "" " (3, 4, 5)" msgstr "" -#: ../../howto/functional.rst:905 +#: ../../howto/functional.rst:906 msgid "" "The elements within each tuple remain in the same order as *iterable* " "returned them. For example, the number 1 is always before 2, 3, 4, or 5 in " @@ -1630,7 +1619,7 @@ msgstr "" "permutations>` があり、こちらはこの順序についての制約がなく、 *r* 個選択する" "全ての順列を返します。" -#: ../../howto/functional.rst:912 +#: ../../howto/functional.rst:913 msgid "" "itertools.permutations([1, 2, 3, 4, 5], 2) =>\n" " (1, 2), (1, 3), (1, 4), (1, 5),\n" @@ -1645,7 +1634,7 @@ msgid "" " (5, 4, 3, 2, 1)" msgstr "" -#: ../../howto/functional.rst:924 +#: ../../howto/functional.rst:925 msgid "" "If you don't supply a value for *r* the length of the iterable is used, " "meaning that all the elements are permuted." @@ -1653,7 +1642,7 @@ msgstr "" "*r* を与えない場合は iterable の長さが使われます。つまり iterable の全ての要" "素を選んだ順列を返します。" -#: ../../howto/functional.rst:927 +#: ../../howto/functional.rst:928 msgid "" "Note that these functions produce all of the possible combinations by " "position and don't require that the contents of *iterable* are unique::" @@ -1661,14 +1650,14 @@ msgstr "" "これらの関数が生成する組み合わせは、位置が基準ですので、 *iterable* の内容が" "一意でなくとも良いことに注目してください::" -#: ../../howto/functional.rst:930 +#: ../../howto/functional.rst:931 msgid "" "itertools.permutations('aba', 3) =>\n" " ('a', 'b', 'a'), ('a', 'a', 'b'), ('b', 'a', 'a'),\n" " ('b', 'a', 'a'), ('a', 'a', 'b'), ('a', 'b', 'a')" msgstr "" -#: ../../howto/functional.rst:934 +#: ../../howto/functional.rst:935 msgid "" "The identical tuple ``('a', 'a', 'b')`` occurs twice, but the two 'a' " "strings came from different positions." @@ -1676,7 +1665,7 @@ msgstr "" "全く同じタプル ``('a', 'a', 'b')`` が 2度現れていますが、これは 2つの 'a' が" "別の位置からのものだからです。" -#: ../../howto/functional.rst:937 +#: ../../howto/functional.rst:938 msgid "" "The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " @@ -1689,7 +1678,7 @@ msgstr "" "じ要素を繰り返し選んでも良い。概念的には、それぞれのタプルの最初のものとして" "一つ要素が選ばれ、続いて 2つ目の選択のかわりにそれで置き換わります ::" -#: ../../howto/functional.rst:943 +#: ../../howto/functional.rst:944 msgid "" "itertools.combinations_with_replacement([1, 2, 3, 4, 5], 2) =>\n" " (1, 1), (1, 2), (1, 3), (1, 4), (1, 5),\n" @@ -1699,11 +1688,11 @@ msgid "" " (5, 5)" msgstr "" -#: ../../howto/functional.rst:952 +#: ../../howto/functional.rst:953 msgid "Grouping elements" msgstr "要素をグループ分けする" -#: ../../howto/functional.rst:954 +#: ../../howto/functional.rst:955 msgid "" "The last function I'll discuss, :func:`itertools.groupby(iter, " "key_func=None) `, is the most complicated. " @@ -1716,7 +1705,7 @@ msgstr "" "テラブルから返ってきた要素それぞれのキー値を計算する関数です。この関数が指定" "されていなければ、 キーは単に各要素そのものになります。" -#: ../../howto/functional.rst:959 +#: ../../howto/functional.rst:960 msgid "" ":func:`~itertools.groupby` collects all the consecutive elements from the " "underlying iterable that have the same key value, and returns a stream of 2-" @@ -1726,7 +1715,7 @@ msgstr "" "要素を集めて、キー値とそのキーに対応する要素のイテレータの 2-タプルのストリー" "ムを返します。" -#: ../../howto/functional.rst:965 +#: ../../howto/functional.rst:966 msgid "" "city_list = [('Decatur', 'AL'), ('Huntsville', 'AL'), ('Selma', 'AL'),\n" " ('Anchorage', 'AK'), ('Nome', 'AK'),\n" @@ -1751,7 +1740,7 @@ msgid "" " ('Flagstaff', 'AZ'), ('Phoenix', 'AZ'), ('Tucson', 'AZ')" msgstr "" -#: ../../howto/functional.rst:987 +#: ../../howto/functional.rst:988 msgid "" ":func:`~itertools.groupby` assumes that the underlying iterable's contents " "will already be sorted based on the key. Note that the returned iterators " @@ -1763,11 +1752,11 @@ msgstr "" "テラブルを使うということに注意してください。そのため、 iterator-1 の結果を読" "み終わるまでは iterator-2 とそれに対応するキー値を要求することはできません。" -#: ../../howto/functional.rst:994 +#: ../../howto/functional.rst:995 msgid "The functools module" msgstr "functools モジュール" -#: ../../howto/functional.rst:996 +#: ../../howto/functional.rst:997 msgid "" "The :mod:`functools` module contains some higher-order functions. A **higher-" "order function** takes one or more functions as input and returns a new " @@ -1778,7 +1767,7 @@ msgstr "" "** とは、入力として関数を受け取って新たな関数を返す関数です。このモジュールで" "一番便利なツールは :func:`functools.partial` 関数です。" -#: ../../howto/functional.rst:1001 +#: ../../howto/functional.rst:1002 msgid "" "For programs written in a functional style, you'll sometimes want to " "construct variants of existing functions that have some of the parameters " @@ -1793,7 +1782,7 @@ msgstr "" "なることがあります; つまり ``f()`` のパラメータを一つ埋めるわけです。これは" "「関数の部分適用」と呼ばれています。" -#: ../../howto/functional.rst:1007 +#: ../../howto/functional.rst:1008 msgid "" "The constructor for :func:`~functools.partial` takes the arguments " "``(function, arg1, arg2, ..., kwarg1=value1, kwarg2=value2)``. The " @@ -1805,11 +1794,11 @@ msgstr "" "トはコーラブルなので、それを呼べば、引数の埋まった状態で ``function`` を実行" "したのと同じことになります。" -#: ../../howto/functional.rst:1012 +#: ../../howto/functional.rst:1013 msgid "Here's a small but realistic example::" msgstr "以下にあるのは、小さいけれども現実的な一つの例です::" -#: ../../howto/functional.rst:1014 +#: ../../howto/functional.rst:1015 msgid "" "import functools\n" "\n" @@ -1822,7 +1811,7 @@ msgid "" "server_log('Unable to open socket')" msgstr "" -#: ../../howto/functional.rst:1024 +#: ../../howto/functional.rst:1025 msgid "" ":func:`functools.reduce(func, iter, [initial_value]) ` " "cumulatively performs an operation on all the iterable's elements and, " @@ -1831,22 +1820,13 @@ msgid "" "reduce` takes the first two elements A and B returned by the iterator and " "calculates ``func(A, B)``. It then requests the third element, C, " "calculates ``func(func(A, B), C)``, combines this result with the fourth " -"element returned, and continues until the iterable is exhausted. If the " -"iterable returns no values at all, a :exc:`TypeError` exception is raised. " -"If the initial value is supplied, it's used as a starting point and " +"element returned, and continues until the iterable is :term:`exhausted`. If " +"the iterable returns no values at all, a :exc:`TypeError` exception is " +"raised. If the initial value is supplied, it's used as a starting point and " "``func(initial_value, A)`` is the first calculation. ::" msgstr "" -":func:`functools.reduce(func, iter, [initial_value]) ` はイ" -"テラブルの要素に対して次々に演算を実行していった最終結果を出すもので、それゆ" -"え無限長イテラブルには適用できません。 *func* には、要素を二つ取って値を一つ" -"返す関数が入ります。 :func:`functools.reduce` はイテレータが返す最初の二要素 " -"A と B を取って ``func(A, B)`` を計算します。それから三番目の要素 C を要求し" -"て ``func(func(A, B), C)`` を計算すると、その結果をさらに四番目の要素と組み合" -"わせて……ということをイテラブルが尽きるまで続けるのです。 もしイテラブルが一つ" -"も値を返さなければ :exc:`TypeError` が発生します。 初期値 ``initial_value`` " -"があるときには、最初の計算で ``func(initial_value, A)`` が実行されます。 ::" -#: ../../howto/functional.rst:1036 +#: ../../howto/functional.rst:1037 msgid "" ">>> import operator, functools\n" ">>> functools.reduce(operator.concat, ['A', 'BB', 'C'])\n" @@ -1861,7 +1841,7 @@ msgid "" "1" msgstr "" -#: ../../howto/functional.rst:1048 +#: ../../howto/functional.rst:1049 msgid "" "If you use :func:`operator.add` with :func:`functools.reduce`, you'll add up " "all the elements of the iterable. This case is so common that there's a " @@ -1871,7 +1851,7 @@ msgstr "" "を合計することになります。これは使用頻度が高いので、そのための :func:`sum` と" "いうビルトイン関数があります:" -#: ../../howto/functional.rst:1060 +#: ../../howto/functional.rst:1061 msgid "" "For many uses of :func:`functools.reduce`, though, it can be clearer to just " "write the obvious :keyword:`for` loop::" @@ -1879,7 +1859,7 @@ msgstr "" "とはいえ、多くの場合 :func:`functools.reduce` を使うよりは、単に :keyword:" "`for` ループを書いたほうがわかりやすくなります::" -#: ../../howto/functional.rst:1063 +#: ../../howto/functional.rst:1064 msgid "" "import functools\n" "# Instead of:\n" @@ -1891,7 +1871,7 @@ msgid "" " product *= i" msgstr "" -#: ../../howto/functional.rst:1072 +#: ../../howto/functional.rst:1073 msgid "" "A related function is :func:`itertools.accumulate(iterable, func=operator." "add) `. It performs the same calculation, but instead " @@ -1903,7 +1883,7 @@ msgstr "" "ではなく、 :func:`~itertools.accumulate` はそれぞれの中間結果を生成するイテ" "レータが返り値となります。" -#: ../../howto/functional.rst:1077 +#: ../../howto/functional.rst:1078 msgid "" "itertools.accumulate([1, 2, 3, 4, 5]) =>\n" " 1, 3, 6, 10, 15\n" @@ -1912,11 +1892,11 @@ msgid "" " 1, 2, 6, 24, 120" msgstr "" -#: ../../howto/functional.rst:1085 +#: ../../howto/functional.rst:1086 msgid "The operator module" msgstr "operator モジュール" -#: ../../howto/functional.rst:1087 +#: ../../howto/functional.rst:1088 msgid "" "The :mod:`operator` module was mentioned earlier. It contains a set of " "functions corresponding to Python's operators. These functions are often " @@ -1927,43 +1907,43 @@ msgstr "" "関数が入っているモジュールです。関数型スタイルのコードにおいて、演算を一つ実" "行するだけのくだらない関数を書かずに済むので、よく世話になります。" -#: ../../howto/functional.rst:1092 +#: ../../howto/functional.rst:1093 msgid "Some of the functions in this module are:" msgstr "このモジュールの関数を一部だけ紹介しましょう:" -#: ../../howto/functional.rst:1094 +#: ../../howto/functional.rst:1095 msgid "" "Math operations: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, " "``abs()``, ..." msgstr "" "数学演算子: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, ``abs()``, ..." -#: ../../howto/functional.rst:1095 +#: ../../howto/functional.rst:1096 msgid "Logical operations: ``not_()``, ``truth()``." msgstr "論理演算子: ``not_()``, ``truth()``" -#: ../../howto/functional.rst:1096 +#: ../../howto/functional.rst:1097 msgid "Bitwise operations: ``and_()``, ``or_()``, ``invert()``." msgstr "ビット演算子: ``and_()``, ``or_()``, ``invert()``" -#: ../../howto/functional.rst:1097 +#: ../../howto/functional.rst:1098 msgid "" "Comparisons: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, and ``ge()``." msgstr "比較: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, ``ge()``" -#: ../../howto/functional.rst:1098 +#: ../../howto/functional.rst:1099 msgid "Object identity: ``is_()``, ``is_not()``." msgstr "オブジェクト識別: ``is_()``, ``is_not()``" -#: ../../howto/functional.rst:1100 +#: ../../howto/functional.rst:1101 msgid "Consult the operator module's documentation for a complete list." msgstr "ちゃんとした一覧は operator モジュールの文書でご覧ください。" -#: ../../howto/functional.rst:1104 +#: ../../howto/functional.rst:1105 msgid "Small functions and the lambda expression" msgstr "小さな関数とラムダ式" -#: ../../howto/functional.rst:1106 +#: ../../howto/functional.rst:1107 msgid "" "When writing functional-style programs, you'll often need little functions " "that act as predicates or that combine elements in some way." @@ -1971,7 +1951,7 @@ msgstr "" "関数型スタイルのプログラムを書いていると、述語として働いたり、何らかの形で要" "素をつなぎ合わせたりするミニサイズの関数を必要とすることがよくあります。" -#: ../../howto/functional.rst:1109 +#: ../../howto/functional.rst:1110 msgid "" "If there's a Python built-in or a module function that's suitable, you don't " "need to define a new function at all::" @@ -1979,13 +1959,13 @@ msgstr "" "ちょうど良い関数がビルトインやモジュールで存在していれば、新しい関数を定義す" "る必要はまったくありません::" -#: ../../howto/functional.rst:1112 +#: ../../howto/functional.rst:1113 msgid "" "stripped_lines = [line.strip() for line in lines]\n" "existing_files = filter(os.path.exists, file_list)" msgstr "" -#: ../../howto/functional.rst:1115 +#: ../../howto/functional.rst:1116 msgid "" "If the function you need doesn't exist, you need to write it. One way to " "write small functions is to use the :keyword:`lambda` expression. " @@ -1997,20 +1977,20 @@ msgstr "" "の 一つが :keyword:`lambda` 式です。 ``lambda`` は引数として複数のパラメータ" "と それをつなぐ式を取り、その式の値を返す無名の関数を作ります::" -#: ../../howto/functional.rst:1120 +#: ../../howto/functional.rst:1121 msgid "" "adder = lambda x, y: x+y\n" "\n" "print_assign = lambda name, value: name + '=' + str(value)" msgstr "" -#: ../../howto/functional.rst:1124 +#: ../../howto/functional.rst:1125 msgid "" "An alternative is to just use the ``def`` statement and define a function in " "the usual way::" msgstr "もう一つの選択肢は、ふつうに ``def`` 文で関数を定義するだけです::" -#: ../../howto/functional.rst:1127 +#: ../../howto/functional.rst:1128 msgid "" "def adder(x, y):\n" " return x + y\n" @@ -2019,7 +1999,7 @@ msgid "" " return name + '=' + str(value)" msgstr "" -#: ../../howto/functional.rst:1133 +#: ../../howto/functional.rst:1134 msgid "" "Which alternative is preferable? That's a style question; my usual course " "is to avoid using ``lambda``." @@ -2027,7 +2007,7 @@ msgstr "" "どちらのほうが良いのでしょうか。それは好みの問題です; 著者のスタイルとしては" "できるだけ ``lambda`` を使わないようにしています。" -#: ../../howto/functional.rst:1136 +#: ../../howto/functional.rst:1137 msgid "" "One reason for my preference is that ``lambda`` is quite limited in the " "functions it can define. The result has to be computable as a single " @@ -2043,13 +2023,13 @@ msgstr "" "ちゃして読みにくい式になってしまいます。さて、次のコードは何をしているでしょ" "うか、素早くお答えください! ::" -#: ../../howto/functional.rst:1143 +#: ../../howto/functional.rst:1144 msgid "" "import functools\n" "total = functools.reduce(lambda a, b: (0, a[1] + b[1]), items)[1]" msgstr "" -#: ../../howto/functional.rst:1146 +#: ../../howto/functional.rst:1147 msgid "" "You can figure it out, but it takes time to disentangle the expression to " "figure out what's going on. Using a short nested ``def`` statements makes " @@ -2058,7 +2038,7 @@ msgstr "" "わかるにはわかるでしょうが、何がどうなっているのか紐解いていくには時間がかか" "るはずです。短い ``def`` 文で入れ子にすると、少し見通しが良くなりますが::" -#: ../../howto/functional.rst:1150 +#: ../../howto/functional.rst:1151 msgid "" "import functools\n" "def combine(a, b):\n" @@ -2067,26 +2047,26 @@ msgid "" "total = functools.reduce(combine, items)[1]" msgstr "" -#: ../../howto/functional.rst:1156 +#: ../../howto/functional.rst:1157 msgid "But it would be best of all if I had simply used a ``for`` loop::" msgstr "でも単純に ``for`` ループにすれば良かったのです::" -#: ../../howto/functional.rst:1158 +#: ../../howto/functional.rst:1159 msgid "" "total = 0\n" "for a, b in items:\n" " total += b" msgstr "" -#: ../../howto/functional.rst:1162 +#: ../../howto/functional.rst:1163 msgid "Or the :func:`sum` built-in and a generator expression::" msgstr "あるいは :func:`sum` ビルトインとジェネレータ式でも良いですね::" -#: ../../howto/functional.rst:1164 +#: ../../howto/functional.rst:1165 msgid "total = sum(b for a, b in items)" msgstr "" -#: ../../howto/functional.rst:1166 +#: ../../howto/functional.rst:1167 msgid "" "Many uses of :func:`functools.reduce` are clearer when written as ``for`` " "loops." @@ -2094,7 +2074,7 @@ msgstr "" "多くの場合、 :func:`functools.reduce` を使っているところは ``for`` ループに " "書き直したほうが見やすいです。" -#: ../../howto/functional.rst:1168 +#: ../../howto/functional.rst:1169 msgid "" "Fredrik Lundh once suggested the following set of rules for refactoring uses " "of ``lambda``:" @@ -2102,29 +2082,29 @@ msgstr "" "Fredrik Lundh は以前 ``lambda`` 利用のリファクタリングに関して以下の指針を提" "案したことがあります:" -#: ../../howto/functional.rst:1171 +#: ../../howto/functional.rst:1172 msgid "Write a lambda function." msgstr "ラムダ関数を書く。" -#: ../../howto/functional.rst:1172 +#: ../../howto/functional.rst:1173 msgid "Write a comment explaining what the heck that lambda does." msgstr "そのラムダが一体ぜんたい何をしているのかコメントで説明する。" -#: ../../howto/functional.rst:1173 +#: ../../howto/functional.rst:1174 msgid "" "Study the comment for a while, and think of a name that captures the essence " "of the comment." msgstr "そのコメントをしばらく研究して、本質をとらえた名前を考える。" -#: ../../howto/functional.rst:1175 +#: ../../howto/functional.rst:1176 msgid "Convert the lambda to a def statement, using that name." msgstr "ラムダをその名前で def 文に書き換える。" -#: ../../howto/functional.rst:1176 +#: ../../howto/functional.rst:1177 msgid "Remove the comment." msgstr "コメントを消す。" -#: ../../howto/functional.rst:1178 +#: ../../howto/functional.rst:1179 msgid "" "I really like these rules, but you're free to disagree about whether this " "lambda-free style is better." @@ -2132,11 +2112,11 @@ msgstr "" "著者はこの指針を本当に気に入っていますが、こうしたラムダなしスタイルが他より" "優れているかどうかについて、異論は認めます。" -#: ../../howto/functional.rst:1183 +#: ../../howto/functional.rst:1184 msgid "Revision History and Acknowledgements" msgstr "更新履歴と謝辞" -#: ../../howto/functional.rst:1185 +#: ../../howto/functional.rst:1186 msgid "" "This HOWTO was originally written by A. M. Kuchling. The author would like " "to thank the following people for offering suggestions, corrections and " @@ -2145,15 +2125,15 @@ msgid "" "Jussi Salmela, Collin Winter, Blake Winton." msgstr "" -#: ../../howto/functional.rst:1191 +#: ../../howto/functional.rst:1192 msgid "Version 0.1: posted June 30 2006." msgstr "Version 0.1: posted June 30 2006." -#: ../../howto/functional.rst:1193 +#: ../../howto/functional.rst:1194 msgid "Version 0.11: posted July 1 2006. Typo fixes." msgstr "Version 0.11: posted July 1 2006. Typo fixes." -#: ../../howto/functional.rst:1195 +#: ../../howto/functional.rst:1196 msgid "" "Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " "one. Typo fixes." @@ -2161,13 +2141,13 @@ msgstr "" "Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " "one. Typo fixes." -#: ../../howto/functional.rst:1198 +#: ../../howto/functional.rst:1199 msgid "" "Version 0.21: Added more references suggested on the tutor mailing list." msgstr "" "Version 0.21: Added more references suggested on the tutor mailing list." -#: ../../howto/functional.rst:1200 +#: ../../howto/functional.rst:1201 msgid "" "Version 0.30: Adds a section on the ``functional`` module written by Collin " "Winter; adds short section on the operator module; a few other edits." @@ -2175,15 +2155,15 @@ msgstr "" "Version 0.30: Adds a section on the ``functional`` module written by Collin " "Winter; adds short section on the operator module; a few other edits." -#: ../../howto/functional.rst:1205 +#: ../../howto/functional.rst:1206 msgid "References" msgstr "参考資料" -#: ../../howto/functional.rst:1208 +#: ../../howto/functional.rst:1209 msgid "General" msgstr "一般論" -#: ../../howto/functional.rst:1210 +#: ../../howto/functional.rst:1211 msgid "" "**Structure and Interpretation of Computer Programs**, by Harold Abelson and " "Gerald Jay Sussman with Julie Sussman. The book can be found at https://" @@ -2200,14 +2180,14 @@ msgstr "" "使っていますが、これらの章で説明されている設計アプローチの多くは、関数型スタ" "イルの Python コードにも適用できます。" -#: ../../howto/functional.rst:1218 +#: ../../howto/functional.rst:1219 msgid "" "https://defmacro.org/2006/06/19/fp.html: A general introduction to " "functional programming that uses Java examples and has a lengthy historical " "introduction." msgstr "" -#: ../../howto/functional.rst:1221 +#: ../../howto/functional.rst:1222 msgid "" "https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia " "entry describing functional programming." @@ -2215,11 +2195,11 @@ msgstr "" "https://en.wikipedia.org/wiki/Functional_programming: 関数プログラミングに関" "する一般的な内容の記事。" -#: ../../howto/functional.rst:1224 +#: ../../howto/functional.rst:1225 msgid "https://en.wikipedia.org/wiki/Coroutine: Entry for coroutines." msgstr "https://en.wikipedia.org/wiki/Coroutine: コルーチンに関する記事。" -#: ../../howto/functional.rst:1226 +#: ../../howto/functional.rst:1227 msgid "" "https://en.wikipedia.org/wiki/Partial_application: Entry for the concept of " "partial function application." @@ -2227,16 +2207,16 @@ msgstr "" "https://en.wikipedia.org/wiki/Partial_application: 関数の部分適用の概念につい" "ての記事。" -#: ../../howto/functional.rst:1228 +#: ../../howto/functional.rst:1229 msgid "" "https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying." msgstr "https://en.wikipedia.org/wiki/Currying: カリー化の概念に関する記事。" -#: ../../howto/functional.rst:1231 +#: ../../howto/functional.rst:1232 msgid "Python-specific" msgstr "Python 特有の話" -#: ../../howto/functional.rst:1233 +#: ../../howto/functional.rst:1234 msgid "" "https://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-" "reference:`Text Processing in Python` discusses functional programming for " @@ -2248,7 +2228,7 @@ msgstr "" "います、この議論の節には \"Utilizing Higher-Order Functions in Text " "Processing\" というタイトルがついています。" -#: ../../howto/functional.rst:1238 +#: ../../howto/functional.rst:1239 msgid "" "Mertz also wrote a 3-part series of articles on functional programming for " "IBM's DeveloperWorks site; see `part 1 `__." msgstr "" -#: ../../howto/functional.rst:1246 +#: ../../howto/functional.rst:1247 msgid "Python documentation" msgstr "Python 文書" -#: ../../howto/functional.rst:1248 +#: ../../howto/functional.rst:1249 msgid "Documentation for the :mod:`itertools` module." msgstr ":mod:`itertools` モジュールの文書。" -#: ../../howto/functional.rst:1250 +#: ../../howto/functional.rst:1251 msgid "Documentation for the :mod:`functools` module." msgstr ":mod:`functools` モジュールについてのドキュメント。" -#: ../../howto/functional.rst:1252 +#: ../../howto/functional.rst:1253 msgid "Documentation for the :mod:`operator` module." msgstr ":mod:`operator` モジュールの文書。" -#: ../../howto/functional.rst:1254 +#: ../../howto/functional.rst:1255 msgid ":pep:`289`: \"Generator Expressions\"" msgstr ":pep:`289`: \"Generator Expressions\"" -#: ../../howto/functional.rst:1256 +#: ../../howto/functional.rst:1257 msgid "" ":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new " "generator features in Python 2.5." diff --git a/howto/gdb_helpers.po b/howto/gdb_helpers.po index 9e7687a3f..6ecdec66b 100644 --- a/howto/gdb_helpers.po +++ b/howto/gdb_helpers.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/index.po b/howto/index.po index 46d6fe00f..b81a3a98b 100644 --- a/howto/index.po +++ b/howto/index.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/instrumentation.po b/howto/instrumentation.po index feba220ca..294f56b33 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/ipaddress.po b/howto/ipaddress.po index bb4b707b8..dc27ec2f4 100644 --- a/howto/ipaddress.po +++ b/howto/ipaddress.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index 7f747fd85..618f2ef72 100644 --- a/howto/isolating-extensions.po +++ b/howto/isolating-extensions.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: qqfunc, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index df49c597f..5d7a3931b 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -2903,7 +2903,7 @@ msgid "" "class NNGSocketListener(logging.handlers.QueueListener):\n" "\n" " def __init__(self, uri, /, *handlers, **kwargs):\n" -" # Have a timeout for interruptability, and open a\n" +" # Have a timeout for interruptibility, and open a\n" " # subscriber socket\n" " socket = pynng.Sub0(listen=uri, recv_timeout=500)\n" " # The b'' subscription matches all topics\n" @@ -5555,14 +5555,9 @@ msgid "" "You'll need to be familiar with RFC 5424 to fully understand the above code, " "and it may be that you have slightly different needs (e.g. for how you pass " "structural data to the log). Nevertheless, the above should be adaptable to " -"your speciric needs. With the above handler, you'd pass structured data " +"your specific needs. With the above handler, you'd pass structured data " "using something like this::" msgstr "" -"上記のコードを完全に理解するには RFC 5424 を熟知する必要があります。また、上" -"記の例とはやや異なる要求を持つこともあるでしょう (たとえば構造化データをログ" -"に渡す方法について)。にもかかわらず、上記のコードは特有の要求に対する順応性が" -"あります。上記のハンドラにより、構造化データは以下のように渡すことができるで" -"しょう::" #: ../../howto/logging-cookbook.rst:3926 msgid "" diff --git a/howto/logging.po b/howto/logging.po index 8c772c277..e73b265d5 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/mro.po b/howto/mro.po index 200fa67a0..1e5c4bad9 100644 --- a/howto/mro.po +++ b/howto/mro.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -34,7 +34,7 @@ msgid "" msgstr "" #: ../../howto/mro.rst:13 -msgid "By `Michele Simionato `__." +msgid "By `Michele Simionato `__." msgstr "" #: ../../howto/mro.rst:0 @@ -308,9 +308,9 @@ msgid "" "tail of any of the other lists, then add it to the linearization of C and " "remove it from the lists in the merge, otherwise look at the head of the " "next list and take it, if it is a good head. Then repeat the operation " -"until all the class are removed or it is impossible to find good heads. In " -"this case, it is impossible to construct the merge, Python 2.3 will refuse " -"to create the class C and will raise an exception.*" +"until all the classes are removed or it is impossible to find good heads. " +"In this case, it is impossible to construct the merge, Python 2.3 will " +"refuse to create the class C and will raise an exception.*" msgstr "" #: ../../howto/mro.rst:197 diff --git a/howto/perf_profiling.po b/howto/perf_profiling.po index 40c097d96..d9e24cf15 100644 --- a/howto/perf_profiling.po +++ b/howto/perf_profiling.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-03 17:25+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/howto/pyporting.po b/howto/pyporting.po index 5d9b123c8..507aea6f0 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/regex.po b/howto/regex.po index 8ab662bee..1fedd7dc4 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/remote_debugging.po b/howto/remote_debugging.po index 80650255b..2e4660d5f 100644 --- a/howto/remote_debugging.po +++ b/howto/remote_debugging.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/sockets.po b/howto/sockets.po index 4cc98697a..581a73d38 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/sorting.po b/howto/sorting.po index 215556fd2..bab939737 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -662,14 +662,9 @@ msgid "" "However, note that ``<`` can fall back to using :meth:`~object.__gt__` if :" "meth:`~object.__lt__` is not implemented (see :func:`object.__lt__` for " "details on the mechanics). To avoid surprises, :pep:`8` recommends that all " -"six comparison methods be implemented. The :func:`~functools.total_ordering` " +"six comparison methods be implemented. The :deco:`~functools.total_ordering` " "decorator is provided to make that task easier." msgstr "" -"ただし、``<`` は :meth:`~object.__lt__` が実装されていなければ :meth:" -"`~object.__gt__` を使って代替することに注意してください (この技法について詳し" -"くは :func:`object.__lt__` を参照してください)。驚きを防ぐため、:pep:`8` は6" -"つの比較メソッドを全て実装することを推奨しています。この作業を簡単にするた" -"め、:func:`~functools.total_ordering` デコレータが提供されています。" #: ../../howto/sorting.rst:378 msgid "" diff --git a/howto/timerfd.po b/howto/timerfd.po index 523c24105..a9268a443 100644 --- a/howto/timerfd.po +++ b/howto/timerfd.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/unicode.po b/howto/unicode.po index 473400450..96792a020 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/howto/urllib2.po b/howto/urllib2.po index 18d90701e..244349d8f 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/improve-page-nojs.po b/improve-page-nojs.po index 94e115bdb..f18a6c033 100644 --- a/improve-page-nojs.po +++ b/improve-page-nojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2026-02-19 14:44+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/improve-page.po b/improve-page.po index 231aa5786..0937a240b 100644 --- a/improve-page.po +++ b/improve-page.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2026-02-19 14:44+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/installing/index.po b/installing/index.po index e9f926edb..ad128faaf 100644 --- a/installing/index.po +++ b/installing/index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/__future__.po b/library/__future__.po index 59c5e0aba..a5e416e58 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/__main__.po b/library/__main__.po index 3b7dec381..03fb095ae 100644 --- a/library/__main__.po +++ b/library/__main__.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Inada Naoki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/_thread.po b/library/_thread.po index d03c677e7..ea1678d67 100644 --- a/library/_thread.po +++ b/library/_thread.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/abc.po b/library/abc.po index 24b9a47ab..e9dbcaedb 100644 --- a/library/abc.po +++ b/library/abc.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: 甲斐 智丈, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -264,7 +264,7 @@ msgid "" "or is derived from it. A class that has a metaclass derived from :class:`!" "ABCMeta` cannot be instantiated unless all of its abstract methods and " "properties are overridden. The abstract methods can be called using any of " -"the normal 'super' call mechanisms. :func:`!abstractmethod` may be used to " +"the normal 'super' call mechanisms. :deco:`!abstractmethod` may be used to " "declare abstract methods for properties and descriptors." msgstr "" @@ -272,7 +272,7 @@ msgstr "" msgid "" "Dynamically adding abstract methods to a class, or attempting to modify the " "abstraction status of a method or class once it is created, are only " -"supported using the :func:`update_abstractmethods` function. The :func:`!" +"supported using the :func:`update_abstractmethods` function. The :deco:`!" "abstractmethod` only affects subclasses derived using regular inheritance; " "\"virtual subclasses\" registered with the ABC's :meth:`~ABCMeta.register` " "method are not affected." @@ -280,7 +280,7 @@ msgstr "" #: ../../library/abc.rst:179 msgid "" -"When :func:`!abstractmethod` is applied in combination with other method " +"When :deco:`!abstractmethod` is applied in combination with other method " "descriptors, it should be applied as the innermost decorator, as shown in " "the following usage examples::" msgstr "" @@ -324,7 +324,7 @@ msgid "" "the descriptor must identify itself as abstract using :attr:`!" "__isabstractmethod__`. In general, this attribute should be ``True`` if any " "of the methods used to compose the descriptor are abstract. For example, " -"Python's built-in :class:`property` does the equivalent of::" +"Python's built-in :deco:`property` does the equivalent of::" msgstr "" #: ../../library/abc.rst:219 @@ -356,27 +356,21 @@ msgstr "" #: ../../library/abc.rst:240 msgid "" -"It is now possible to use :class:`classmethod` with :func:`abstractmethod`, " +"It is now possible to use :deco:`classmethod` with :deco:`abstractmethod`, " "making this decorator redundant." msgstr "" -":class:`classmethod` を :func:`abstractmethod` と一緒に使えるようになったた" -"め、このデコレータは冗長になりました。" #: ../../library/abc.rst:244 msgid "" -"A subclass of the built-in :func:`classmethod`, indicating an abstract " -"classmethod. Otherwise it is similar to :func:`abstractmethod`." +"A subclass of the built-in :class:`classmethod`, indicating an abstract " +"classmethod. Otherwise it is similar to :deco:`abstractmethod`." msgstr "" -"組み込みの :func:`classmethod` のサブクラスで、抽象クラスメソッドであることを" -"示します。それ以外は :func:`abstractmethod` と同じです。" #: ../../library/abc.rst:247 msgid "" -"This special case is deprecated, as the :func:`classmethod` decorator is now " +"This special case is deprecated, as the :deco:`classmethod` decorator is now " "correctly identified as abstract when applied to an abstract method::" msgstr "" -"この特殊ケースは :func:`classmethod` デコレータが抽象メソッドに適用された場合" -"に抽象的だと正しく認識されるようになったため撤廃されます::" #: ../../library/abc.rst:251 msgid "" @@ -389,27 +383,21 @@ msgstr "" #: ../../library/abc.rst:261 msgid "" -"It is now possible to use :class:`staticmethod` with :func:`abstractmethod`, " +"It is now possible to use :deco:`staticmethod` with :deco:`abstractmethod`, " "making this decorator redundant." msgstr "" -":class:`staticmethod` を :func:`abstractmethod` と一緒に使えるようになったた" -"め、このデコレータは冗長になりました。" #: ../../library/abc.rst:265 msgid "" -"A subclass of the built-in :func:`staticmethod`, indicating an abstract " -"staticmethod. Otherwise it is similar to :func:`abstractmethod`." +"A subclass of the built-in :class:`staticmethod`, indicating an abstract " +"staticmethod. Otherwise it is similar to :deco:`abstractmethod`." msgstr "" -"組み込みの :func:`staticmethod` のサブクラスで、抽象静的メソッドであることを" -"示します。それ以外は :func:`abstractmethod` と同じです。" #: ../../library/abc.rst:268 msgid "" -"This special case is deprecated, as the :func:`staticmethod` decorator is " +"This special case is deprecated, as the :deco:`staticmethod` decorator is " "now correctly identified as abstract when applied to an abstract method::" msgstr "" -"この特殊ケースは :func:`staticmethod` デコレータが抽象メソッドに適用された場" -"合に抽象的だと正しく認識されるようになったため撤廃されます::" #: ../../library/abc.rst:272 msgid "" @@ -422,28 +410,22 @@ msgstr "" #: ../../library/abc.rst:281 msgid "" -"It is now possible to use :class:`property`, :meth:`property.getter`, :meth:" -"`property.setter` and :meth:`property.deleter` with :func:`abstractmethod`, " +"It is now possible to use :deco:`property`, :deco:`property.getter`, :deco:" +"`property.setter` and :deco:`property.deleter` with :deco:`abstractmethod`, " "making this decorator redundant." msgstr "" -":class:`property` 、 :meth:`property.getter` 、 :meth:`property.setter` およ" -"び :meth:`property.deleter` を :func:`abstractmethod` と一緒に使えるように" -"なったため、このデコレータは冗長になりました。" #: ../../library/abc.rst:286 msgid "" -"A subclass of the built-in :func:`property`, indicating an abstract property." +"A subclass of the built-in :class:`property`, indicating an abstract " +"property." msgstr "" -"組み込みの :func:`property` のサブクラスで、抽象プロパティであることを示しま" -"す。" #: ../../library/abc.rst:289 msgid "" -"This special case is deprecated, as the :func:`property` decorator is now " +"This special case is deprecated, as the :deco:`property` decorator is now " "correctly identified as abstract when applied to an abstract method::" msgstr "" -"この特殊ケースは :func:`property` デコレータが抽象メソッドに適用された場合に" -"抽象的だと正しく認識されるようになったため撤廃されます::" #: ../../library/abc.rst:293 msgid "" diff --git a/library/aifc.po b/library/aifc.po index bfe1f6f93..543c7e047 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: souma987, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/allos.po b/library/allos.po index f9d31dbdd..b066b81d2 100644 --- a/library/allos.po +++ b/library/allos.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/annotationlib.po b/library/annotationlib.po index 20b9b3547..02572a725 100644 --- a/library/annotationlib.po +++ b/library/annotationlib.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-03 17:25+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -340,8 +340,8 @@ msgstr "" #: ../../library/annotationlib.rst:238 msgid "" -"For example, this is used to implement the :attr:`~Format.STRING` for :class:" -"`typing.TypedDict` classes created through the functional syntax:" +"For example, this is used to implement the :attr:`~Format.STRING` format " +"for :class:`typing.TypedDict` classes created through the functional syntax:" msgstr "" #: ../../library/annotationlib.rst:241 diff --git a/library/archiving.po b/library/archiving.po index fb9841d65..edf128911 100644 --- a/library/archiving.po +++ b/library/archiving.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/argparse.po b/library/argparse.po index a7ac47f7c..c36ec2ee4 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-07 18:32+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1346,12 +1346,13 @@ msgid "" msgstr "" #: ../../library/argparse.rst:838 -msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." +msgid "" +"Unless explicitly set, the *default* will be ``None``. If the default value " +"is a non-zero number, the count starts from that number rather than from " +"zero." msgstr "" -"*default* は明示的に *0* と指定されない場合は ``None`` であることに注意してく" -"ださい。" -#: ../../library/argparse.rst:840 +#: ../../library/argparse.rst:842 msgid "" "``'help'`` - This prints a complete help message for all the options in the " "current parser and then exits. By default a help action is automatically " @@ -1362,7 +1363,7 @@ msgstr "" "セージを表示し、終了します。出力の生成方法の詳細については :class:" "`ArgumentParser` を参照してください。" -#: ../../library/argparse.rst:845 +#: ../../library/argparse.rst:847 msgid "" "``'version'`` - This expects a ``version=`` keyword argument in the :meth:" "`~ArgumentParser.add_argument` call, and prints version information and " @@ -1372,7 +1373,7 @@ msgstr "" "出しに ``version=`` キーワード引数を期待します。指定されたときはバージョン情" "報を表示して終了します::" -#: ../../library/argparse.rst:849 +#: ../../library/argparse.rst:851 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" @@ -1382,7 +1383,7 @@ msgid "" "PROG 2.0" msgstr "" -#: ../../library/argparse.rst:855 +#: ../../library/argparse.rst:857 msgid "" "You may also specify an arbitrary action by passing an :class:`Action` " "subclass (e.g. :class:`BooleanOptionalAction`) or other object that " @@ -1391,7 +1392,7 @@ msgid "" "with non-zero ``nargs``) can be used with positional arguments." msgstr "" -#: ../../library/argparse.rst:861 +#: ../../library/argparse.rst:863 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the :meth:`!__call__` method and optionally the :meth:`!__init__` " @@ -1400,11 +1401,11 @@ msgid "" "their registered name." msgstr "" -#: ../../library/argparse.rst:866 +#: ../../library/argparse.rst:868 msgid "An example of a custom action::" msgstr "カスタムアクションの例です::" -#: ../../library/argparse.rst:868 +#: ../../library/argparse.rst:870 msgid "" ">>> class FooAction(argparse.Action):\n" "... def __init__(self, option_strings, dest, nargs=None, **kwargs):\n" @@ -1425,15 +1426,15 @@ msgid "" "Namespace(bar='1', foo='2')" msgstr "" -#: ../../library/argparse.rst:886 +#: ../../library/argparse.rst:888 msgid "For more details, see :class:`Action`." msgstr "詳細は :class:`Action` を参照してください。" -#: ../../library/argparse.rst:892 +#: ../../library/argparse.rst:894 msgid "nargs" msgstr "nargs" -#: ../../library/argparse.rst:894 +#: ../../library/argparse.rst:896 msgid "" ":class:`ArgumentParser` objects usually associate a single command-line " "argument with a single action to be taken. The ``nargs`` keyword argument " @@ -1442,7 +1443,7 @@ msgid "" "are:" msgstr "" -#: ../../library/argparse.rst:899 +#: ../../library/argparse.rst:901 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" @@ -1450,7 +1451,7 @@ msgstr "" "``N`` (整数) -- ``N`` 個の引数がコマンドラインから集められ、リストに格納され" "ます。例えば::" -#: ../../library/argparse.rst:902 +#: ../../library/argparse.rst:904 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs=2)\n" @@ -1459,7 +1460,7 @@ msgid "" "Namespace(bar=['c'], foo=['a', 'b'])" msgstr "" -#: ../../library/argparse.rst:908 +#: ../../library/argparse.rst:910 msgid "" "Note that ``nargs=1`` produces a list of one item. This is different from " "the default, in which the item is produced by itself." @@ -1467,7 +1468,7 @@ msgstr "" "``nargs=1`` は1要素のリストを作ることに注意してください。これはデフォルトの、" "要素がそのまま属性になる動作とは異なります。" -#: ../../library/argparse.rst:913 +#: ../../library/argparse.rst:915 msgid "" "``'?'``. One argument will be consumed from the command line if possible, " "and produced as a single item. If no command-line argument is present, the " @@ -1482,7 +1483,7 @@ msgstr "" "いというケースもありえます。この場合は const_ の値が生成されます。この動作の" "例です::" -#: ../../library/argparse.rst:920 +#: ../../library/argparse.rst:922 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs='?', const='c', default='d')\n" @@ -1495,14 +1496,14 @@ msgid "" "Namespace(bar='d', foo='d')" msgstr "" -#: ../../library/argparse.rst:930 +#: ../../library/argparse.rst:932 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" msgstr "" "``nargs='?'`` のよくある利用例の1つは、入出力ファイルの指定オプションです::" -#: ../../library/argparse.rst:933 +#: ../../library/argparse.rst:935 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('infile', nargs='?')\n" @@ -1515,7 +1516,7 @@ msgid "" "Namespace(infile=None, outfile=None)" msgstr "" -#: ../../library/argparse.rst:945 +#: ../../library/argparse.rst:947 msgid "" "``'*'``. All command-line arguments present are gathered into a list. Note " "that it generally doesn't make much sense to have more than one positional " @@ -1526,7 +1527,7 @@ msgstr "" "が ``nargs='*'`` を持つことにあまり意味はありませんが、複数のオプション引数" "が ``nargs='*'`` を持つことはありえます。例えば::" -#: ../../library/argparse.rst:950 +#: ../../library/argparse.rst:952 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs='*')\n" @@ -1536,14 +1537,14 @@ msgid "" "Namespace(bar=['1', '2'], baz=['a', 'b'], foo=['x', 'y'])" msgstr "" -#: ../../library/argparse.rst:959 +#: ../../library/argparse.rst:961 msgid "" "``'+'``. Just like ``'*'``, all command-line arguments present are gathered " "into a list. Additionally, an error message will be generated if there " "wasn't at least one command-line argument present. For example::" msgstr "" -#: ../../library/argparse.rst:963 +#: ../../library/argparse.rst:965 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('foo', nargs='+')\n" @@ -1554,7 +1555,7 @@ msgid "" "PROG: error: the following arguments are required: foo" msgstr "" -#: ../../library/argparse.rst:971 +#: ../../library/argparse.rst:973 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -1563,11 +1564,11 @@ msgid "" "``'store_const'``) set ``nargs=0``." msgstr "" -#: ../../library/argparse.rst:981 +#: ../../library/argparse.rst:983 msgid "const" msgstr "const" -#: ../../library/argparse.rst:983 +#: ../../library/argparse.rst:985 msgid "" "The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " "hold constant values that are not read from the command line but are " @@ -1578,7 +1579,7 @@ msgstr "" "から読み込まれないけれども :class:`ArgumentParser` のいくつかのアクションで必" "要とされる値のために使われます。この引数のよくある2つの使用法は:" -#: ../../library/argparse.rst:987 +#: ../../library/argparse.rst:989 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -1594,7 +1595,7 @@ msgstr "" "`~ArgumentParser.add_argument` に与えられなければ、``None`` のデフォルト値を" "受け取ります。" -#: ../../library/argparse.rst:995 +#: ../../library/argparse.rst:997 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " @@ -1604,7 +1605,7 @@ msgid "" "See the nargs_ description for examples." msgstr "" -#: ../../library/argparse.rst:1002 +#: ../../library/argparse.rst:1004 msgid "" "``const=None`` by default, including when ``action='append_const'`` or " "``action='store_const'``." @@ -1612,11 +1613,11 @@ msgstr "" "``action='append_const'`` や ``action='store_const'`` の場合も含め、デフォル" "トでは ``const=None`` です。" -#: ../../library/argparse.rst:1009 +#: ../../library/argparse.rst:1011 msgid "default" msgstr "default" -#: ../../library/argparse.rst:1011 +#: ../../library/argparse.rst:1013 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -1631,7 +1632,7 @@ msgstr "" "る値を指定します。オプション引数では、オプション文字列がコマンドライン上に存" "在しなかったときに ``default`` の値が利用されます::" -#: ../../library/argparse.rst:1018 +#: ../../library/argparse.rst:1020 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=42)\n" @@ -1641,13 +1642,13 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: ../../library/argparse.rst:1025 +#: ../../library/argparse.rst:1027 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not overwrite it::" msgstr "" -#: ../../library/argparse.rst:1028 +#: ../../library/argparse.rst:1030 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=42)\n" @@ -1655,7 +1656,7 @@ msgid "" "Namespace(foo=101)" msgstr "" -#: ../../library/argparse.rst:1033 +#: ../../library/argparse.rst:1035 msgid "" "If the ``default`` value is a string, the parser parses the value as if it " "were a command-line argument. In particular, the parser applies any type_ " @@ -1667,7 +1668,7 @@ msgstr "" "に、type_ 変換引数が与えられていればそれらを適用します。そうでない場合、パー" "サーは値をそのまま使用します::" -#: ../../library/argparse.rst:1038 +#: ../../library/argparse.rst:1040 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--length', default='10', type=int)\n" @@ -1676,7 +1677,7 @@ msgid "" "Namespace(length=10, width=10.5)" msgstr "" -#: ../../library/argparse.rst:1044 +#: ../../library/argparse.rst:1046 msgid "" "For positional arguments with nargs_ equal to ``?`` or ``*``, the " "``default`` value is used when no command-line argument was present::" @@ -1684,7 +1685,7 @@ msgstr "" "nargs_ が ``?`` か ``*`` である位置引数では、コマンドライン引数が指定されな" "かった場合 ``default`` の値が使われます。例えば::" -#: ../../library/argparse.rst:1047 +#: ../../library/argparse.rst:1049 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('foo', nargs='?', default=42)\n" @@ -1694,21 +1695,21 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: ../../library/argparse.rst:1054 +#: ../../library/argparse.rst:1056 msgid "" "Because ``nargs='*'`` gathers any supplied values into a list, an absent " "positional argument yields an empty list (``[]``). Only a non-``None`` " "*default* overrides this (so ``default=None`` still gives ``[]``)." msgstr "" -#: ../../library/argparse.rst:1058 +#: ../../library/argparse.rst:1060 msgid "" "For required_ arguments, the ``default`` value is ignored. For example, this " "applies to positional arguments with nargs_ values other than ``?`` or " "``*``, or optional arguments marked as ``required=True``." msgstr "" -#: ../../library/argparse.rst:1062 +#: ../../library/argparse.rst:1064 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" @@ -1716,7 +1717,7 @@ msgstr "" "``default=argparse.SUPPRESS`` を渡すと、コマンドライン引数が存在しないときに" "属性の追加をしなくなります::" -#: ../../library/argparse.rst:1065 +#: ../../library/argparse.rst:1067 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=argparse.SUPPRESS)\n" @@ -1726,11 +1727,11 @@ msgid "" "Namespace(foo='1')" msgstr "" -#: ../../library/argparse.rst:1076 +#: ../../library/argparse.rst:1078 msgid "type" msgstr "type" -#: ../../library/argparse.rst:1078 +#: ../../library/argparse.rst:1080 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1744,7 +1745,7 @@ msgstr "" "ワード引数に指定する type converter により、必要な型チェックと型変換を行うこ" "とができます。" -#: ../../library/argparse.rst:1084 +#: ../../library/argparse.rst:1086 msgid "" "If the type_ keyword is used with the default_ keyword, the type converter " "is only applied if the default is a string." @@ -1752,7 +1753,7 @@ msgstr "" "もし type_ キーワードが default_ キーワードとともに使用された場合、default_ " "の値が文字列のときのみ、type converter による変換などが行われます。" -#: ../../library/argparse.rst:1087 +#: ../../library/argparse.rst:1089 msgid "" "The argument to ``type`` can be a callable that accepts a single string or " "the name of a registered type (see :meth:`~ArgumentParser.register`) If the " @@ -1761,12 +1762,12 @@ msgid "" "is displayed. Other exception types are not handled." msgstr "" -#: ../../library/argparse.rst:1093 +#: ../../library/argparse.rst:1095 msgid "Common built-in types and functions can be used as type converters:" msgstr "" "一般的なビルトインデータ型や関数を ``type`` 引数の値として直接指定できます::" -#: ../../library/argparse.rst:1095 +#: ../../library/argparse.rst:1097 msgid "" "import argparse\n" "import pathlib\n" @@ -1779,11 +1780,11 @@ msgid "" "parser.add_argument('datapath', type=pathlib.Path)" msgstr "" -#: ../../library/argparse.rst:1107 +#: ../../library/argparse.rst:1109 msgid "User defined functions can be used as well:" msgstr "ユーザが定義した関数も使用できます::" -#: ../../library/argparse.rst:1109 +#: ../../library/argparse.rst:1111 msgid "" ">>> def hyphenated(string):\n" "... return '-'.join([word[:4] for word in string.casefold().split()])\n" @@ -1794,14 +1795,14 @@ msgid "" "Namespace(short_title='\"the-tale-of-two-citi')" msgstr "" -#: ../../library/argparse.rst:1119 +#: ../../library/argparse.rst:1121 msgid "" "The :func:`bool` function is not recommended as a type converter. All it " "does is convert empty strings to ``False`` and non-empty strings to " "``True``. This is usually not what is desired::" msgstr "" -#: ../../library/argparse.rst:1123 +#: ../../library/argparse.rst:1125 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> _ = parser.add_argument('--verbose', type=bool)\n" @@ -1809,13 +1810,13 @@ msgid "" "Namespace(verbose=True)" msgstr "" -#: ../../library/argparse.rst:1128 +#: ../../library/argparse.rst:1130 msgid "" "See :class:`BooleanOptionalAction` or ``action='store_true'`` for common " "alternatives." msgstr "" -#: ../../library/argparse.rst:1131 +#: ../../library/argparse.rst:1133 msgid "" "In general, the ``type`` keyword is a convenience that should only be used " "for simple conversions that can only raise one of the three supported " @@ -1827,7 +1828,7 @@ msgstr "" "ラー処理、またはリソース管理を伴うものは、引数を解析したあとに別個の処理とし" "て行うべきです。" -#: ../../library/argparse.rst:1136 +#: ../../library/argparse.rst:1138 msgid "" "For example, JSON or YAML conversions have complex error cases that require " "better reporting than can be given by the ``type`` keyword. A :exc:`~json." @@ -1839,7 +1840,7 @@ msgstr "" "発生しうる) :exc:`~json.JSONDecodeError` は適切に整形されて表示されません。ま" "た、:exc:`FileNotFoundError` が発生しても parser は何も処理しません。" -#: ../../library/argparse.rst:1141 +#: ../../library/argparse.rst:1143 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses :class:`~argparse.FileType` and then " @@ -1849,7 +1850,7 @@ msgid "" "files." msgstr "" -#: ../../library/argparse.rst:1148 +#: ../../library/argparse.rst:1150 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." @@ -1857,11 +1858,11 @@ msgstr "" "なお、引数が、あらかじめ決められた値の候補のいずれかに一致するかをチェックし" "たいだけの場合には、代わりに choices_ キーワードの使用を検討してください。" -#: ../../library/argparse.rst:1155 +#: ../../library/argparse.rst:1157 msgid "choices" msgstr "choices" -#: ../../library/argparse.rst:1157 +#: ../../library/argparse.rst:1159 msgid "" "Some command-line arguments should be selected from a restricted set of " "values. These can be handled by passing a sequence object as the *choices* " @@ -1875,7 +1876,7 @@ msgstr "" "き、引数の値がチェックされ、その値が選択肢の中に含まれていない場合はエラー" "メッセージを表示します::" -#: ../../library/argparse.rst:1163 +#: ../../library/argparse.rst:1165 msgid "" ">>> parser = argparse.ArgumentParser(prog='game.py')\n" ">>> parser.add_argument('move', choices=['rock', 'paper', 'scissors'])\n" @@ -1887,7 +1888,7 @@ msgid "" "'paper', 'scissors')" msgstr "" -#: ../../library/argparse.rst:1172 +#: ../../library/argparse.rst:1174 msgid "" "Any sequence can be passed as the *choices* value, so :class:`list` " "objects, :class:`tuple` objects, and custom sequences are all supported." @@ -1896,7 +1897,7 @@ msgstr "" "ブジェクト、 :class:`tuple` オブジェクト、カスタムシーケンスはすべてサポート" "されています。" -#: ../../library/argparse.rst:1175 +#: ../../library/argparse.rst:1177 msgid "" "Use of :class:`enum.Enum` is not recommended because it is difficult to " "control its appearance in usage, help, and error messages." @@ -1904,21 +1905,21 @@ msgstr "" "ただし、:class:`enum.Enum` を渡すことは推奨されません。使用方法、ヘルプ、エ" "ラーメッセージなどでどのように表示されるかを制御することが難いからです。" -#: ../../library/argparse.rst:1178 +#: ../../library/argparse.rst:1180 msgid "" "Note that *choices* are checked after any type_ conversions have been " "performed, so objects in *choices* should match the type_ specified. This " "can make *choices* appear unfamiliar in usage, help, or error messages." msgstr "" -#: ../../library/argparse.rst:1183 +#: ../../library/argparse.rst:1185 msgid "" "To keep *choices* user-friendly, consider a custom type wrapper that " "converts and formats values, or omit type_ and handle conversion in your " "application code." msgstr "" -#: ../../library/argparse.rst:1187 +#: ../../library/argparse.rst:1189 msgid "" "Formatted choices override the default *metavar* which is normally derived " "from *dest*. This is usually what you want because the user never sees the " @@ -1931,11 +1932,11 @@ msgstr "" "しくない場合 (おそらく多くの選択肢がある場合など) は、 metavar_ を明示的に指" "定してください。" -#: ../../library/argparse.rst:1196 +#: ../../library/argparse.rst:1198 msgid "required" msgstr "required" -#: ../../library/argparse.rst:1198 +#: ../../library/argparse.rst:1200 msgid "" "In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1943,7 +1944,7 @@ msgid "" "the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" msgstr "" -#: ../../library/argparse.rst:1203 +#: ../../library/argparse.rst:1205 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', required=True)\n" @@ -1954,7 +1955,7 @@ msgid "" ": error: the following arguments are required: --foo" msgstr "" -#: ../../library/argparse.rst:1211 +#: ../../library/argparse.rst:1213 msgid "" "As the example shows, if an option is marked as ``required``, :meth:" "`~ArgumentParser.parse_args` will report an error if that option is not " @@ -1964,7 +1965,7 @@ msgstr "" "parse_args` はそのフラグがコマンドラインに存在しないときにエラーを表示しま" "す。" -#: ../../library/argparse.rst:1217 +#: ../../library/argparse.rst:1219 msgid "" "Required options are generally considered bad form because users expect " "*options* to be *optional*, and thus they should be avoided when possible." @@ -1972,11 +1973,11 @@ msgstr "" "ユーザーは、通常 *フラグ* の指定は *任意* であると認識しているため、必須にす" "るのは一般的には悪いやり方で、できる限り避けるべきです。" -#: ../../library/argparse.rst:1224 +#: ../../library/argparse.rst:1226 msgid "help" msgstr "help" -#: ../../library/argparse.rst:1226 +#: ../../library/argparse.rst:1228 msgid "" "The ``help`` value is a string containing a brief description of the " "argument. When a user requests help (usually by using ``-h`` or ``--help`` " @@ -1984,7 +1985,7 @@ msgid "" "each argument." msgstr "" -#: ../../library/argparse.rst:1231 +#: ../../library/argparse.rst:1233 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " @@ -1997,7 +1998,7 @@ msgstr "" "プログラム名 ``%(prog)s`` と、 ``%(default)s`` や ``%(type)s`` など :meth:" "`~ArgumentParser.add_argument` のキーワード引数の多くが含まれます::" -#: ../../library/argparse.rst:1236 +#: ../../library/argparse.rst:1238 msgid "" ">>> parser = argparse.ArgumentParser(prog='frobble')\n" ">>> parser.add_argument('bar', nargs='?', type=int, default=42,\n" @@ -2012,7 +2013,7 @@ msgid "" " -h, --help show this help message and exit" msgstr "" -#: ../../library/argparse.rst:1248 +#: ../../library/argparse.rst:1250 msgid "" "As the help string supports %-formatting, if you want a literal ``%`` to " "appear in the help string, you must escape it as ``%%``." @@ -2020,13 +2021,13 @@ msgstr "" "ヘルプ文字列は %-フォーマットをサポートしているので、ヘルプ文字列内にリテラ" "ル ``%`` を表示したい場合は ``%%`` のようにエスケープしなければなりません。" -#: ../../library/argparse.rst:1251 +#: ../../library/argparse.rst:1253 msgid "" ":mod:`!argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" msgstr "" -#: ../../library/argparse.rst:1254 +#: ../../library/argparse.rst:1256 msgid "" ">>> parser = argparse.ArgumentParser(prog='frobble')\n" ">>> parser.add_argument('--foo', help=argparse.SUPPRESS)\n" @@ -2037,11 +2038,11 @@ msgid "" " -h, --help show this help message and exit" msgstr "" -#: ../../library/argparse.rst:1266 +#: ../../library/argparse.rst:1268 msgid "metavar" msgstr "metavar" -#: ../../library/argparse.rst:1268 +#: ../../library/argparse.rst:1270 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, :class:`!ArgumentParser` " @@ -2053,7 +2054,7 @@ msgid "" "command-line argument will be referred to as ``FOO``. An example::" msgstr "" -#: ../../library/argparse.rst:1277 +#: ../../library/argparse.rst:1279 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -2071,11 +2072,11 @@ msgid "" " --foo FOO" msgstr "" -#: ../../library/argparse.rst:1292 +#: ../../library/argparse.rst:1294 msgid "An alternative name can be specified with ``metavar``::" msgstr "代わりの名前を、``metavar`` として指定できます::" -#: ../../library/argparse.rst:1294 +#: ../../library/argparse.rst:1296 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', metavar='YYY')\n" @@ -2093,7 +2094,7 @@ msgid "" " --foo YYY" msgstr "" -#: ../../library/argparse.rst:1309 +#: ../../library/argparse.rst:1311 msgid "" "Note that ``metavar`` only changes the *displayed* name - the name of the " "attribute on the :meth:`~ArgumentParser.parse_args` object is still " @@ -2103,7 +2104,7 @@ msgstr "" "`~ArgumentParser.parse_args` の返すオブジェクトの属性名は dest_ の値のままで" "す。" -#: ../../library/argparse.rst:1313 +#: ../../library/argparse.rst:1315 msgid "" "Different values of ``nargs`` may cause the metavar to be used multiple " "times. Providing a tuple to ``metavar`` specifies a different display for " @@ -2112,7 +2113,7 @@ msgstr "" "``nargs`` を指定した場合、metavar が複数回利用されるかもしれません。" "``metavar`` にタプルを渡すと、各引数に対して異なる名前を指定できます::" -#: ../../library/argparse.rst:1317 +#: ../../library/argparse.rst:1319 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x', nargs=2)\n" @@ -2126,11 +2127,11 @@ msgid "" " --foo bar baz" msgstr "" -#: ../../library/argparse.rst:1332 +#: ../../library/argparse.rst:1334 msgid "dest" msgstr "dest" -#: ../../library/argparse.rst:1334 +#: ../../library/argparse.rst:1336 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -2145,7 +2146,7 @@ msgstr "" "決定されます。位置引数のアクションについては、 ``dest`` は通常 :meth:" "`~ArgumentParser.add_argument` の第一引数として渡します::" -#: ../../library/argparse.rst:1341 +#: ../../library/argparse.rst:1343 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('bar')\n" @@ -2153,7 +2154,7 @@ msgid "" "Namespace(bar='XXX')" msgstr "" -#: ../../library/argparse.rst:1346 +#: ../../library/argparse.rst:1348 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -2167,7 +2168,7 @@ msgid "" "a valid attribute name. The examples below illustrate this behavior::" msgstr "" -#: ../../library/argparse.rst:1359 +#: ../../library/argparse.rst:1361 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('-f', '--foo-bar', '--foo')\n" @@ -2179,11 +2180,11 @@ msgid "" "Namespace(foo_bar='1', quz='2', x='2')" msgstr "" -#: ../../library/argparse.rst:1368 +#: ../../library/argparse.rst:1370 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "``dest`` にカスタムの属性名を与えることも可能です::" -#: ../../library/argparse.rst:1370 +#: ../../library/argparse.rst:1372 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', dest='bar')\n" @@ -2191,7 +2192,7 @@ msgid "" "Namespace(bar='XXX')" msgstr "" -#: ../../library/argparse.rst:1375 +#: ../../library/argparse.rst:1377 msgid "" "Multiple arguments may share the same ``dest``. By default, the value from " "the last such argument given on the command line wins. Use " @@ -2200,15 +2201,15 @@ msgid "" "conflict_handler_." msgstr "" -#: ../../library/argparse.rst:1380 +#: ../../library/argparse.rst:1382 msgid "Single-dash long option now takes precedence over short options." msgstr "" -#: ../../library/argparse.rst:1387 +#: ../../library/argparse.rst:1389 msgid "deprecated" msgstr "" -#: ../../library/argparse.rst:1389 +#: ../../library/argparse.rst:1391 msgid "" "During a project's lifetime, some arguments may need to be removed from the " "command line. Before removing them, you should inform your users that the " @@ -2219,7 +2220,7 @@ msgid "" "will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" -#: ../../library/argparse.rst:1399 +#: ../../library/argparse.rst:1401 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser(prog='snake.py')\n" @@ -2231,11 +2232,11 @@ msgid "" "Namespace(legs=4)" msgstr "" -#: ../../library/argparse.rst:1412 +#: ../../library/argparse.rst:1414 msgid "Action classes" msgstr "Action クラス" -#: ../../library/argparse.rst:1414 +#: ../../library/argparse.rst:1416 msgid "" ":class:`!Action` classes implement the Action API, a callable which returns " "a callable which processes arguments from the command-line. Any object which " @@ -2243,7 +2244,7 @@ msgid "" "`~ArgumentParser.add_argument`." msgstr "" -#: ../../library/argparse.rst:1423 +#: ../../library/argparse.rst:1425 msgid "" ":class:`!Action` objects are used by an :class:`ArgumentParser` to represent " "the information needed to parse a single argument from one or more strings " @@ -2252,7 +2253,7 @@ msgid "" "`ArgumentParser.add_argument` except for the ``action`` itself." msgstr "" -#: ../../library/argparse.rst:1429 +#: ../../library/argparse.rst:1431 msgid "" "Instances of :class:`!Action` (or return value of any callable to the " "``action`` parameter) should have attributes :attr:`!dest`, :attr:`!" @@ -2261,46 +2262,46 @@ msgid "" "is to call :meth:`!Action.__init__`." msgstr "" -#: ../../library/argparse.rst:1437 +#: ../../library/argparse.rst:1439 msgid "" ":class:`!Action` instances should be callable, so subclasses must override " "the :meth:`!__call__` method, which should accept four parameters:" msgstr "" -#: ../../library/argparse.rst:1440 +#: ../../library/argparse.rst:1442 msgid "" "*parser* - The :class:`ArgumentParser` object which contains this action." msgstr "" -#: ../../library/argparse.rst:1442 +#: ../../library/argparse.rst:1444 msgid "" "*namespace* - The :class:`Namespace` object that will be returned by :meth:" "`~ArgumentParser.parse_args`. Most actions add an attribute to this object " "using :func:`setattr`." msgstr "" -#: ../../library/argparse.rst:1446 +#: ../../library/argparse.rst:1448 msgid "" "*values* - The associated command-line arguments, with any type conversions " "applied. Type conversions are specified with the type_ keyword argument to :" "meth:`~ArgumentParser.add_argument`." msgstr "" -#: ../../library/argparse.rst:1450 +#: ../../library/argparse.rst:1452 msgid "" "*option_string* - The option string that was used to invoke this action. The " "``option_string`` argument is optional, and will be absent if the action is " "associated with a positional argument." msgstr "" -#: ../../library/argparse.rst:1454 +#: ../../library/argparse.rst:1456 msgid "" "The :meth:`!__call__` method may perform arbitrary actions, but will " "typically set attributes on the ``namespace`` based on ``dest`` and " "``values``." msgstr "" -#: ../../library/argparse.rst:1459 +#: ../../library/argparse.rst:1461 msgid "" ":class:`!Action` subclasses can define a :meth:`!format_usage` method that " "takes no argument and return a string which will be used when printing the " @@ -2308,7 +2309,7 @@ msgid "" "will be used." msgstr "" -#: ../../library/argparse.rst:1465 +#: ../../library/argparse.rst:1467 msgid "" "A subclass of :class:`Action` for handling boolean flags with positive and " "negative options. Adding a single argument such as ``--foo`` automatically " @@ -2316,7 +2317,7 @@ msgid "" "``False`` respectively::" msgstr "" -#: ../../library/argparse.rst:1470 +#: ../../library/argparse.rst:1472 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser()\n" @@ -2325,26 +2326,26 @@ msgid "" "Namespace(foo=False)" msgstr "" -#: ../../library/argparse.rst:1476 +#: ../../library/argparse.rst:1478 msgid "" "Single-dash long options are also supported. For example, negative option ``-" "nofoo`` is automatically added for positive option ``-foo``. But no " "additional options are added for short options such as ``-f``." msgstr "" -#: ../../library/argparse.rst:1483 +#: ../../library/argparse.rst:1485 msgid "Added support for single-dash options." msgstr "" -#: ../../library/argparse.rst:1486 +#: ../../library/argparse.rst:1488 msgid "Added support for alternate prefix_chars_." msgstr "" -#: ../../library/argparse.rst:1490 +#: ../../library/argparse.rst:1492 msgid "The parse_args() method" msgstr "parse_args() メソッド" -#: ../../library/argparse.rst:1494 +#: ../../library/argparse.rst:1496 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." @@ -2352,14 +2353,14 @@ msgstr "" "引数の文字列をオブジェクトに変換し、namespace オブジェクトの属性に代入しま" "す。結果の namespace オブジェクトを返します。" -#: ../../library/argparse.rst:1497 +#: ../../library/argparse.rst:1499 msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " "created and how they are assigned. See the documentation for :meth:`!" "add_argument` for details." msgstr "" -#: ../../library/argparse.rst:1501 +#: ../../library/argparse.rst:1503 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." @@ -2367,7 +2368,7 @@ msgstr "" "args_ - 解析する文字列のリスト。デフォルトでは :data:`sys.argv` から取得され" "ます。" -#: ../../library/argparse.rst:1504 +#: ../../library/argparse.rst:1506 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." @@ -2375,11 +2376,11 @@ msgstr "" "namespace_ - 属性を代入するオブジェクト。デフォルトでは、新しい空の :class:" "`Namespace` オブジェクトです。" -#: ../../library/argparse.rst:1509 +#: ../../library/argparse.rst:1511 msgid "Option value syntax" msgstr "オプション値の文法" -#: ../../library/argparse.rst:1511 +#: ../../library/argparse.rst:1513 msgid "" "The :meth:`~ArgumentParser.parse_args` method supports several ways of " "specifying the value of an option (if it takes one). In the simplest case, " @@ -2389,7 +2390,7 @@ msgstr "" "オプションの値の指定に複数の方法をサポートしています。もっとも単純な場合に" "は、オプションとその値は次のように2つの別々の引数として渡されます::" -#: ../../library/argparse.rst:1515 +#: ../../library/argparse.rst:1517 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x')\n" @@ -2400,7 +2401,7 @@ msgid "" "Namespace(foo='FOO', x=None)" msgstr "" -#: ../../library/argparse.rst:1523 +#: ../../library/argparse.rst:1525 msgid "" "For long options (options with names longer than a single character), the " "option and value can also be passed as a single command-line argument, using " @@ -2410,13 +2411,13 @@ msgstr "" "値は次のように ``=`` で区切られた1つのコマンドライン引数として渡すこともでき" "ます::" -#: ../../library/argparse.rst:1527 +#: ../../library/argparse.rst:1529 msgid "" ">>> parser.parse_args(['--foo=FOO'])\n" "Namespace(foo='FOO', x=None)" msgstr "" -#: ../../library/argparse.rst:1530 +#: ../../library/argparse.rst:1532 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" @@ -2424,13 +2425,13 @@ msgstr "" "短いオプション (1文字のオプション) では、オプションとその値は次のように連結し" "て渡すことができます::" -#: ../../library/argparse.rst:1533 +#: ../../library/argparse.rst:1535 msgid "" ">>> parser.parse_args(['-xX'])\n" "Namespace(foo=None, x='X')" msgstr "" -#: ../../library/argparse.rst:1536 +#: ../../library/argparse.rst:1538 msgid "" "Several short options can be joined together, using only a single ``-`` " "prefix, as long as only the last option (or none of them) requires a value::" @@ -2439,7 +2440,7 @@ msgstr "" "い場合、複数の短いオプションは次のように1つの接頭辞 ``-`` だけで連結できま" "す::" -#: ../../library/argparse.rst:1539 +#: ../../library/argparse.rst:1541 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x', action='store_true')\n" @@ -2449,11 +2450,11 @@ msgid "" "Namespace(x=True, y=True, z='Z')" msgstr "" -#: ../../library/argparse.rst:1548 +#: ../../library/argparse.rst:1550 msgid "Invalid arguments" msgstr "不正な引数" -#: ../../library/argparse.rst:1550 +#: ../../library/argparse.rst:1552 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -2465,7 +2466,7 @@ msgstr "" "ます。それらのエラーが発生した場合、エラーメッセージと使用法メッセージを表示" "して終了します::" -#: ../../library/argparse.rst:1555 +#: ../../library/argparse.rst:1557 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('--foo', type=int)\n" @@ -2479,19 +2480,19 @@ msgid "" ">>> # invalid option\n" ">>> parser.parse_args(['--bar'])\n" "usage: PROG [-h] [--foo FOO] [bar]\n" -"PROG: error: no such option: --bar\n" +"PROG: error: unrecognized arguments: --bar\n" "\n" ">>> # wrong number of arguments\n" ">>> parser.parse_args(['spam', 'badger'])\n" "usage: PROG [-h] [--foo FOO] [bar]\n" -"PROG: error: extra arguments found: badger" +"PROG: error: unrecognized arguments: badger" msgstr "" -#: ../../library/argparse.rst:1576 +#: ../../library/argparse.rst:1578 msgid "Arguments containing ``-``" msgstr "``-`` を含む引数" -#: ../../library/argparse.rst:1578 +#: ../../library/argparse.rst:1580 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -2509,7 +2510,7 @@ msgstr "" "負の数として解釈でき、パーサーに負の数のように解釈できるオプションが存在しな" "い場合にのみ、``-`` で始まる位置引数になりえます::" -#: ../../library/argparse.rst:1586 +#: ../../library/argparse.rst:1588 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x')\n" @@ -2534,7 +2535,7 @@ msgid "" ">>> # negative number options present, so -2 is an option\n" ">>> parser.parse_args(['-2'])\n" "usage: PROG [-h] [-1 ONE] [foo]\n" -"PROG: error: no such option: -2\n" +"PROG: error: unrecognized arguments: -2\n" "\n" ">>> # negative number options present, so both -1s are options\n" ">>> parser.parse_args(['-1', '-1'])\n" @@ -2542,7 +2543,7 @@ msgid "" "PROG: error: argument -1: expected one argument" msgstr "" -#: ../../library/argparse.rst:1616 +#: ../../library/argparse.rst:1618 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -2553,23 +2554,30 @@ msgstr "" "引数 ``'--'`` を挿入して、:meth:`~ArgumentParser.parse_args` にそれ以降のすべ" "てが位置引数だと教えることができます::" -#: ../../library/argparse.rst:1621 +#: ../../library/argparse.rst:1623 msgid "" ">>> parser.parse_args(['--', '-f'])\n" "Namespace(foo='-f', one=None)" msgstr "" -#: ../../library/argparse.rst:1624 +#: ../../library/argparse.rst:1626 msgid "" "See also :ref:`the argparse howto on ambiguous arguments ` for more details." msgstr "" -#: ../../library/argparse.rst:1630 +#: ../../library/argparse.rst:1629 +msgid "" +"Negative-number matching was expanded to include numbers in scientific " +"notation (``-2.5e-6``), numbers containing underscores (``-1_234.5``), and " +"complex numbers (``-1.2e-3j``)." +msgstr "" + +#: ../../library/argparse.rst:1637 msgid "Argument abbreviations (prefix matching)" msgstr "引数の短縮形 (先頭文字でのマッチング)" -#: ../../library/argparse.rst:1632 +#: ../../library/argparse.rst:1639 msgid "" "The :meth:`~ArgumentParser.parse_args` method :ref:`by default " "` allows long options to be abbreviated to a prefix, if the " @@ -2579,7 +2587,7 @@ msgstr "" "`、長いオプションに曖昧さがない (先頭文字列が一意である) かぎ" "り、先頭文字列に短縮して指定できます::" -#: ../../library/argparse.rst:1636 +#: ../../library/argparse.rst:1643 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-bacon')\n" @@ -2593,7 +2601,7 @@ msgid "" "PROG: error: ambiguous option: -ba could match -badger, -bacon" msgstr "" -#: ../../library/argparse.rst:1647 +#: ../../library/argparse.rst:1654 msgid "" "An error is produced for arguments that could produce more than one options. " "This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." @@ -2601,11 +2609,11 @@ msgstr "" "先頭の文字が同じ引数が複数ある場合に短縮指定を行うとエラーを発生させます。こ" "の機能は :ref:`allow_abbrev` に ``False`` を指定することで無効にできます。" -#: ../../library/argparse.rst:1653 +#: ../../library/argparse.rst:1660 msgid "Beyond ``sys.argv``" msgstr "``sys.argv`` 以外" -#: ../../library/argparse.rst:1655 +#: ../../library/argparse.rst:1662 msgid "" "Sometimes it may be useful to have an :class:`ArgumentParser` parse " "arguments other than those of :data:`sys.argv`. This can be accomplished by " @@ -2613,7 +2621,7 @@ msgid "" "useful for testing at the interactive prompt::" msgstr "" -#: ../../library/argparse.rst:1660 +#: ../../library/argparse.rst:1667 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument(\n" @@ -2628,11 +2636,11 @@ msgid "" "Namespace(accumulate=, integers=[1, 2, 3, 4])" msgstr "" -#: ../../library/argparse.rst:1675 +#: ../../library/argparse.rst:1682 msgid "The Namespace object" msgstr "Namespace オブジェクト" -#: ../../library/argparse.rst:1679 +#: ../../library/argparse.rst:1686 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." @@ -2640,7 +2648,7 @@ msgstr "" ":meth:`~ArgumentParser.parse_args` が属性を格納して返すためのオブジェクトにデ" "フォルトで使用されるシンプルなクラスです。" -#: ../../library/argparse.rst:1682 +#: ../../library/argparse.rst:1689 msgid "" "This class is deliberately simple, just an :class:`object` subclass with a " "readable string representation. If you prefer to have dict-like view of the " @@ -2650,7 +2658,7 @@ msgstr "" "class:`object` のサブクラスです。もし属性を辞書のように扱える方が良ければ、標" "準的な Python のイディオム :func:`vars` を利用できます::" -#: ../../library/argparse.rst:1686 +#: ../../library/argparse.rst:1693 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -2659,7 +2667,7 @@ msgid "" "{'foo': 'BAR'}" msgstr "" -#: ../../library/argparse.rst:1692 +#: ../../library/argparse.rst:1699 msgid "" "It may also be useful to have an :class:`ArgumentParser` assign attributes " "to an already existing object, rather than a new :class:`Namespace` object. " @@ -2669,7 +2677,7 @@ msgstr "" "既存のオブジェクトに属性を設定する方が良い場合があります。これは " "``namespace=`` キーワード引数を指定することで可能です::" -#: ../../library/argparse.rst:1696 +#: ../../library/argparse.rst:1703 msgid "" ">>> class C:\n" "... pass\n" @@ -2682,15 +2690,15 @@ msgid "" "'BAR'" msgstr "" -#: ../../library/argparse.rst:1708 +#: ../../library/argparse.rst:1715 msgid "Other utilities" msgstr "その他のユーティリティ" -#: ../../library/argparse.rst:1711 +#: ../../library/argparse.rst:1718 msgid "Subcommands" msgstr "" -#: ../../library/argparse.rst:1718 +#: ../../library/argparse.rst:1725 msgid "" "Many programs split up their functionality into a number of subcommands, for " "example, the ``svn`` program can invoke subcommands like ``svn checkout``, " @@ -2705,49 +2713,49 @@ msgid "" "returns an :class:`!ArgumentParser` object that can be modified as usual." msgstr "" -#: ../../library/argparse.rst:1730 +#: ../../library/argparse.rst:1737 msgid "Description of parameters:" msgstr "引数の説明:" -#: ../../library/argparse.rst:1732 +#: ../../library/argparse.rst:1739 msgid "" "*title* - title for the sub-parser group in help output; by default " "\"subcommands\" if description is provided, otherwise uses title for " "positional arguments" msgstr "" -#: ../../library/argparse.rst:1736 +#: ../../library/argparse.rst:1743 msgid "" "*description* - description for the sub-parser group in help output, by " "default ``None``" msgstr "" -#: ../../library/argparse.rst:1739 +#: ../../library/argparse.rst:1746 msgid "" "*prog* - usage information that will be displayed with subcommand help, by " "default the name of the program and any positional arguments before the " "subparser argument" msgstr "" -#: ../../library/argparse.rst:1743 +#: ../../library/argparse.rst:1750 msgid "" "*parser_class* - class which will be used to create sub-parser instances, by " "default the class of the current parser (e.g. :class:`ArgumentParser`)" msgstr "" -#: ../../library/argparse.rst:1746 +#: ../../library/argparse.rst:1753 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" msgstr "action_ - コマンドラインにこの引数があったときの基本のアクション。" -#: ../../library/argparse.rst:1749 +#: ../../library/argparse.rst:1756 msgid "" "dest_ - name of the attribute under which subcommand name will be stored; by " "default ``None`` and no value is stored" msgstr "" -#: ../../library/argparse.rst:1752 +#: ../../library/argparse.rst:1759 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" @@ -2755,23 +2763,23 @@ msgstr "" "required_ - サブコマンドが必須であるかどうかを指定し、デフォルトは ``False`` " "です。(3.7 より追加)" -#: ../../library/argparse.rst:1755 +#: ../../library/argparse.rst:1762 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" "help_ - ヘルプ出力に表示されるサブパーサーグループのヘルプです。デフォルトは " "``None`` です" -#: ../../library/argparse.rst:1757 +#: ../../library/argparse.rst:1764 msgid "" "metavar_ - string presenting available subcommands in help; by default it is " "``None`` and presents subcommands in form {cmd1, cmd2, ..}" msgstr "" -#: ../../library/argparse.rst:1760 +#: ../../library/argparse.rst:1767 msgid "Some example usage::" msgstr "いくつかの使用例::" -#: ../../library/argparse.rst:1762 +#: ../../library/argparse.rst:1769 msgid "" ">>> # create the top-level parser\n" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" @@ -2794,7 +2802,7 @@ msgid "" "Namespace(baz='Z', foo=True)" msgstr "" -#: ../../library/argparse.rst:1781 +#: ../../library/argparse.rst:1788 msgid "" "Note that the object returned by :meth:`~ArgumentParser.parse_args` will " "only contain attributes for the main parser and the subparser that was " @@ -2804,7 +2812,7 @@ msgid "" "only the ``foo`` and ``baz`` attributes are present." msgstr "" -#: ../../library/argparse.rst:1788 +#: ../../library/argparse.rst:1795 msgid "" "If a subparser defines an argument with the same ``dest`` as the parent " "parser, the two share a single namespace attribute, so the parent's value " @@ -2812,7 +2820,7 @@ msgid "" "both." msgstr "" -#: ../../library/argparse.rst:1793 +#: ../../library/argparse.rst:1800 msgid "" "Similarly, when a help message is requested from a subparser, only the help " "for that particular parser will be printed. The help message will not " @@ -2826,7 +2834,7 @@ msgstr "" "メッセージは、上の例にもあるように :meth:`~_SubParsersAction.add_parser` の " "``help=`` 引数によって指定できます)" -#: ../../library/argparse.rst:1801 +#: ../../library/argparse.rst:1808 msgid "" ">>> parser.parse_args(['--help'])\n" "usage: PROG [-h] [--foo] {a,b} ...\n" @@ -2857,7 +2865,7 @@ msgid "" " --baz {X,Y,Z} baz help" msgstr "" -#: ../../library/argparse.rst:1829 +#: ../../library/argparse.rst:1836 msgid "" "The :meth:`~ArgumentParser.add_subparsers` method also supports ``title`` " "and ``description`` keyword arguments. When either is present, the " @@ -2865,7 +2873,7 @@ msgid "" "example::" msgstr "" -#: ../../library/argparse.rst:1833 +#: ../../library/argparse.rst:1840 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers(title='subcommands',\n" @@ -2885,7 +2893,7 @@ msgid "" " {foo,bar} additional help" msgstr "" -#: ../../library/argparse.rst:1850 +#: ../../library/argparse.rst:1857 msgid "" "One particularly effective way of handling subcommands is to combine the use " "of the :meth:`~ArgumentParser.add_subparsers` method with calls to :meth:" @@ -2893,7 +2901,7 @@ msgid "" "function it should execute. For example::" msgstr "" -#: ../../library/argparse.rst:1855 +#: ../../library/argparse.rst:1862 msgid "" ">>> # subcommand functions\n" ">>> def foo(args):\n" @@ -2928,7 +2936,7 @@ msgid "" "((XYZYX))" msgstr "" -#: ../../library/argparse.rst:1887 +#: ../../library/argparse.rst:1894 msgid "" "This way, you can let :meth:`~ArgumentParser.parse_args` do the job of " "calling the appropriate function after argument parsing is complete. " @@ -2939,7 +2947,7 @@ msgid "" "work::" msgstr "" -#: ../../library/argparse.rst:1894 +#: ../../library/argparse.rst:1901 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers(dest='subparser_name')\n" @@ -2951,37 +2959,37 @@ msgid "" "Namespace(subparser_name='2', y='frobble')" msgstr "" -#: ../../library/argparse.rst:1903 +#: ../../library/argparse.rst:1910 msgid "New *required* keyword-only parameter." msgstr "" -#: ../../library/argparse.rst:1906 +#: ../../library/argparse.rst:1913 msgid "" "Subparser's *prog* is no longer affected by a custom usage message in the " "main parser." msgstr "" -#: ../../library/argparse.rst:1914 +#: ../../library/argparse.rst:1921 msgid "" "Create and return a new :class:`ArgumentParser` object for the subcommand " "*name*." msgstr "" -#: ../../library/argparse.rst:1917 +#: ../../library/argparse.rst:1924 msgid "The *name* argument is the name of the sub-command." msgstr "" -#: ../../library/argparse.rst:1919 +#: ../../library/argparse.rst:1926 msgid "The *help* argument provides a short description for this sub-command." msgstr "" -#: ../../library/argparse.rst:1921 +#: ../../library/argparse.rst:1928 msgid "" "The *aliases* argument allows providing alternative names for this sub-" "command. For example::" msgstr "" -#: ../../library/argparse.rst:1924 +#: ../../library/argparse.rst:1931 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers()\n" @@ -2991,13 +2999,13 @@ msgid "" "Namespace(foo='bar')" msgstr "" -#: ../../library/argparse.rst:1931 +#: ../../library/argparse.rst:1938 msgid "" "The *deprecated* argument, if ``True``, marks the sub-command as deprecated " "and will issue a warning when used. For example::" msgstr "" -#: ../../library/argparse.rst:1934 +#: ../../library/argparse.rst:1941 msgid "" ">>> parser = argparse.ArgumentParser(prog='chicken.py')\n" ">>> subparsers = parser.add_subparsers()\n" @@ -3007,21 +3015,21 @@ msgid "" "Namespace()" msgstr "" -#: ../../library/argparse.rst:1941 +#: ../../library/argparse.rst:1948 msgid "" "All other keyword arguments are passed directly to the :class:`!" "ArgumentParser` constructor." msgstr "" -#: ../../library/argparse.rst:1944 +#: ../../library/argparse.rst:1951 msgid "Added the *deprecated* parameter." msgstr "" -#: ../../library/argparse.rst:1949 +#: ../../library/argparse.rst:1956 msgid "FileType objects" msgstr "FileType オブジェクト" -#: ../../library/argparse.rst:1953 +#: ../../library/argparse.rst:1960 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -3035,7 +3043,7 @@ msgstr "" "ズ、エンコーディング、エラー処理でファイルとして開きます (詳細は :func:" "`open` 関数を参照してください。)::" -#: ../../library/argparse.rst:1959 +#: ../../library/argparse.rst:1966 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--raw', type=argparse.FileType('wb', 0))\n" @@ -3046,7 +3054,7 @@ msgid "" "raw=<_io.FileIO name='raw.dat' mode='wb'>)" msgstr "" -#: ../../library/argparse.rst:1965 +#: ../../library/argparse.rst:1972 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into :data:`sys.stdin` for readable :class:`FileType` objects " @@ -3056,7 +3064,7 @@ msgstr "" "`FileType` であれば :data:`sys.stdin` を、書き込み用の :class:`FileType` であ" "れば :data:`sys.stdout` に変換します::" -#: ../../library/argparse.rst:1969 +#: ../../library/argparse.rst:1976 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('infile', type=argparse.FileType('r'))\n" @@ -3064,7 +3072,7 @@ msgid "" "Namespace(infile=<_io.TextIOWrapper name='' encoding='UTF-8'>)" msgstr "" -#: ../../library/argparse.rst:1976 +#: ../../library/argparse.rst:1983 msgid "" "If one argument uses *FileType* and then a subsequent argument fails, an " "error is reported but the file is not automatically closed. This can also " @@ -3073,15 +3081,15 @@ msgid "" "manage the files." msgstr "" -#: ../../library/argparse.rst:1982 +#: ../../library/argparse.rst:1989 msgid "Added the *encoding* and *errors* parameters." msgstr "*encoding* と *errors* が引数に追加されました。" -#: ../../library/argparse.rst:1989 +#: ../../library/argparse.rst:1996 msgid "Argument groups" msgstr "引数グループ" -#: ../../library/argparse.rst:1994 +#: ../../library/argparse.rst:2001 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"options\" when displaying help messages. When " @@ -3090,7 +3098,7 @@ msgid "" "method::" msgstr "" -#: ../../library/argparse.rst:2000 +#: ../../library/argparse.rst:2007 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> group = parser.add_argument_group('group')\n" @@ -3104,7 +3112,7 @@ msgid "" " --foo FOO foo help" msgstr "" -#: ../../library/argparse.rst:2011 +#: ../../library/argparse.rst:2018 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -3115,7 +3123,7 @@ msgid "" "this display::" msgstr "" -#: ../../library/argparse.rst:2019 +#: ../../library/argparse.rst:2026 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> group1 = parser.add_argument_group('group1', 'group1 description')\n" @@ -3136,7 +3144,7 @@ msgid "" " --bar BAR bar help" msgstr "" -#: ../../library/argparse.rst:2037 +#: ../../library/argparse.rst:2044 msgid "" "The optional, keyword-only parameters argument_default_ and " "conflict_handler_ allow for finer-grained control of the behavior of the " @@ -3145,7 +3153,7 @@ msgid "" "rather than the entire parser." msgstr "" -#: ../../library/argparse.rst:2042 +#: ../../library/argparse.rst:2049 msgid "" "Note that any arguments not in your user-defined groups will end up back in " "the usual \"positional arguments\" and \"optional arguments\" sections." @@ -3153,35 +3161,35 @@ msgstr "" "ユーザー定義グループにないすべての引数は通常の \"位置引数\" と \"オプション引" "数\" セクションに表示されます。" -#: ../../library/argparse.rst:2045 +#: ../../library/argparse.rst:2052 msgid "" "Within each argument group, arguments are displayed in help output in the " "order in which they are added." msgstr "" -#: ../../library/argparse.rst:2048 +#: ../../library/argparse.rst:2055 msgid "" "Calling :meth:`add_argument_group` on an argument group now raises an " "exception. This nesting was never supported, often failed to work correctly, " "and was unintentionally exposed through inheritance." msgstr "" -#: ../../library/argparse.rst:2053 +#: ../../library/argparse.rst:2060 msgid "Passing prefix_chars_ to :meth:`add_argument_group` is now deprecated." msgstr "" -#: ../../library/argparse.rst:2059 +#: ../../library/argparse.rst:2066 msgid "Mutual exclusion" msgstr "相互排他" -#: ../../library/argparse.rst:2063 +#: ../../library/argparse.rst:2070 msgid "" "Create a mutually exclusive group. :mod:`!argparse` will make sure that only " "one of the arguments in the mutually exclusive group was present on the " "command line::" msgstr "" -#: ../../library/argparse.rst:2067 +#: ../../library/argparse.rst:2074 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_mutually_exclusive_group()\n" @@ -3196,7 +3204,7 @@ msgid "" "PROG: error: argument --bar: not allowed with argument --foo" msgstr "" -#: ../../library/argparse.rst:2079 +#: ../../library/argparse.rst:2086 msgid "" "The :meth:`add_mutually_exclusive_group` method also accepts a *required* " "argument, to indicate that at least one of the mutually exclusive arguments " @@ -3205,7 +3213,7 @@ msgstr "" ":meth:`add_mutually_exclusive_group` メソッドの引数 *required* に True 値を指" "定すると、その相互排他引数のどれか1つを選ぶことが要求されます::" -#: ../../library/argparse.rst:2083 +#: ../../library/argparse.rst:2090 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_mutually_exclusive_group(required=True)\n" @@ -3216,7 +3224,7 @@ msgid "" "PROG: error: one of the arguments --foo --bar is required" msgstr "" -#: ../../library/argparse.rst:2091 +#: ../../library/argparse.rst:2098 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -3224,7 +3232,7 @@ msgid "" "argument group that has a title and description. For example::" msgstr "" -#: ../../library/argparse.rst:2097 +#: ../../library/argparse.rst:2104 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_argument_group('Group title', 'Group description')\n" @@ -3244,7 +3252,7 @@ msgid "" " --bar BAR bar help" msgstr "" -#: ../../library/argparse.rst:2114 +#: ../../library/argparse.rst:2121 msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " "on a mutually exclusive group now raises an exception. This nesting was " @@ -3252,11 +3260,11 @@ msgid "" "exposed through inheritance." msgstr "" -#: ../../library/argparse.rst:2122 +#: ../../library/argparse.rst:2129 msgid "Parser defaults" msgstr "パーサーのデフォルト値" -#: ../../library/argparse.rst:2126 +#: ../../library/argparse.rst:2133 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -3269,7 +3277,7 @@ msgstr "" "を使うと与えられたコマンドライン引数の内容によらず追加の属性を決定することが" "可能です::" -#: ../../library/argparse.rst:2132 +#: ../../library/argparse.rst:2139 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('foo', type=int)\n" @@ -3278,7 +3286,7 @@ msgid "" "Namespace(bar=42, baz='badger', foo=736)" msgstr "" -#: ../../library/argparse.rst:2138 +#: ../../library/argparse.rst:2145 msgid "" "Note that defaults can be set at both the parser level using :meth:" "`set_defaults` and at the argument level using :meth:`add_argument`. If both " @@ -3286,7 +3294,7 @@ msgid "" "used::" msgstr "" -#: ../../library/argparse.rst:2142 +#: ../../library/argparse.rst:2149 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default='bar')\n" @@ -3295,7 +3303,7 @@ msgid "" "Namespace(foo='spam')" msgstr "" -#: ../../library/argparse.rst:2148 +#: ../../library/argparse.rst:2155 msgid "" "Parser-level defaults can be particularly useful when working with multiple " "parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " @@ -3305,7 +3313,7 @@ msgstr "" "プの例については :meth:`~ArgumentParser.add_subparsers` メソッドを参照してく" "ださい。" -#: ../../library/argparse.rst:2154 +#: ../../library/argparse.rst:2161 msgid "" "Get the default value for a namespace attribute, as set by either :meth:" "`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" @@ -3313,7 +3321,7 @@ msgstr "" ":meth:`~ArgumentParser.add_argument` か :meth:`~ArgumentParser.set_defaults` " "によって指定された、 namespace の属性のデフォルト値を取得します::" -#: ../../library/argparse.rst:2158 +#: ../../library/argparse.rst:2165 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default='badger')\n" @@ -3321,11 +3329,11 @@ msgid "" "'badger'" msgstr "" -#: ../../library/argparse.rst:2165 +#: ../../library/argparse.rst:2172 msgid "Printing help" msgstr "ヘルプの表示" -#: ../../library/argparse.rst:2167 +#: ../../library/argparse.rst:2174 msgid "" "In most typical applications, :meth:`~ArgumentParser.parse_args` will take " "care of formatting and printing any usage or error messages. However, " @@ -3335,7 +3343,7 @@ msgstr "" "使用法やエラーメッセージのフォーマットと表示について面倒を見ます。しかし、い" "くつかのフォーマットメソッドが利用できます:" -#: ../../library/argparse.rst:2173 +#: ../../library/argparse.rst:2180 msgid "" "Print a brief description of how the :class:`ArgumentParser` should be " "invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " @@ -3344,7 +3352,7 @@ msgstr "" ":class:`ArgumentParser` がコマンドラインからどう実行されるべきかの短い説明を" "表示します。 *file* が ``None`` の時は、 :data:`sys.stdout` に出力されます。" -#: ../../library/argparse.rst:2179 +#: ../../library/argparse.rst:2186 msgid "" "Print a help message, including the program usage and information about the " "arguments registered with the :class:`ArgumentParser`. If *file* is " @@ -3354,7 +3362,7 @@ msgstr "" "含むヘルプメッセージを表示します。 *file* が ``None`` の時は、 :data:`sys." "stdout` に出力されます。" -#: ../../library/argparse.rst:2183 +#: ../../library/argparse.rst:2190 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" @@ -3362,7 +3370,7 @@ msgstr "" "これらのメソッドの、表示する代わりにシンプルに文字列を返すバージョンもありま" "す:" -#: ../../library/argparse.rst:2188 +#: ../../library/argparse.rst:2195 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." @@ -3370,7 +3378,7 @@ msgstr "" ":class:`ArgumentParser` がコマンドラインからどう実行されるべきかの短い説明を" "格納した文字列を返します。" -#: ../../library/argparse.rst:2193 +#: ../../library/argparse.rst:2200 msgid "" "Return a string containing a help message, including the program usage and " "information about the arguments registered with the :class:`ArgumentParser`." @@ -3378,11 +3386,11 @@ msgstr "" "プログラムの使用法と :class:`ArgumentParser` に登録された引数についての情報を" "含むヘルプメッセージを格納した文字列を返します。" -#: ../../library/argparse.rst:2198 +#: ../../library/argparse.rst:2205 msgid "Partial parsing" msgstr "部分解析" -#: ../../library/argparse.rst:2202 +#: ../../library/argparse.rst:2209 msgid "" "Sometimes a script only needs to handle a specific set of command-line " "arguments, leaving any unrecognized arguments for another script or program. " @@ -3390,7 +3398,7 @@ msgid "" "useful." msgstr "" -#: ../../library/argparse.rst:2207 +#: ../../library/argparse.rst:2214 msgid "" "This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " "does not raise an error for extra, unrecognized arguments. Instead, it " @@ -3398,7 +3406,7 @@ msgid "" "populated namespace and the list of any unrecognized arguments." msgstr "" -#: ../../library/argparse.rst:2214 +#: ../../library/argparse.rst:2221 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', action='store_true')\n" @@ -3407,7 +3415,7 @@ msgid "" "(Namespace(bar='BAR', foo=True), ['--badger', 'spam'])" msgstr "" -#: ../../library/argparse.rst:2221 +#: ../../library/argparse.rst:2228 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`~ArgumentParser.parse_known_args`. The parser may consume an option even if " @@ -3419,11 +3427,11 @@ msgstr "" "先頭文字に過ぎない場合でも、パーサは引数リストに残さずに、オプションを受け取" "る場合があります。" -#: ../../library/argparse.rst:2228 +#: ../../library/argparse.rst:2235 msgid "Customizing file parsing" msgstr "ファイル解析のカスタマイズ" -#: ../../library/argparse.rst:2232 +#: ../../library/argparse.rst:2239 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -3435,7 +3443,7 @@ msgstr "" "す。 :meth:`convert_arg_line_to_args` を変更することでこの動作をカスタマイズ" "できます。" -#: ../../library/argparse.rst:2237 +#: ../../library/argparse.rst:2244 msgid "" "This method takes a single argument *arg_line* which is a string read from " "the argument file. It returns a list of arguments parsed from this string. " @@ -3445,7 +3453,7 @@ msgstr "" "け取ります。そしてその文字列を解析した結果の引数のリストを返します。このメ" "ソッドはファイルから1行読みこむごとに、順番に呼ばれます。" -#: ../../library/argparse.rst:2241 +#: ../../library/argparse.rst:2248 msgid "" "A useful override of this method is one that treats each space-separated " "word as an argument. The following example demonstrates how to do this::" @@ -3453,31 +3461,31 @@ msgstr "" "このメソッドをオーバーライドすると便利なこととして、スペースで区切られた行の" "単語1つ1つを別々の引数として扱えます。次の例でその方法を示します::" -#: ../../library/argparse.rst:2244 +#: ../../library/argparse.rst:2251 msgid "" "class MyArgumentParser(argparse.ArgumentParser):\n" " def convert_arg_line_to_args(self, arg_line):\n" " return arg_line.split()" msgstr "" -#: ../../library/argparse.rst:2248 +#: ../../library/argparse.rst:2255 msgid "" "Note that with this override an argument can no longer contain spaces, since " "each space-separated word becomes a separate argument." msgstr "" -#: ../../library/argparse.rst:2253 +#: ../../library/argparse.rst:2260 msgid "Exiting methods" msgstr "終了メソッド" -#: ../../library/argparse.rst:2257 +#: ../../library/argparse.rst:2264 msgid "" "This method terminates the program, exiting with the specified *status* and, " "if given, it prints a *message* to :data:`sys.stderr` before that. The user " "can override this method to handle these steps differently::" msgstr "" -#: ../../library/argparse.rst:2261 +#: ../../library/argparse.rst:2268 msgid "" "class ErrorCatchingArgumentParser(argparse.ArgumentParser):\n" " def exit(self, status=0, message=None):\n" @@ -3486,17 +3494,17 @@ msgid "" " exit(status)" msgstr "" -#: ../../library/argparse.rst:2269 +#: ../../library/argparse.rst:2276 msgid "" "This method prints a usage message, including the *message*, to :data:`sys." "stderr` and terminates the program with a status code of 2." msgstr "" -#: ../../library/argparse.rst:2274 +#: ../../library/argparse.rst:2281 msgid "Intermixed parsing" msgstr "混在した引数の解析" -#: ../../library/argparse.rst:2279 +#: ../../library/argparse.rst:2286 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -3508,7 +3516,7 @@ msgstr "" "parse_known_intermixed_args` メソッドは、このような方法での解析をサポートして" "います。" -#: ../../library/argparse.rst:2284 +#: ../../library/argparse.rst:2291 msgid "" "These parsers do not support all the :mod:`!argparse` features, and will " "raise exceptions if unsupported features are used. In particular, " @@ -3516,7 +3524,7 @@ msgid "" "positionals are not supported." msgstr "" -#: ../../library/argparse.rst:2289 +#: ../../library/argparse.rst:2296 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -3527,7 +3535,7 @@ msgstr "" "parse_intermixed_args` の違いを表しています: 前者は ``['2', '3']`` を、解析さ" "れない引数として返し、後者は全ての位置引数を ``rest`` に入れて返しています::" -#: ../../library/argparse.rst:2295 +#: ../../library/argparse.rst:2302 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -3539,7 +3547,7 @@ msgid "" "Namespace(cmd='doit', foo='bar', rest=[1, 2, 3])" msgstr "" -#: ../../library/argparse.rst:2304 +#: ../../library/argparse.rst:2311 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -3551,11 +3559,11 @@ msgstr "" ":meth:`~ArgumentParser.parse_intermixed_args` は、解析されない引数が残された" "場合にはエラーを送出します。" -#: ../../library/argparse.rst:2313 +#: ../../library/argparse.rst:2320 msgid "Registering custom types or actions" msgstr "" -#: ../../library/argparse.rst:2317 +#: ../../library/argparse.rst:2324 msgid "" "Sometimes it's desirable to use a custom string in error messages to provide " "more user-friendly output. In these cases, :meth:`!register` can be used to " @@ -3563,7 +3571,7 @@ msgid "" "the type by their registered name instead of their callable name." msgstr "" -#: ../../library/argparse.rst:2322 +#: ../../library/argparse.rst:2329 msgid "" "The :meth:`!register` method accepts three arguments - a *registry_name*, " "specifying the internal registry where the object will be stored (e.g., " @@ -3571,12 +3579,12 @@ msgid "" "be registered, and object, the callable to be registered." msgstr "" -#: ../../library/argparse.rst:2327 +#: ../../library/argparse.rst:2334 msgid "" "The following example shows how to register a custom type with a parser::" msgstr "" -#: ../../library/argparse.rst:2329 +#: ../../library/argparse.rst:2336 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser()\n" @@ -3592,15 +3600,15 @@ msgid "" "PROG: error: argument --foo: invalid 'hexadecimal integer' value: '1.2'" msgstr "" -#: ../../library/argparse.rst:2341 +#: ../../library/argparse.rst:2348 msgid "Exceptions" msgstr "例外" -#: ../../library/argparse.rst:2345 +#: ../../library/argparse.rst:2352 msgid "An error from creating or using an argument (optional or positional)." msgstr "引数 (オプション引数または位置引数) の生成時または利用時のエラーです。" -#: ../../library/argparse.rst:2347 +#: ../../library/argparse.rst:2354 msgid "" "The string value of this exception is the message, augmented with " "information about the argument that caused it." @@ -3608,30 +3616,30 @@ msgstr "" "この例外の文字列表現は、エラーの原因となった引数についての情報を補足するメッ" "セージです。" -#: ../../library/argparse.rst:2352 +#: ../../library/argparse.rst:2359 msgid "" "Raised when something goes wrong converting a command line string to a type." msgstr "" "コマンドラインの文字列を、指定された型に変換するのに失敗した時に送出されま" "す。" -#: ../../library/argparse.rst:2356 +#: ../../library/argparse.rst:2363 msgid "Guides and Tutorials" msgstr "ガイドとチュートリアル" -#: ../../library/argparse.rst:911 +#: ../../library/argparse.rst:913 msgid "? (question mark)" msgstr "? (クエスチョンマーク)" -#: ../../library/argparse.rst:911 ../../library/argparse.rst:943 -#: ../../library/argparse.rst:957 +#: ../../library/argparse.rst:913 ../../library/argparse.rst:945 +#: ../../library/argparse.rst:959 msgid "in argparse module" msgstr "argparse モジュール内" -#: ../../library/argparse.rst:943 +#: ../../library/argparse.rst:945 msgid "* (asterisk)" msgstr "* (アスタリスク)" -#: ../../library/argparse.rst:957 +#: ../../library/argparse.rst:959 msgid "+ (plus)" msgstr "+ (プラス記号)" diff --git a/library/array.po b/library/array.po index a5cad811a..be392ec22 100644 --- a/library/array.po +++ b/library/array.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/ast.po b/library/ast.po index 2638f0047..80cd5085b 100644 --- a/library/ast.po +++ b/library/ast.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1229,10 +1229,17 @@ msgstr "" "です。" #: ../../library/ast.rst:810 +msgid "" +"For dictionary comprehensions using unpacking, for example ``{**item for " +"item in items}``, the expression to be expanded goes in ``key`` and " +"``value`` is ``None``." +msgstr "" + +#: ../../library/ast.rst:814 msgid "``generators`` is a list of :class:`comprehension` nodes." msgstr "``generators`` は :class:`comprehension` ノードのリストです。" -#: ../../library/ast.rst:812 +#: ../../library/ast.rst:816 msgid "" ">>> print(ast.dump(\n" "... ast.parse('[x for x in numbers]', mode='eval'),\n" @@ -1276,7 +1283,7 @@ msgid "" " is_async=0)]))" msgstr "" -#: ../../library/ast.rst:858 +#: ../../library/ast.rst:862 msgid "" "One ``for`` clause in a comprehension. ``target`` is the reference to use " "for each element - typically a :class:`Name` or :class:`Tuple` node. " @@ -1288,7 +1295,7 @@ msgstr "" "``iter`` はイテレートする対象のオブジェクトです。 ``ifs`` は条件節のリストで" "す: 各 ``for`` 節は複数の ``ifs`` を持つことができます。" -#: ../../library/ast.rst:863 +#: ../../library/ast.rst:867 msgid "" "``is_async`` indicates a comprehension is asynchronous (using an ``async " "for`` instead of ``for``). The value is an integer (0 or 1)." @@ -1296,7 +1303,7 @@ msgstr "" "``is_async`` は内包表記が非同期であることを示します (``async for`` を " "``for`` の代わりに使います)。値は整数です (0 または 1)。" -#: ../../library/ast.rst:866 +#: ../../library/ast.rst:870 msgid "" ">>> print(ast.dump(ast.parse('[ord(c) for line in file for c in line]', " "mode='eval'),\n" @@ -1357,18 +1364,18 @@ msgid "" " is_async=1)]))" msgstr "" -#: ../../library/ast.rst:928 +#: ../../library/ast.rst:932 msgid "Statements" msgstr "文 (Statements)" -#: ../../library/ast.rst:932 +#: ../../library/ast.rst:936 msgid "" "An assignment. ``targets`` is a list of nodes, and ``value`` is a single " "node." msgstr "" "代入です。 ``targets`` はノードのリスト、 ``value`` は単一のノードです。" -#: ../../library/ast.rst:934 +#: ../../library/ast.rst:938 msgid "" "Multiple nodes in ``targets`` represents assigning the same value to each. " "Unpacking is represented by putting a :class:`Tuple` or :class:`List` within " @@ -1378,15 +1385,15 @@ msgstr "" "ます。分割代入は ``targets`` 内に :class:`Tuple` または :class:`List` を置く" "ことで表現されます。" -#: ../../library/ast.rst:940 ../../library/ast.rst:1238 -#: ../../library/ast.rst:1432 ../../library/ast.rst:1989 +#: ../../library/ast.rst:944 ../../library/ast.rst:1242 +#: ../../library/ast.rst:1436 ../../library/ast.rst:1993 msgid "" "``type_comment`` is an optional string with the type annotation as a comment." msgstr "" "``type_comment`` はコメントとして型アノテーションをあらわすオプション文字列で" "す。" -#: ../../library/ast.rst:942 +#: ../../library/ast.rst:946 msgid "" ">>> print(ast.dump(ast.parse('a = b = 1'), indent=4)) # Multiple assignment\n" "Module(\n" @@ -1410,7 +1417,7 @@ msgid "" " value=Name(id='c'))])" msgstr "" -#: ../../library/ast.rst:968 +#: ../../library/ast.rst:972 msgid "" "An assignment with a type annotation. ``target`` is a single node and can be " "a :class:`Name`, an :class:`Attribute` or a :class:`Subscript`. " @@ -1418,7 +1425,7 @@ msgid "" "`Name` node. ``value`` is a single optional node." msgstr "" -#: ../../library/ast.rst:973 +#: ../../library/ast.rst:977 msgid "" "``simple`` is always either 0 (indicating a \"complex\" target) or 1 " "(indicating a \"simple\" target). A \"simple\" target consists solely of a :" @@ -1427,7 +1434,7 @@ msgid "" "`~object.__annotations__` dictionary of modules and classes." msgstr "" -#: ../../library/ast.rst:979 +#: ../../library/ast.rst:983 msgid "" ">>> print(ast.dump(ast.parse('c: int'), indent=4))\n" "Module(\n" @@ -1471,7 +1478,7 @@ msgid "" " simple=0)])" msgstr "" -#: ../../library/ast.rst:1023 +#: ../../library/ast.rst:1027 msgid "" "Augmented assignment, such as ``a += 1``. In the following example, " "``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` " @@ -1483,7 +1490,7 @@ msgstr "" "``op`` は :class:`Add` 演算子、そして ``value`` は定数1をあらわす :class:" "`Constant` ノードです。" -#: ../../library/ast.rst:1028 +#: ../../library/ast.rst:1032 msgid "" "The ``target`` attribute cannot be of class :class:`Tuple` or :class:`List`, " "unlike the targets of :class:`Assign`." @@ -1491,7 +1498,7 @@ msgstr "" ":class:`Assign` と異なり、 ``target`` 属性は class :class:`Tuple` や :class:" "`List` であってはいけません。" -#: ../../library/ast.rst:1031 +#: ../../library/ast.rst:1035 msgid "" ">>> print(ast.dump(ast.parse('x += 2'), indent=4))\n" "Module(\n" @@ -1502,7 +1509,7 @@ msgid "" " value=Constant(value=2))])" msgstr "" -#: ../../library/ast.rst:1044 +#: ../../library/ast.rst:1048 msgid "" "A ``raise`` statement. ``exc`` is the exception object to be raised, " "normally a :class:`Call` or :class:`Name`, or ``None`` for a standalone " @@ -1513,7 +1520,7 @@ msgstr "" "指定します。 ``cause`` はオプションで、 ``raise x from y`` の ``y`` にあたり" "ます。" -#: ../../library/ast.rst:1048 +#: ../../library/ast.rst:1052 msgid "" ">>> print(ast.dump(ast.parse('raise x from y'), indent=4))\n" "Module(\n" @@ -1523,7 +1530,7 @@ msgid "" " cause=Name(id='y'))])" msgstr "" -#: ../../library/ast.rst:1060 +#: ../../library/ast.rst:1064 msgid "" "An assertion. ``test`` holds the condition, such as a :class:`Compare` node. " "``msg`` holds the failure message." @@ -1531,7 +1538,7 @@ msgstr "" "アサーションです。 ``test`` は :class:`Compare` ノードなどのような条件を保持" "します。 ``msg`` は失敗した時のメッセージを保持します。" -#: ../../library/ast.rst:1063 +#: ../../library/ast.rst:1067 msgid "" ">>> print(ast.dump(ast.parse('assert x,y'), indent=4))\n" "Module(\n" @@ -1541,7 +1548,7 @@ msgid "" " msg=Name(id='y'))])" msgstr "" -#: ../../library/ast.rst:1075 +#: ../../library/ast.rst:1079 msgid "" "Represents a ``del`` statement. ``targets`` is a list of nodes, such as :" "class:`Name`, :class:`Attribute` or :class:`Subscript` nodes." @@ -1549,7 +1556,7 @@ msgstr "" "``del`` 文をあらわします。 ``targets`` は :class:`Name`, :class:" "`Attribute`, :class:`Subscript` などのノードのリストです。" -#: ../../library/ast.rst:1078 +#: ../../library/ast.rst:1082 msgid "" ">>> print(ast.dump(ast.parse('del x,y,z'), indent=4))\n" "Module(\n" @@ -1561,11 +1568,11 @@ msgid "" " Name(id='z', ctx=Del())])])" msgstr "" -#: ../../library/ast.rst:1092 +#: ../../library/ast.rst:1096 msgid "A ``pass`` statement." msgstr "``pass`` 文をあらわします。" -#: ../../library/ast.rst:1094 +#: ../../library/ast.rst:1098 msgid "" ">>> print(ast.dump(ast.parse('pass'), indent=4))\n" "Module(\n" @@ -1573,7 +1580,7 @@ msgid "" " Pass()])" msgstr "" -#: ../../library/ast.rst:1104 +#: ../../library/ast.rst:1108 msgid "" "A :ref:`type alias ` created through the :keyword:`type` " "statement. ``name`` is the name of the alias, ``type_params`` is a list of :" @@ -1581,7 +1588,7 @@ msgid "" "type alias." msgstr "" -#: ../../library/ast.rst:1109 +#: ../../library/ast.rst:1113 msgid "" ">>> print(ast.dump(ast.parse('type Alias = int'), indent=4))\n" "Module(\n" @@ -1591,22 +1598,22 @@ msgid "" " value=Name(id='int'))])" msgstr "" -#: ../../library/ast.rst:1120 +#: ../../library/ast.rst:1124 msgid "" "Other statements which are only applicable inside functions or loops are " "described in other sections." msgstr "" "関数またはループの内部でのみ適用可能な他の文は、別のセクションで説明します。" -#: ../../library/ast.rst:1124 +#: ../../library/ast.rst:1128 msgid "Imports" msgstr "インポート" -#: ../../library/ast.rst:1128 +#: ../../library/ast.rst:1132 msgid "An import statement. ``names`` is a list of :class:`alias` nodes." msgstr "インポート文です。 ``names`` は :class:`alias` ノードのリストです。" -#: ../../library/ast.rst:1130 +#: ../../library/ast.rst:1134 msgid "" ">>> print(ast.dump(ast.parse('import x,y,z'), indent=4))\n" "Module(\n" @@ -1619,7 +1626,7 @@ msgid "" " is_lazy=0)])" msgstr "" -#: ../../library/ast.rst:1145 +#: ../../library/ast.rst:1149 msgid "" "Represents ``from x import y``. ``module`` is a raw string of the 'from' " "name, without any leading dots, or ``None`` for statements such as ``from . " @@ -1631,7 +1638,7 @@ msgstr "" "のような構文の場合は ``None`` を指定します。 ``level`` は相対インポートのレベ" "ルを表す整数を保持します (0 は絶対インポートを意味します)。" -#: ../../library/ast.rst:1150 +#: ../../library/ast.rst:1154 msgid "" ">>> print(ast.dump(ast.parse('from y import x,y,z'), indent=4))\n" "Module(\n" @@ -1646,7 +1653,7 @@ msgid "" " is_lazy=0)])" msgstr "" -#: ../../library/ast.rst:1167 +#: ../../library/ast.rst:1171 msgid "" "Both parameters are raw strings of the names. ``asname`` can be ``None`` if " "the regular name is to be used." @@ -1654,7 +1661,7 @@ msgstr "" "いずれのパラメータも名前をあらわす生の文字列です。 ``asname`` は標準の名前を" "使う場合は ``None`` を指定できます。" -#: ../../library/ast.rst:1170 +#: ../../library/ast.rst:1174 msgid "" ">>> print(ast.dump(ast.parse('from ..foo.bar import a as b, c'), indent=4))\n" "Module(\n" @@ -1668,11 +1675,11 @@ msgid "" " is_lazy=0)])" msgstr "" -#: ../../library/ast.rst:1184 +#: ../../library/ast.rst:1188 msgid "Control flow" msgstr "制御フロー" -#: ../../library/ast.rst:1187 +#: ../../library/ast.rst:1191 msgid "" "Optional clauses such as ``else`` are stored as an empty list if they're not " "present." @@ -1680,7 +1687,7 @@ msgstr "" "``else`` 節のようなオプションの節が存在しない場合は、空のリストとして保存され" "ます。" -#: ../../library/ast.rst:1192 +#: ../../library/ast.rst:1196 msgid "" "An ``if`` statement. ``test`` holds a single node, such as a :class:" "`Compare` node. ``body`` and ``orelse`` each hold a list of nodes." @@ -1688,7 +1695,7 @@ msgstr "" "``if`` 文です。 ``test`` は :class:`Compare` ノードなどの単一のノードを保持し" "ます。 ``body`` と ``orelse`` はそれぞれノードのリストを保持します。" -#: ../../library/ast.rst:1195 +#: ../../library/ast.rst:1199 msgid "" "``elif`` clauses don't have a special representation in the AST, but rather " "appear as extra :class:`If` nodes within the ``orelse`` section of the " @@ -1697,7 +1704,7 @@ msgstr "" "``elif`` 節は AST において固有の表現を持たず、先行する節をあらわすノードの " "``orelse`` セクションに追加の :class:`If` ノードとして現れます。" -#: ../../library/ast.rst:1199 +#: ../../library/ast.rst:1203 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... if x:\n" @@ -1725,7 +1732,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1229 +#: ../../library/ast.rst:1233 msgid "" "A ``for`` loop. ``target`` holds the variable(s) the loop assigns to, as a " "single :class:`Name`, :class:`Tuple`, :class:`List`, :class:`Attribute` or :" @@ -1735,7 +1742,7 @@ msgid "" "via a ``break`` statement." msgstr "" -#: ../../library/ast.rst:1240 +#: ../../library/ast.rst:1244 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... for x in y:\n" @@ -1756,7 +1763,7 @@ msgid "" " value=Constant(value=Ellipsis))])])" msgstr "" -#: ../../library/ast.rst:1263 +#: ../../library/ast.rst:1267 msgid "" "A ``while`` loop. ``test`` holds the condition, such as a :class:`Compare` " "node." @@ -1764,7 +1771,7 @@ msgstr "" "``while`` ループです。 ``test`` は :class:`Compare` のような条件をあらわす" "ノードを保持します。" -#: ../../library/ast.rst:1266 +#: ../../library/ast.rst:1270 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... while x:\n" @@ -1784,11 +1791,11 @@ msgid "" " value=Constant(value=Ellipsis))])])" msgstr "" -#: ../../library/ast.rst:1289 +#: ../../library/ast.rst:1293 msgid "The ``break`` and ``continue`` statements." msgstr "``break`` 文および ``continue`` 文です。" -#: ../../library/ast.rst:1291 +#: ../../library/ast.rst:1295 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... for a in b:\n" @@ -1817,7 +1824,7 @@ msgid "" " Continue()])])])" msgstr "" -#: ../../library/ast.rst:1322 +#: ../../library/ast.rst:1326 msgid "" "``try`` blocks. All attributes are list of nodes to execute, except for " "``handlers``, which is a list of :class:`ExceptHandler` nodes." @@ -1825,7 +1832,7 @@ msgstr "" "``try`` ブロックです。 :class:`ExceptHandler` ノードのリストである " "``handlers`` を除き、全ての属性はそれぞれの節で実行するノードのリストです。" -#: ../../library/ast.rst:1325 +#: ../../library/ast.rst:1329 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... try:\n" @@ -1865,14 +1872,14 @@ msgid "" " value=Constant(value=Ellipsis))])])" msgstr "" -#: ../../library/ast.rst:1367 +#: ../../library/ast.rst:1371 msgid "" "``try`` blocks which are followed by ``except*`` clauses. The attributes are " "the same as for :class:`Try` but the :class:`ExceptHandler` nodes in " -"``handlers`` are interpreted as ``except*`` blocks rather then ``except``." +"``handlers`` are interpreted as ``except*`` blocks rather than ``except``." msgstr "" -#: ../../library/ast.rst:1371 +#: ../../library/ast.rst:1375 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... try:\n" @@ -1894,7 +1901,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1396 +#: ../../library/ast.rst:1400 msgid "" "A single ``except`` clause. ``type`` is the exception type it will match, " "typically a :class:`Name` node (or ``None`` for a catch-all ``except:`` " @@ -1907,7 +1914,7 @@ msgstr "" "持する変数の名前をあらわす生の文字列で、 ``as foo`` を持たない節の場合は " "``None`` を指定します。 ``body`` はノードのリストです。" -#: ../../library/ast.rst:1401 +#: ../../library/ast.rst:1405 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... try:\n" @@ -1931,7 +1938,7 @@ msgid "" " Pass()])])])" msgstr "" -#: ../../library/ast.rst:1427 +#: ../../library/ast.rst:1431 msgid "" "A ``with`` block. ``items`` is a list of :class:`withitem` nodes " "representing the context managers, and ``body`` is the indented block inside " @@ -1941,7 +1948,7 @@ msgstr "" "テキストマネージャのリストをあらわします。また ``body`` はコンテキスト内にイ" "ンデントされたブロックです。" -#: ../../library/ast.rst:1437 +#: ../../library/ast.rst:1441 msgid "" "A single context manager in a ``with`` block. ``context_expr`` is the " "context manager, often a :class:`Call` node. ``optional_vars`` is a :class:" @@ -1954,7 +1961,7 @@ msgstr "" "class:`Tuple` または :class:`List` のいずれかのノードか、または、この部分が不" "要な場合は ``None`` を設定します。" -#: ../../library/ast.rst:1442 +#: ../../library/ast.rst:1446 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... with a as b, c as d:\n" @@ -1979,18 +1986,18 @@ msgid "" " Name(id='d')]))])])" msgstr "" -#: ../../library/ast.rst:1468 +#: ../../library/ast.rst:1472 msgid "Pattern matching" msgstr "" -#: ../../library/ast.rst:1473 +#: ../../library/ast.rst:1477 msgid "" "A ``match`` statement. ``subject`` holds the subject of the match (the " "object that is being matched against the cases) and ``cases`` contains an " "iterable of :class:`match_case` nodes with the different cases." msgstr "" -#: ../../library/ast.rst:1481 +#: ../../library/ast.rst:1485 msgid "" "A single case pattern in a ``match`` statement. ``pattern`` contains the " "match pattern that the subject will be matched against. Note that the :class:" @@ -1998,19 +2005,19 @@ msgid "" "expressions, even when they share the same syntax." msgstr "" -#: ../../library/ast.rst:1486 +#: ../../library/ast.rst:1490 msgid "" "The ``guard`` attribute contains an expression that will be evaluated if the " "pattern matches the subject." msgstr "" -#: ../../library/ast.rst:1489 +#: ../../library/ast.rst:1493 msgid "" "``body`` contains a list of nodes to execute if the pattern matches and the " "result of evaluating the guard expression is true." msgstr "" -#: ../../library/ast.rst:1492 +#: ../../library/ast.rst:1496 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2045,7 +2052,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1530 +#: ../../library/ast.rst:1534 msgid "" "A match literal or value pattern that compares by equality. ``value`` is an " "expression node. Permitted value nodes are restricted as described in the " @@ -2053,7 +2060,7 @@ msgid "" "equal to the evaluated value." msgstr "" -#: ../../library/ast.rst:1535 +#: ../../library/ast.rst:1539 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2073,14 +2080,14 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1558 +#: ../../library/ast.rst:1562 msgid "" "A match literal pattern that compares by identity. ``value`` is the " "singleton to be compared against: ``None``, ``True``, or ``False``. This " "pattern succeeds if the match subject is the given constant." msgstr "" -#: ../../library/ast.rst:1562 +#: ../../library/ast.rst:1566 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2099,7 +2106,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1584 +#: ../../library/ast.rst:1588 msgid "" "A match sequence pattern. ``patterns`` contains the patterns to be matched " "against the subject elements if the subject is a sequence. Matches a " @@ -2107,7 +2114,7 @@ msgid "" "otherwise matches a fixed length sequence." msgstr "" -#: ../../library/ast.rst:1589 +#: ../../library/ast.rst:1593 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2131,7 +2138,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1616 +#: ../../library/ast.rst:1620 msgid "" "Matches the rest of the sequence in a variable length match sequence " "pattern. If ``name`` is not ``None``, a list containing the remaining " @@ -2139,7 +2146,7 @@ msgid "" "successful." msgstr "" -#: ../../library/ast.rst:1620 +#: ../../library/ast.rst:1624 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2173,7 +2180,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1657 +#: ../../library/ast.rst:1661 msgid "" "A match mapping pattern. ``keys`` is a sequence of expression nodes. " "``patterns`` is a corresponding sequence of pattern nodes. ``rest`` is an " @@ -2182,7 +2189,7 @@ msgid "" "statement documentation." msgstr "" -#: ../../library/ast.rst:1663 +#: ../../library/ast.rst:1667 msgid "" "This pattern succeeds if the subject is a mapping, all evaluated key " "expressions are present in the mapping, and the value corresponding to each " @@ -2191,7 +2198,7 @@ msgid "" "overall mapping pattern is successful." msgstr "" -#: ../../library/ast.rst:1669 +#: ../../library/ast.rst:1673 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2223,7 +2230,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1704 +#: ../../library/ast.rst:1708 msgid "" "A match class pattern. ``cls`` is an expression giving the nominal class to " "be matched. ``patterns`` is a sequence of pattern nodes to be matched " @@ -2234,21 +2241,21 @@ msgid "" "pattern)." msgstr "" -#: ../../library/ast.rst:1711 +#: ../../library/ast.rst:1715 msgid "" "This pattern succeeds if the subject is an instance of the nominated class, " "all positional patterns match the corresponding class-defined attributes, " "and any specified keyword attributes match their corresponding pattern." msgstr "" -#: ../../library/ast.rst:1715 +#: ../../library/ast.rst:1719 msgid "" "Note: classes may define a property that returns self in order to match a " "pattern node against the instance being matched. Several builtin types are " "also matched that way, as described in the match statement documentation." msgstr "" -#: ../../library/ast.rst:1719 +#: ../../library/ast.rst:1723 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2292,7 +2299,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1766 +#: ../../library/ast.rst:1770 msgid "" "A match \"as-pattern\", capture pattern or wildcard pattern. ``pattern`` " "contains the match pattern that the subject will be matched against. If the " @@ -2300,14 +2307,14 @@ msgid "" "and will always succeed." msgstr "" -#: ../../library/ast.rst:1771 +#: ../../library/ast.rst:1775 msgid "" "The ``name`` attribute contains the name that will be bound if the pattern " "is successful. If ``name`` is ``None``, ``pattern`` must also be ``None`` " "and the node represents the wildcard pattern." msgstr "" -#: ../../library/ast.rst:1775 +#: ../../library/ast.rst:1779 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2337,7 +2344,7 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1808 +#: ../../library/ast.rst:1812 msgid "" "A match \"or-pattern\". An or-pattern matches each of its subpatterns in " "turn to the subject, until one succeeds. The or-pattern is then deemed to " @@ -2346,7 +2353,7 @@ msgid "" "matched against the subject." msgstr "" -#: ../../library/ast.rst:1814 +#: ../../library/ast.rst:1818 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\n" "... match x:\n" @@ -2370,17 +2377,17 @@ msgid "" " value=Constant(value=Ellipsis))])])])" msgstr "" -#: ../../library/ast.rst:1841 +#: ../../library/ast.rst:1845 msgid "Type annotations" msgstr "" -#: ../../library/ast.rst:1845 +#: ../../library/ast.rst:1849 msgid "" "A ``# type: ignore`` comment located at *lineno*. *tag* is the optional tag " "specified by the form ``# type: ignore ``." msgstr "" -#: ../../library/ast.rst:1848 +#: ../../library/ast.rst:1852 msgid "" ">>> print(ast.dump(ast.parse('x = 1 # type: ignore', type_comments=True), " "indent=4))\n" @@ -2405,24 +2412,24 @@ msgid "" " TypeIgnore(lineno=1, tag='[assignment]')])" msgstr "" -#: ../../library/ast.rst:1871 +#: ../../library/ast.rst:1875 msgid "" ":class:`!TypeIgnore` nodes are not generated when the *type_comments* " "parameter is set to ``False`` (default). See :func:`ast.parse` for more " "details." msgstr "" -#: ../../library/ast.rst:1879 +#: ../../library/ast.rst:1883 msgid "Type parameters" msgstr "" -#: ../../library/ast.rst:1881 +#: ../../library/ast.rst:1885 msgid "" ":ref:`Type parameters ` can exist on classes, functions, and " "type aliases." msgstr "" -#: ../../library/ast.rst:1886 +#: ../../library/ast.rst:1890 msgid "" "A :class:`typing.TypeVar`. ``name`` is the name of the type variable. " "``bound`` is the bound or constraints, if any. If ``bound`` is a :class:" @@ -2431,7 +2438,7 @@ msgid "" "default, this attribute will be set to ``None``." msgstr "" -#: ../../library/ast.rst:1892 +#: ../../library/ast.rst:1896 msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[T: int = bool] = list[T]\"), " "indent=4))\n" @@ -2449,19 +2456,19 @@ msgid "" " slice=Name(id='T')))])" msgstr "" -#: ../../library/ast.rst:1910 ../../library/ast.rst:1942 -#: ../../library/ast.rst:1969 +#: ../../library/ast.rst:1914 ../../library/ast.rst:1946 +#: ../../library/ast.rst:1973 msgid "Added the *default_value* parameter." msgstr "" -#: ../../library/ast.rst:1915 +#: ../../library/ast.rst:1919 msgid "" "A :class:`typing.ParamSpec`. ``name`` is the name of the parameter " "specification. ``default_value`` is the default value; if the :class:`!" "ParamSpec` has no default, this attribute will be set to ``None``." msgstr "" -#: ../../library/ast.rst:1919 +#: ../../library/ast.rst:1923 msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[**P = [int, str]] = Callable[P, " "int]\"), indent=4))\n" @@ -2484,14 +2491,14 @@ msgid "" " Name(id='int')])))])" msgstr "" -#: ../../library/ast.rst:1947 +#: ../../library/ast.rst:1951 msgid "" "A :class:`typing.TypeVarTuple`. ``name`` is the name of the type variable " "tuple. ``default_value`` is the default value; if the :class:`!TypeVarTuple` " "has no default, this attribute will be set to ``None``." msgstr "" -#: ../../library/ast.rst:1951 +#: ../../library/ast.rst:1955 msgid "" ">>> print(ast.dump(ast.parse(\"type Alias[*Ts = ()] = tuple[*Ts]\"), " "indent=4))\n" @@ -2509,27 +2516,27 @@ msgid "" " value=Name(id='Ts'))])))])" msgstr "" -#: ../../library/ast.rst:1973 +#: ../../library/ast.rst:1977 msgid "Function and class definitions" msgstr "関数およびクラス定義" -#: ../../library/ast.rst:1977 +#: ../../library/ast.rst:1981 msgid "A function definition." msgstr "関数定義です。" -#: ../../library/ast.rst:1979 +#: ../../library/ast.rst:1983 msgid "``name`` is a raw string of the function name." msgstr "``name`` は関数名をあらわす生の文字列です。" -#: ../../library/ast.rst:1980 +#: ../../library/ast.rst:1984 msgid "``args`` is an :class:`arguments` node." msgstr "``args`` は引数をあらわす :class:`arguments` ノードです。" -#: ../../library/ast.rst:1981 +#: ../../library/ast.rst:1985 msgid "``body`` is the list of nodes inside the function." msgstr "``body`` は関数の本体をあらわすノードのリストです。" -#: ../../library/ast.rst:1982 +#: ../../library/ast.rst:1986 msgid "" "``decorator_list`` is the list of decorators to be applied, stored outermost " "first (i.e. the first in the list will be applied last)." @@ -2538,20 +2545,20 @@ msgstr "" "リストの先頭に保存されます (すなわち、リストの先頭にあるデコレータが最後に適" "用されます)。" -#: ../../library/ast.rst:1984 +#: ../../library/ast.rst:1988 msgid "``returns`` is the return annotation." msgstr "``returns`` は戻り値に対する注釈です。" -#: ../../library/ast.rst:1985 ../../library/ast.rst:2148 +#: ../../library/ast.rst:1989 ../../library/ast.rst:2152 msgid "``type_params`` is a list of :ref:`type parameters `." msgstr "" -#: ../../library/ast.rst:1991 ../../library/ast.rst:2175 -#: ../../library/ast.rst:2186 +#: ../../library/ast.rst:1995 ../../library/ast.rst:2179 +#: ../../library/ast.rst:2190 msgid "Added ``type_params``." msgstr "" -#: ../../library/ast.rst:1997 +#: ../../library/ast.rst:2001 msgid "" "``lambda`` is a minimal function definition that can be used inside an " "expression. Unlike :class:`FunctionDef`, ``body`` holds a single node." @@ -2559,7 +2566,7 @@ msgstr "" "``lambda`` は式の中で使うことができる最小限の関数定義です。 :class:" "`FunctionDef` ノードと異なり、 ``body`` は単一のノードとなります。" -#: ../../library/ast.rst:2000 +#: ../../library/ast.rst:2004 msgid "" ">>> print(ast.dump(ast.parse('lambda x,y: ...'), indent=4))\n" "Module(\n" @@ -2573,18 +2580,18 @@ msgid "" " body=Constant(value=Ellipsis)))])" msgstr "" -#: ../../library/ast.rst:2016 +#: ../../library/ast.rst:2020 msgid "The arguments for a function." msgstr "関数の引数" -#: ../../library/ast.rst:2018 +#: ../../library/ast.rst:2022 msgid "" "``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes." msgstr "" "``posonlyargs``, ``args`` および ``kwonlyargs`` はそれぞれ :class:`arg` ノー" "ドのリストです。" -#: ../../library/ast.rst:2019 +#: ../../library/ast.rst:2023 msgid "" "``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the " "``*args, **kwargs`` parameters." @@ -2592,7 +2599,7 @@ msgstr "" "``vararg`` と ``kwarg`` はそれぞれ単一の :class:`arg` ノードで、 ``*args, " "**kwargs`` パラメータに相当します。" -#: ../../library/ast.rst:2021 +#: ../../library/ast.rst:2025 msgid "" "``kw_defaults`` is a list of default values for keyword-only arguments. If " "one is ``None``, the corresponding argument is required." @@ -2600,7 +2607,7 @@ msgstr "" "``kw_defaults`` はキーワード専用引数に対するデフォルト値のリストです。値が " "``None`` の場合、対応する引数は必須となります。" -#: ../../library/ast.rst:2023 +#: ../../library/ast.rst:2027 msgid "" "``defaults`` is a list of default values for arguments that can be passed " "positionally. If there are fewer defaults, they correspond to the last n " @@ -2610,20 +2617,20 @@ msgstr "" "です。デフォルト値の数nが位置引数の数より少ない場合、それらは最後のn個の引数" "に割り当てられます。" -#: ../../library/ast.rst:2030 +#: ../../library/ast.rst:2034 msgid "" "A single argument in a list. ``arg`` is a raw string of the argument name; " "``annotation`` is its annotation, such as a :class:`Name` node." msgstr "" -#: ../../library/ast.rst:2035 +#: ../../library/ast.rst:2039 msgid "" "``type_comment`` is an optional string with the type annotation as a comment" msgstr "" "``type_comment`` はコメントとして型アノテーションをあらわすオプション文字列で" "す。" -#: ../../library/ast.rst:2037 +#: ../../library/ast.rst:2041 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... @decorator1\n" @@ -2662,11 +2669,11 @@ msgid "" " returns=Constant(value='return annotation'))])" msgstr "" -#: ../../library/ast.rst:2077 +#: ../../library/ast.rst:2081 msgid "A ``return`` statement." msgstr "``return`` 文です。" -#: ../../library/ast.rst:2079 +#: ../../library/ast.rst:2083 msgid "" ">>> print(ast.dump(ast.parse('return 4'), indent=4))\n" "Module(\n" @@ -2675,14 +2682,14 @@ msgid "" " value=Constant(value=4))])" msgstr "" -#: ../../library/ast.rst:2091 +#: ../../library/ast.rst:2095 msgid "" "A ``yield`` or ``yield from`` expression. Because these are expressions, " "they must be wrapped in an :class:`Expr` node if the value sent back is not " "used." msgstr "" -#: ../../library/ast.rst:2094 +#: ../../library/ast.rst:2098 msgid "" ">>> print(ast.dump(ast.parse('yield x'), indent=4))\n" "Module(\n" @@ -2699,13 +2706,13 @@ msgid "" " value=Name(id='x')))])" msgstr "" -#: ../../library/ast.rst:2114 +#: ../../library/ast.rst:2118 msgid "" "``global`` and ``nonlocal`` statements. ``names`` is a list of raw strings." msgstr "" "``global`` および ``nonlocal`` 文です。 ``names`` は生の文字列のリストです。" -#: ../../library/ast.rst:2116 +#: ../../library/ast.rst:2120 msgid "" ">>> print(ast.dump(ast.parse('global x,y,z'), indent=4))\n" "Module(\n" @@ -2726,38 +2733,38 @@ msgid "" " 'z'])])" msgstr "" -#: ../../library/ast.rst:2139 +#: ../../library/ast.rst:2143 msgid "A class definition." msgstr "クラス定義です。" -#: ../../library/ast.rst:2141 +#: ../../library/ast.rst:2145 msgid "``name`` is a raw string for the class name" msgstr "``name`` はクラス名をあらわす生の文字列です。" -#: ../../library/ast.rst:2142 +#: ../../library/ast.rst:2146 msgid "``bases`` is a list of nodes for explicitly specified base classes." msgstr "``bases`` は明示的に指定された基底クラスをあらわすノードのリストです。" -#: ../../library/ast.rst:2143 +#: ../../library/ast.rst:2147 msgid "" "``keywords`` is a list of :class:`.keyword` nodes, principally for " "'metaclass'. Other keywords will be passed to the metaclass, as per :pep:" "`3115`." msgstr "" -#: ../../library/ast.rst:2145 +#: ../../library/ast.rst:2149 msgid "" "``body`` is a list of nodes representing the code within the class " "definition." msgstr "``body`` はクラス定義に含まれるコードをあらわすノードのリストです。" -#: ../../library/ast.rst:2147 +#: ../../library/ast.rst:2151 msgid "``decorator_list`` is a list of nodes, as in :class:`FunctionDef`." msgstr "" "``decorator_list`` はノードのリストで、関数定義 :class:`FunctionDef` の場合と" "同様に解釈されます。" -#: ../../library/ast.rst:2150 +#: ../../library/ast.rst:2154 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... @decorator1\n" @@ -2783,11 +2790,11 @@ msgid "" " Name(id='decorator2')])])" msgstr "" -#: ../../library/ast.rst:2179 +#: ../../library/ast.rst:2183 msgid "Async and await" msgstr "async と await" -#: ../../library/ast.rst:2183 +#: ../../library/ast.rst:2187 msgid "" "An ``async def`` function definition. Has the same fields as :class:" "`FunctionDef`." @@ -2795,7 +2802,7 @@ msgstr "" "``async def`` 形式の関数定義です。通常の関数定義 :class:`FunctionDef` と同じ" "フィールドを持ちます。" -#: ../../library/ast.rst:2192 +#: ../../library/ast.rst:2196 msgid "" "An ``await`` expression. ``value`` is what it waits for. Only valid in the " "body of an :class:`AsyncFunctionDef`." @@ -2803,7 +2810,7 @@ msgstr "" "``await`` 式をあらわします。 ``value`` は待ち受ける値です。 :class:" "`AsyncFunctionDef` の本体 (body) の中でのみ有効です。" -#: ../../library/ast.rst:2195 +#: ../../library/ast.rst:2199 msgid "" ">>> print(ast.dump(ast.parse(\"\"\"\\\n" "... async def f():\n" @@ -2821,7 +2828,7 @@ msgid "" " func=Name(id='other_func'))))])])" msgstr "" -#: ../../library/ast.rst:2216 +#: ../../library/ast.rst:2220 msgid "" "``async for`` loops and ``async with`` context managers. They have the same " "fields as :class:`For` and :class:`With`, respectively. Only valid in the " @@ -2831,7 +2838,7 @@ msgstr "" "class:`For` および :class:`With` と同じフィールドを持ちます。 :class:" "`AsyncFunctionDef` の本体 (body) の中でのみ有効です。" -#: ../../library/ast.rst:2221 +#: ../../library/ast.rst:2225 msgid "" "When a string is parsed by :func:`ast.parse`, operator nodes (subclasses of :" "class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." @@ -2840,17 +2847,17 @@ msgid "" "same value (for example, :class:`ast.Add`)." msgstr "" -#: ../../library/ast.rst:2229 +#: ../../library/ast.rst:2233 msgid ":mod:`!ast` helpers" msgstr "" -#: ../../library/ast.rst:2231 +#: ../../library/ast.rst:2235 msgid "" "Apart from the node classes, the :mod:`!ast` module defines these utility " "functions and classes for traversing abstract syntax trees:" msgstr "" -#: ../../library/ast.rst:2236 +#: ../../library/ast.rst:2240 msgid "" "Parse the source into an AST node. Equivalent to ``compile(source, " "filename, mode, flags=FLAGS_VALUE, optimize=optimize, module=module)``, " @@ -2858,7 +2865,7 @@ msgid "" "``ast.PyCF_OPTIMIZED_AST`` otherwise." msgstr "" -#: ../../library/ast.rst:2241 +#: ../../library/ast.rst:2245 msgid "" "If ``type_comments=True`` is given, the parser is modified to check and " "return type comments as specified by :pep:`484` and :pep:`526`. This is " @@ -2871,7 +2878,7 @@ msgid "" "empty list)." msgstr "" -#: ../../library/ast.rst:2251 +#: ../../library/ast.rst:2255 msgid "" "In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to " "correspond to :pep:`484` \"signature type comments\", e.g. ``(str, int) -> " @@ -2881,7 +2888,7 @@ msgstr "" "-> List[str]`` のような :pep:`484` の \"シグネチャ型コメント (signature type " "comments)\" に対応するように修正されます。" -#: ../../library/ast.rst:2255 +#: ../../library/ast.rst:2259 msgid "" "Setting ``feature_version`` to a tuple ``(major, minor)`` will result in a " "\"best-effort\" attempt to parse using that Python version's grammar. For " @@ -2894,12 +2901,12 @@ msgid "" "``feature_version``." msgstr "" -#: ../../library/ast.rst:2265 +#: ../../library/ast.rst:2269 msgid "" "If source contains a null character (``\\0``), :exc:`ValueError` is raised." msgstr "" -#: ../../library/ast.rst:2268 +#: ../../library/ast.rst:2272 msgid "" "Note that successfully parsing source code into an AST object doesn't " "guarantee that the source code provided is valid Python code that can be " @@ -2909,13 +2916,13 @@ msgid "" "inside a function node)." msgstr "" -#: ../../library/ast.rst:2275 +#: ../../library/ast.rst:2279 msgid "" "In particular, :func:`ast.parse` won't do any scoping checks, which the " "compilation step does." msgstr "" -#: ../../library/ast.rst:2279 +#: ../../library/ast.rst:2283 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string due to stack depth limitations in Python's AST compiler." @@ -2924,23 +2931,23 @@ msgstr "" "タックの深さの限界を越えることで、 Python インタプリタをクラッシュさせること" "ができます。" -#: ../../library/ast.rst:2283 +#: ../../library/ast.rst:2287 msgid "Added ``type_comments``, ``mode='func_type'`` and ``feature_version``." msgstr "" "``type_comments``、``mode='func_type'``、``feature_version`` が追加されまし" "た。" -#: ../../library/ast.rst:2286 +#: ../../library/ast.rst:2290 msgid "" "The minimum supported version for ``feature_version`` is now ``(3, 7)``. The " "``optimize`` argument was added." msgstr "" -#: ../../library/ast.rst:2290 +#: ../../library/ast.rst:2294 msgid "Added the *module* parameter." msgstr "*module* 引数が追加されました。" -#: ../../library/ast.rst:2296 +#: ../../library/ast.rst:2300 msgid "" "Unparse an :class:`ast.AST` object and generate a string with code that " "would produce an equivalent :class:`ast.AST` object if parsed back with :" @@ -2949,7 +2956,7 @@ msgstr "" ":class:`ast.AST` オブジェクトを逆に構文解析して、 :func:`ast.parse` が元の :" "class:`ast.AST` と等価なオブジェクトを生成できるような文字列を生成します。" -#: ../../library/ast.rst:2301 +#: ../../library/ast.rst:2305 msgid "" "The produced code string will not necessarily be equal to the original code " "that generated the :class:`ast.AST` object (without any compiler " @@ -2959,14 +2966,14 @@ msgstr "" "と必ずしも等価であるとは限りません (定数タプルや frozenset などに対するコンパ" "イラ最適化なしのコードです)。" -#: ../../library/ast.rst:2306 +#: ../../library/ast.rst:2310 msgid "" "Trying to unparse a highly complex expression would result with :exc:" "`RecursionError`." msgstr "" "非常に複雑な式を逆構文解析すると :exc:`RecursionError` となることがあります。" -#: ../../library/ast.rst:2314 +#: ../../library/ast.rst:2318 msgid "" "Evaluate an expression node or a string containing only a Python literal or " "container display. The string or node provided may only consist of the " @@ -2978,7 +2985,7 @@ msgstr "" "ます: 文字列、バイト列、数、タプル、リスト、辞書、集合、ブール値、``None``、" "``Ellipsis``。" -#: ../../library/ast.rst:2319 +#: ../../library/ast.rst:2323 msgid "" "This can be used for evaluating strings containing Python values without the " "need to parse the values oneself. It is not capable of evaluating " @@ -2988,7 +2995,7 @@ msgstr "" "に使えます。この関数は、例えば演算や添え字を含んだ任意の複雑な表現を評価する" "のには使えません。" -#: ../../library/ast.rst:2324 +#: ../../library/ast.rst:2328 msgid "" "This function had been documented as \"safe\" in the past without defining " "what that meant. That was misleading. This is specifically designed not to " @@ -3000,7 +3007,7 @@ msgid "" "untrusted data is thus not recommended." msgstr "" -#: ../../library/ast.rst:2334 +#: ../../library/ast.rst:2338 msgid "" "It is possible to crash the Python interpreter due to stack depth " "limitations in Python's AST compiler." @@ -3008,25 +3015,25 @@ msgstr "" "Python の抽象構文木コンパイラのスタックの深さの限界を越えることで、 Python イ" "ンタプリタをクラッシュさせる可能性があります。" -#: ../../library/ast.rst:2337 +#: ../../library/ast.rst:2341 msgid "" "It can raise :exc:`ValueError`, :exc:`TypeError`, :exc:`SyntaxError`, :exc:" "`MemoryError` and :exc:`RecursionError` depending on the malformed input." msgstr "" -#: ../../library/ast.rst:2341 +#: ../../library/ast.rst:2345 msgid "Now allows bytes and set literals." msgstr "バイト列リテラルと集合リテラルが受け取れるようになりました。" -#: ../../library/ast.rst:2344 +#: ../../library/ast.rst:2348 msgid "Now supports creating empty sets with ``'set()'``." msgstr "``'set()'`` による空の集合の生成をサポートするようになりました。" -#: ../../library/ast.rst:2347 +#: ../../library/ast.rst:2351 msgid "For string inputs, leading spaces and tabs are now stripped." msgstr "" -#: ../../library/ast.rst:2353 +#: ../../library/ast.rst:2357 msgid "" "Return the docstring of the given *node* (which must be a :class:" "`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" @@ -3039,11 +3046,11 @@ msgstr "" "します。 *clean* が真ならば、ドキュメント文字列のインデントを :func:`inspect." "cleandoc` を用いて一掃します。" -#: ../../library/ast.rst:2359 +#: ../../library/ast.rst:2363 msgid ":class:`AsyncFunctionDef` is now supported." msgstr ":class:`AsyncFunctionDef` がサポートされました。" -#: ../../library/ast.rst:2365 +#: ../../library/ast.rst:2369 msgid "" "Get source code segment of the *source* that generated *node*. If some " "location information (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.end_lineno`, :" @@ -3051,7 +3058,7 @@ msgid "" "return ``None``." msgstr "" -#: ../../library/ast.rst:2369 +#: ../../library/ast.rst:2373 msgid "" "If *padded* is ``True``, the first line of a multi-line statement will be " "padded with spaces to match its original position." @@ -3059,7 +3066,7 @@ msgstr "" "*padded* が ``True`` の場合、複数行にわたる文の最初の行が元の位置に一致するよ" "うに空白文字でパディングされます。" -#: ../../library/ast.rst:2377 +#: ../../library/ast.rst:2381 msgid "" "When you compile a node tree with :func:`compile`, the compiler expects :" "attr:`~ast.AST.lineno` and :attr:`~ast.AST.col_offset` attributes for every " @@ -3069,7 +3076,7 @@ msgid "" "starting at *node*." msgstr "" -#: ../../library/ast.rst:2386 +#: ../../library/ast.rst:2390 msgid "" "Increment the line number and end line number of each node in the tree " "starting at *node* by *n*. This is useful to \"move code\" to a different " @@ -3078,14 +3085,14 @@ msgstr "" "*node* で始まるツリー内の各ノードの行番号と終了行番号を *n* ずつ増やします。" "これはファイルの中で別の場所に \"コードを移動する\" ときに便利です。" -#: ../../library/ast.rst:2393 +#: ../../library/ast.rst:2397 msgid "" "Copy source location (:attr:`~ast.AST.lineno`, :attr:`~ast.AST.col_offset`, :" "attr:`~ast.AST.end_lineno`, and :attr:`~ast.AST.end_col_offset`) from " "*old_node* to *new_node* if possible, and return *new_node*." msgstr "" -#: ../../library/ast.rst:2400 +#: ../../library/ast.rst:2404 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." @@ -3093,7 +3100,7 @@ msgstr "" "*node* にある ``node._fields`` のそれぞれのフィールドを ``(フィールド名, " "値)`` のタプルとして yield します。" -#: ../../library/ast.rst:2406 +#: ../../library/ast.rst:2410 msgid "" "Yield all direct child nodes of *node*, that is, all fields that are nodes " "and all items of fields that are lists of nodes." @@ -3102,7 +3109,7 @@ msgstr "" "ドであるような全てのフィールドおよびノードのリストであるようなフィールドの全" "てのアイテムです。" -#: ../../library/ast.rst:2412 +#: ../../library/ast.rst:2416 msgid "" "Recursively yield all descendant nodes in the tree starting at *node* " "(including *node* itself), in no specified order. This is useful if you " @@ -3112,7 +3119,7 @@ msgstr "" "められていません。この関数はノードをその場で変更するだけで文脈を気にしないよ" "うな場合に便利です。" -#: ../../library/ast.rst:2419 +#: ../../library/ast.rst:2423 msgid "" "A node visitor base class that walks the abstract syntax tree and calls a " "visitor function for every node found. This function may return a value " @@ -3122,7 +3129,7 @@ msgstr "" "ターの基底クラスです。この関数は :meth:`visit` メソッドに送られる値を返しても" "かまいません。" -#: ../../library/ast.rst:2423 +#: ../../library/ast.rst:2427 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." @@ -3130,7 +3137,7 @@ msgstr "" "このクラスはビジター・メソッドを付け加えたサブクラスを派生させることを意図し" "ています。" -#: ../../library/ast.rst:2428 +#: ../../library/ast.rst:2432 msgid "" "Visit a node. The default implementation calls the method called :samp:" "`self.visit_{classname}` where *classname* is the name of the node class, " @@ -3140,11 +3147,11 @@ msgstr "" "メソッド (ここで *classname* はノードのクラス名です) を呼び出すか、そのメソッ" "ドがなければ :meth:`generic_visit` を呼び出します。" -#: ../../library/ast.rst:2434 +#: ../../library/ast.rst:2438 msgid "This visitor calls :meth:`visit` on all children of the node." msgstr "このビジターはノードの全ての子について :meth:`visit` を呼び出します。" -#: ../../library/ast.rst:2436 +#: ../../library/ast.rst:2440 msgid "" "Note that child nodes of nodes that have a custom visitor method won't be " "visited unless the visitor calls :meth:`generic_visit` or visits them itself." @@ -3153,11 +3160,11 @@ msgstr "" "ビジターが :meth:`generic_visit` を呼び出すかそれ自身で子ノードを訪れない限り" "訪れられないということです。" -#: ../../library/ast.rst:2442 +#: ../../library/ast.rst:2446 msgid "Handles all constant nodes." msgstr "" -#: ../../library/ast.rst:2444 +#: ../../library/ast.rst:2448 msgid "" "Don't use the :class:`NodeVisitor` if you want to apply changes to nodes " "during traversal. For this a special visitor exists (:class:" @@ -3167,7 +3174,7 @@ msgstr "" "いけません。そうした目的のために変更を許す特別なビジター (:class:" "`NodeTransformer`) があります。" -#: ../../library/ast.rst:2450 +#: ../../library/ast.rst:2454 msgid "" "Methods :meth:`!visit_Num`, :meth:`!visit_Str`, :meth:`!visit_Bytes`, :meth:" "`!visit_NameConstant` and :meth:`!visit_Ellipsis` will not be called in " @@ -3175,7 +3182,7 @@ msgid "" "constant nodes." msgstr "" -#: ../../library/ast.rst:2458 +#: ../../library/ast.rst:2462 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." @@ -3183,7 +3190,7 @@ msgstr "" ":class:`NodeVisitor` のサブクラスで抽象構文木を渡り歩きながらノードを変更する" "ことを許すものです。" -#: ../../library/ast.rst:2461 +#: ../../library/ast.rst:2465 msgid "" "The :class:`NodeTransformer` will walk the AST and use the return value of " "the visitor methods to replace or remove the old node. If the return value " @@ -3197,7 +3204,7 @@ msgstr "" "置き換えられます。置き換えない場合は戻り値が元のノードそのものであってもかま" "いません。" -#: ../../library/ast.rst:2467 +#: ../../library/ast.rst:2471 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" @@ -3205,7 +3212,7 @@ msgstr "" "それでは例を示しましょう。Name (たとえば ``foo``) を見つけるたび全て " "``data['foo']`` に書き換える変換器 (transformer) です::" -#: ../../library/ast.rst:2470 +#: ../../library/ast.rst:2474 msgid "" "class RewriteName(NodeTransformer):\n" "\n" @@ -3217,14 +3224,14 @@ msgid "" " )" msgstr "" -#: ../../library/ast.rst:2479 +#: ../../library/ast.rst:2483 msgid "" "Keep in mind that if the node you're operating on has child nodes you must " "either transform the child nodes yourself or call the :meth:`~ast." "NodeVisitor.generic_visit` method for the node first." msgstr "" -#: ../../library/ast.rst:2483 +#: ../../library/ast.rst:2487 msgid "" "For nodes that were part of a collection of statements (that applies to all " "statement nodes), the visitor may also return a list of nodes rather than " @@ -3233,7 +3240,7 @@ msgstr "" "文のコレクションであるようなノード (全ての文のノードが当てはまります) に対し" "て、このビジターは単独のノードではなくノードのリストを返すかもしれません。" -#: ../../library/ast.rst:2487 +#: ../../library/ast.rst:2491 msgid "" "If :class:`NodeTransformer` introduces new nodes (that weren't part of " "original tree) without giving them location information (such as :attr:`~ast." @@ -3241,21 +3248,21 @@ msgid "" "sub-tree to recalculate the location information::" msgstr "" -#: ../../library/ast.rst:2492 +#: ../../library/ast.rst:2496 msgid "" "tree = ast.parse('foo', mode='eval')\n" "new_tree = fix_missing_locations(RewriteName().visit(tree))" msgstr "" -#: ../../library/ast.rst:2495 +#: ../../library/ast.rst:2499 msgid "Usually you use the transformer like this::" msgstr "たいてい、変換器の使い方は次のようになります::" -#: ../../library/ast.rst:2497 +#: ../../library/ast.rst:2501 msgid "node = YourTransformer().visit(node)" msgstr "" -#: ../../library/ast.rst:2502 +#: ../../library/ast.rst:2506 msgid "" "Return a formatted dump of the tree in *node*. This is mainly useful for " "debugging purposes. If *annotate_fields* is true (by default), the returned " @@ -3272,14 +3279,14 @@ msgstr "" "号や列オフセットのような属性はデフォルトではダンプされません。これが必要であ" "れば、 *include_attributes* を true にすると表示できます。" -#: ../../library/ast.rst:2510 +#: ../../library/ast.rst:2514 msgid "" "If *color* is ``True``, the returned string is syntax highlighted using ANSI " "escape sequences. If ``False`` (the default), colored output is always " "disabled." msgstr "" -#: ../../library/ast.rst:2514 +#: ../../library/ast.rst:2518 msgid "" "If *indent* is a non-negative integer or string, then the tree will be " "pretty-printed with that indent level. An indent level of 0, negative, or " @@ -3295,14 +3302,14 @@ msgstr "" "インデントされます。 *indent* が文字列 (``\"\\t\"`` など) の場合、その文字列" "が各レベルのインデントに使われます。" -#: ../../library/ast.rst:2521 +#: ../../library/ast.rst:2525 msgid "" "If *show_empty* is false (the default), optional empty lists and ``Load()`` " "values will be omitted from the output. Optional ``None`` values are always " "omitted." msgstr "" -#: ../../library/ast.rst:2525 +#: ../../library/ast.rst:2529 msgid "" ">>> tree = ast.parse('print(None)', '?', 'eval')\n" ">>> print(ast.dump(tree, indent=4))\n" @@ -3320,27 +3327,27 @@ msgid "" " keywords=[]))" msgstr "" -#: ../../library/ast.rst:2542 +#: ../../library/ast.rst:2546 msgid "Added the *indent* option." msgstr "*indent* オプションを追加しました。" -#: ../../library/ast.rst:2545 +#: ../../library/ast.rst:2549 msgid "Added the *show_empty* option." msgstr "" -#: ../../library/ast.rst:2548 +#: ../../library/ast.rst:2552 msgid "Omit optional ``Load()`` values by default." msgstr "" -#: ../../library/ast.rst:2551 +#: ../../library/ast.rst:2555 msgid "Added the *color* parameter." msgstr "" -#: ../../library/ast.rst:2557 +#: ../../library/ast.rst:2561 msgid "Recursively compares two ASTs." msgstr "" -#: ../../library/ast.rst:2559 +#: ../../library/ast.rst:2563 msgid "" "*compare_attributes* affects whether AST attributes are considered in the " "comparison. If *compare_attributes* is ``False`` (default), then attributes " @@ -3349,11 +3356,11 @@ msgid "" "similar details. Attributes include line numbers and column offsets." msgstr "" -#: ../../library/ast.rst:2572 +#: ../../library/ast.rst:2576 msgid "Compiler flags" msgstr "" -#: ../../library/ast.rst:2574 +#: ../../library/ast.rst:2578 msgid "" "The following flags may be passed to :func:`compile` in order to change " "effects on the compilation of a program:" @@ -3361,7 +3368,7 @@ msgstr "" "以下のフラグはプログラムのコンパイルにおける効果を変更するために :func:" "`compile` に渡すことができます:" -#: ../../library/ast.rst:2579 +#: ../../library/ast.rst:2583 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." @@ -3369,20 +3376,20 @@ msgstr "" "トップレベルの ``await``, ``async for``, ``async with`` および async 内包表記" "のサポートを有効化します。" -#: ../../library/ast.rst:2586 +#: ../../library/ast.rst:2590 msgid "" "Generates and returns an abstract syntax tree instead of returning a " "compiled code object." msgstr "" "コンパイルされたコードオブジェクトの代わりに抽象構文木を生成して返します。" -#: ../../library/ast.rst:2591 +#: ../../library/ast.rst:2595 msgid "" "The returned AST is optimized according to the *optimize* argument in :func:" "`compile` or :func:`ast.parse`." msgstr "" -#: ../../library/ast.rst:2598 +#: ../../library/ast.rst:2602 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." @@ -3390,35 +3397,35 @@ msgstr "" ":pep:`484` および :pep:`526` 形式の型コメント (``# type: ``, ``# type: " "ignore ``) のサポートを有効化します。" -#: ../../library/ast.rst:2607 +#: ../../library/ast.rst:2611 msgid "Command-line usage" msgstr "コマンドラインでの使用" -#: ../../library/ast.rst:2611 +#: ../../library/ast.rst:2615 msgid "" "The output is now syntax highlighted by default. This can be :ref:" "`controlled using environment variables `." msgstr "" -#: ../../library/ast.rst:2615 +#: ../../library/ast.rst:2619 msgid "" "The :mod:`!ast` module can be executed as a script from the command line. It " "is as simple as:" msgstr "" -#: ../../library/ast.rst:2618 +#: ../../library/ast.rst:2622 msgid "python -m ast [-m ] [-a] [infile]" msgstr "" -#: ../../library/ast.rst:2622 +#: ../../library/ast.rst:2626 msgid "The following options are accepted:" msgstr "以下のオプションが使用できます:" -#: ../../library/ast.rst:2628 +#: ../../library/ast.rst:2632 msgid "Show the help message and exit." msgstr "ヘルプメッセージを表示して終了します。" -#: ../../library/ast.rst:2633 +#: ../../library/ast.rst:2637 msgid "" "Specify what kind of code must be compiled, like the *mode* argument in :" "func:`parse`." @@ -3426,35 +3433,35 @@ msgstr "" ":func:`parse` 関数の *mode* 引数と同様、コンパイルするコードの種類を指定しま" "す。" -#: ../../library/ast.rst:2638 +#: ../../library/ast.rst:2642 msgid "Don't parse type comments." msgstr "型コメントをパースしません。" -#: ../../library/ast.rst:2642 +#: ../../library/ast.rst:2646 msgid "Include attributes such as line numbers and column offsets." msgstr "行番号や列オフセットなどの属性を含めます。" -#: ../../library/ast.rst:2647 +#: ../../library/ast.rst:2651 msgid "Indentation of nodes in AST (number of spaces)." msgstr "AST におけるノードのインデント (空白の数) です。" -#: ../../library/ast.rst:2651 +#: ../../library/ast.rst:2655 msgid "" "Python version in the format 3.x (for example, 3.10). Defaults to the " "current version of the interpreter." msgstr "" -#: ../../library/ast.rst:2659 +#: ../../library/ast.rst:2663 msgid "Optimization level for parser. Defaults to no optimization." msgstr "" -#: ../../library/ast.rst:2665 +#: ../../library/ast.rst:2669 msgid "" "Show empty lists and fields that are ``None``. Defaults to not showing empty " "objects." msgstr "" -#: ../../library/ast.rst:2671 +#: ../../library/ast.rst:2675 msgid "" "If :file:`infile` is specified its contents are parsed to AST and dumped to " "stdout. Otherwise, the content is read from stdin." @@ -3462,7 +3469,7 @@ msgstr "" ":file:`infile` を指定するとその内容が AST にパースされて標準出力に出力されま" "す。そうでない場合は標準入力から入力を読み込みます。" -#: ../../library/ast.rst:2677 +#: ../../library/ast.rst:2681 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." @@ -3470,7 +3477,7 @@ msgstr "" "外部ドキュメント `Green Tree Snakes `_ には Python AST についての詳細が書かれています。" -#: ../../library/ast.rst:2680 +#: ../../library/ast.rst:2684 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " @@ -3481,14 +3488,14 @@ msgstr "" "Python AST を、生成元のソースコードのトークン位置やテキストで注解します。これ" "はソースコード変換を行うツールで有用です。 " -#: ../../library/ast.rst:2685 +#: ../../library/ast.rst:2689 msgid "" "`leoAst.py `_ unifies the token-based and parse-tree-based views of python programs " "by inserting two-way links between tokens and ast nodes." msgstr "" -#: ../../library/ast.rst:2690 +#: ../../library/ast.rst:2694 msgid "" "`LibCST `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " @@ -3499,7 +3506,7 @@ msgstr "" "は自動リファクタリングアプリケーション (codemod) やリンタを作成する際に有用で" "す。" -#: ../../library/ast.rst:2695 +#: ../../library/ast.rst:2699 msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " diff --git a/library/asynchat.po b/library/asynchat.po index 6e3fe88ad..b6824d3b2 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 66388a62f..a79c45a0d 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 2e18242bc..8563bb437 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index 82133d586..ecfc11170 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-03 17:25+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -316,8 +316,8 @@ msgid "" msgstr ":func:`asyncio.run` を使った場合はこの関数を呼び出す必要はありません。" #: ../../library/asyncio-eventloop.rst:183 -#: ../../library/asyncio-eventloop.rst:1357 -#: ../../library/asyncio-eventloop.rst:1819 +#: ../../library/asyncio-eventloop.rst:1397 +#: ../../library/asyncio-eventloop.rst:1859 msgid "Example::" msgstr "以下はプログラム例です::" @@ -746,8 +746,8 @@ msgid "The socket type will be :py:const:`~socket.SOCK_STREAM`." msgstr "ソケットタイプは :py:const:`~socket.SOCK_STREAM` になります。" #: ../../library/asyncio-eventloop.rst:466 -#: ../../library/asyncio-eventloop.rst:1265 -#: ../../library/asyncio-eventloop.rst:1282 +#: ../../library/asyncio-eventloop.rst:1274 +#: ../../library/asyncio-eventloop.rst:1293 msgid "" "*protocol_factory* must be a callable returning an :ref:`asyncio protocol " "` implementation." @@ -1210,9 +1210,9 @@ msgstr "" #: ../../library/asyncio-eventloop.rst:714 #: ../../library/asyncio-eventloop.rst:870 -#: ../../library/asyncio-eventloop.rst:1336 -#: ../../library/asyncio-eventloop.rst:1889 -#: ../../library/asyncio-eventloop.rst:1896 +#: ../../library/asyncio-eventloop.rst:1376 +#: ../../library/asyncio-eventloop.rst:1935 +#: ../../library/asyncio-eventloop.rst:1942 msgid "Availability" msgstr "" @@ -1511,7 +1511,7 @@ msgstr "" "りません。" #: ../../library/asyncio-eventloop.rst:948 -#: ../../library/asyncio-eventloop.rst:1209 +#: ../../library/asyncio-eventloop.rst:1218 msgid "" "*offset* tells from where to start reading the file. If specified, *count* " "is the total number of bytes to transmit as opposed to sending the file " @@ -1634,7 +1634,7 @@ msgid "" msgstr "" #: ../../library/asyncio-eventloop.rst:1044 -#: ../../library/asyncio-eventloop.rst:1323 +#: ../../library/asyncio-eventloop.rst:1363 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." @@ -1693,8 +1693,8 @@ msgstr "受信したデータをバイトオブジェクトとして返します #: ../../library/asyncio-eventloop.rst:1130 #: ../../library/asyncio-eventloop.rst:1146 #: ../../library/asyncio-eventloop.rst:1157 -#: ../../library/asyncio-eventloop.rst:1184 -#: ../../library/asyncio-eventloop.rst:1223 +#: ../../library/asyncio-eventloop.rst:1193 +#: ../../library/asyncio-eventloop.rst:1232 msgid "*sock* must be a non-blocking socket." msgstr "*sock* はノンブロッキングソケットでなければなりません。" @@ -1763,7 +1763,7 @@ msgstr "" "データの総量を特定する方法はありません。" #: ../../library/asyncio-eventloop.rst:1132 -#: ../../library/asyncio-eventloop.rst:1186 +#: ../../library/asyncio-eventloop.rst:1195 msgid "" "Even though the method was always documented as a coroutine method, before " "Python 3.7 it returned a :class:`Future`. Since Python 3.7, this is an " @@ -1794,17 +1794,28 @@ msgstr ":meth:`socket.connect() ` の非同期版です #: ../../library/asyncio-eventloop.rst:1159 msgid "" -"``address`` no longer needs to be resolved. ``sock_connect`` will try to " -"check if the *address* is already resolved by calling :func:`socket." -"inet_pton`. If not, :meth:`loop.getaddrinfo` will be used to resolve the " -"*address*." +"With :class:`SelectorEventLoop`, *address* does not need to be resolved: " +"for :const:`~socket.AF_INET` and :const:`~socket.AF_INET6` sockets, " +"``sock_connect`` first checks whether *address* is already resolved by " +"calling :func:`socket.inet_pton`, and uses :meth:`loop.getaddrinfo` to " +"resolve it if it is not." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1165 +msgid "" +":class:`ProactorEventLoop`, the default event loop on Windows, does not " +"resolve *address*. The host must already be a numeric IP address; passing a " +"host name raises :exc:`OSError`. Resolve the address with :meth:`loop." +"getaddrinfo` first, or use :meth:`loop.create_connection`, which resolves " +"the address on every platform." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1171 +msgid "" +"With :class:`SelectorEventLoop`, ``address`` no longer needs to be resolved." msgstr "" -"``address`` を名前解決する必要はなくなりました。 ``sock_connect`` は :func:" -"`socket.inet_pton` を呼び出して *address* が解決済みかどうかを確認します。未" -"解決の場合、 *address* の名前解決には :meth:`loop.getaddrinfo` メソッドが使わ" -"れます。" -#: ../../library/asyncio-eventloop.rst:1168 +#: ../../library/asyncio-eventloop.rst:1177 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." @@ -1812,7 +1823,7 @@ msgstr "" ":meth:`loop.create_connection` および :func:`asyncio.open_connection() " "`。" -#: ../../library/asyncio-eventloop.rst:1175 +#: ../../library/asyncio-eventloop.rst:1184 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." @@ -1820,7 +1831,7 @@ msgstr "" "接続を受け付けます。ブロッキングコールの :meth:`socket.accept() ` メソッドをモデルとしています。" -#: ../../library/asyncio-eventloop.rst:1178 +#: ../../library/asyncio-eventloop.rst:1187 msgid "" "The socket must be bound to an address and listening for connections. The " "return value is a pair ``(conn, address)`` where *conn* is a *new* socket " @@ -1832,11 +1843,11 @@ msgstr "" "めの *新しい* ソケットオブジェクト、*address* は接続先の端点でソケットに束縛" "されているアドレスを示します。" -#: ../../library/asyncio-eventloop.rst:1193 +#: ../../library/asyncio-eventloop.rst:1202 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr ":meth:`loop.create_server` および :func:`start_server`。" -#: ../../library/asyncio-eventloop.rst:1199 +#: ../../library/asyncio-eventloop.rst:1208 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." @@ -1844,13 +1855,13 @@ msgstr "" "ファイルを送信します。利用可能なら高性能な :mod:`os.sendfile` を使います。送" "信したデータの総バイト数を返します。" -#: ../../library/asyncio-eventloop.rst:1202 +#: ../../library/asyncio-eventloop.rst:1211 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" ":meth:`socket.sendfile() ` メソッドの非同期版です。" -#: ../../library/asyncio-eventloop.rst:1204 +#: ../../library/asyncio-eventloop.rst:1213 msgid "" "*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." "socket`." @@ -1858,13 +1869,13 @@ msgstr "" "*sock* は :const:`socket.SOCK_STREAM` タイプのノンブロッキングな :class:" "`~socket.socket` でなければなりません。" -#: ../../library/asyncio-eventloop.rst:1207 +#: ../../library/asyncio-eventloop.rst:1216 msgid "*file* must be a regular file object open in binary mode." msgstr "" "*file* はバイナリモードでオープンされた通常のファイルオブジェクトでなければな" "りません。" -#: ../../library/asyncio-eventloop.rst:1216 +#: ../../library/asyncio-eventloop.rst:1225 msgid "" "*fallback*, when set to ``True``, makes asyncio manually read and send the " "file when the platform does not support the sendfile syscall (e.g. Windows " @@ -1875,7 +1886,7 @@ msgstr "" "ど) に asyncio が別の方法でファイルの読み込みと送信を行うようにすることができ" "ます。" -#: ../../library/asyncio-eventloop.rst:1220 +#: ../../library/asyncio-eventloop.rst:1229 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." @@ -1883,19 +1894,19 @@ msgstr "" "システムが *sendfile* システムコールをサポートしておらず、かつ *fallback* が " "``False`` の場合、 :exc:`SendfileNotAvailableError` 例外を送出します。" -#: ../../library/asyncio-eventloop.rst:1229 +#: ../../library/asyncio-eventloop.rst:1238 msgid "DNS" msgstr "DNS" -#: ../../library/asyncio-eventloop.rst:1235 +#: ../../library/asyncio-eventloop.rst:1244 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr ":meth:`socket.getaddrinfo` の非同期版です。" -#: ../../library/asyncio-eventloop.rst:1240 +#: ../../library/asyncio-eventloop.rst:1249 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr ":meth:`socket.getnameinfo` の非同期版です。" -#: ../../library/asyncio-eventloop.rst:1243 +#: ../../library/asyncio-eventloop.rst:1252 msgid "" "Both *getaddrinfo* and *getnameinfo* internally utilize their synchronous " "versions through the loop's default thread pool executor. When this executor " @@ -1905,7 +1916,7 @@ msgid "" "executor with a larger number of workers." msgstr "" -#: ../../library/asyncio-eventloop.rst:1250 +#: ../../library/asyncio-eventloop.rst:1259 msgid "" "Both *getaddrinfo* and *getnameinfo* methods were always documented to " "return a coroutine, but prior to Python 3.7 they were, in fact, returning :" @@ -1917,20 +1928,22 @@ msgstr "" "は、実際には :class:`asyncio.Future` オブジェクトを返していました。 Python " "3.7 からはどちらのメソッドもコルーチンになりました。" -#: ../../library/asyncio-eventloop.rst:1258 +#: ../../library/asyncio-eventloop.rst:1267 msgid "Working with pipes" msgstr "パイプとやりとりする" -#: ../../library/asyncio-eventloop.rst:1263 +#: ../../library/asyncio-eventloop.rst:1272 msgid "Register the read end of *pipe* in the event loop." msgstr "イベントループの読み込み側終端に *pipe* を登録します。" -#: ../../library/asyncio-eventloop.rst:1268 -msgid "*pipe* is a :term:`file-like object `." +#: ../../library/asyncio-eventloop.rst:1277 +#: ../../library/asyncio-eventloop.rst:1296 +msgid "" +"*pipe* is a :term:`file-like object `. See :ref:`Supported " +"pipe objects ` for the objects supported as *pipe*." msgstr "" -"*pipe* には :term:`file-like オブジェクト ` を指定します。" -#: ../../library/asyncio-eventloop.rst:1270 +#: ../../library/asyncio-eventloop.rst:1281 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports the :class:" "`ReadTransport` interface and *protocol* is an object instantiated by the " @@ -1940,8 +1953,8 @@ msgstr "" "`ReadTransport` のインターフェースをサポートし、 *protocol* は " "*protocol_factory* ファクトリでインスタンス化されたオブジェクトです。" -#: ../../library/asyncio-eventloop.rst:1274 -#: ../../library/asyncio-eventloop.rst:1291 +#: ../../library/asyncio-eventloop.rst:1285 +#: ../../library/asyncio-eventloop.rst:1304 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." @@ -1949,15 +1962,11 @@ msgstr "" ":class:`SelectorEventLoop` イベントループの場合、*pipe* は非ブロックモードに" "設定されていなければなりません。" -#: ../../library/asyncio-eventloop.rst:1280 +#: ../../library/asyncio-eventloop.rst:1291 msgid "Register the write end of *pipe* in the event loop." msgstr "*pipe* の書き込み側終端をイベントループに登録します。" -#: ../../library/asyncio-eventloop.rst:1285 -msgid "*pipe* is :term:`file-like object `." -msgstr "*pipe* は :term:`file-like オブジェクト ` です。" - -#: ../../library/asyncio-eventloop.rst:1287 +#: ../../library/asyncio-eventloop.rst:1300 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports :class:" "`WriteTransport` interface and *protocol* is an object instantiated by the " @@ -1967,7 +1976,52 @@ msgstr "" "`WriteTransport` のインスタンスであり、 *protocol* は *protocol_factory* ファ" "クトリでインスタンス化されたオブジェクトです。" -#: ../../library/asyncio-eventloop.rst:1296 +#: ../../library/asyncio-eventloop.rst:1310 +msgid "Supported pipe objects" +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1311 +msgid "" +"These methods only work with objects the operating system can poll for " +"readiness or perform overlapped I/O on. Regular files on disk are **not** " +"supported on any platform. There is no asynchronous file I/O in asyncio; " +"use :meth:`loop.run_in_executor` to read and write regular files without " +"blocking the event loop." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1317 +msgid "" +"On Unix, with :class:`SelectorEventLoop`, *pipe* must wrap one of the " +"following:" +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1320 +msgid "" +"a pipe, such as an end of an :func:`os.pipe` pair or a FIFO created with :" +"func:`os.mkfifo`;" +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1322 +msgid "a socket;" +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1323 +msgid "a character device, such as a terminal." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1325 +msgid "" +"On Windows, where only :class:`ProactorEventLoop` implements these methods, " +"*pipe* must wrap a handle opened for overlapped I/O (that is, created with " +"the ``FILE_FLAG_OVERLAPPED`` flag), since the handle has to be associated " +"with an I/O completion port. Handles that were not opened for overlapped I/" +"O are rejected. In particular, the standard streams (:data:`sys.stdin`, :" +"data:`sys.stdout` and :data:`sys.stderr`), console handles, and the pipes " +"created by :func:`os.pipe` are **not** opened for overlapped I/O and " +"therefore cannot be used with these methods." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1336 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." @@ -1975,23 +2029,23 @@ msgstr "" ":class:`SelectorEventLoop` は Windows 上で上記のメソッドをサポートしていませ" "ん。 Windowsでは代わりに :class:`ProactorEventLoop` を使ってください。" -#: ../../library/asyncio-eventloop.rst:1301 +#: ../../library/asyncio-eventloop.rst:1341 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" ":meth:`loop.subprocess_exec` および :meth:`loop.subprocess_shell` メソッド。" -#: ../../library/asyncio-eventloop.rst:1306 +#: ../../library/asyncio-eventloop.rst:1346 msgid "Unix signals" msgstr "Unix シグナル" -#: ../../library/asyncio-eventloop.rst:1312 +#: ../../library/asyncio-eventloop.rst:1352 msgid "" "Set *callback* as the handler for the *signum* signal, passing *args* as " "positional arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1315 +#: ../../library/asyncio-eventloop.rst:1355 msgid "" "The callback will be invoked by *loop*, along with other queued callbacks " "and runnable coroutines of that event loop. Unlike signal handlers " @@ -2003,7 +2057,7 @@ msgstr "" "シグナルハンドラと異なり、この関数で登録されたコールバックはイベントループと" "相互作用することが可能です。" -#: ../../library/asyncio-eventloop.rst:1320 +#: ../../library/asyncio-eventloop.rst:1360 msgid "" "Raise :exc:`ValueError` if the signal number is invalid or uncatchable. " "Raise :exc:`RuntimeError` if there is a problem setting up the handler." @@ -2011,18 +2065,18 @@ msgstr "" "シグナルナンバーが誤っているか捕捉不可能な場合 :exc:`ValueError` が送出されま" "す。ハンドラーの設定に問題があった場合 :exc:`RuntimeError` が送出されます。" -#: ../../library/asyncio-eventloop.rst:1326 +#: ../../library/asyncio-eventloop.rst:1366 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" ":func:`signal.signal` と同じく、この関数はメインスレッドから呼び出されなけれ" "ばなりません。" -#: ../../library/asyncio-eventloop.rst:1331 +#: ../../library/asyncio-eventloop.rst:1371 msgid "Remove the handler for the *sig* signal." msgstr "シグナル *sig* に対するハンドラを削除します。" -#: ../../library/asyncio-eventloop.rst:1333 +#: ../../library/asyncio-eventloop.rst:1373 msgid "" "Return ``True`` if the signal handler was removed, or ``False`` if no " "handler was set for the given signal." @@ -2030,21 +2084,21 @@ msgstr "" "シグナルハンドラが削除された場合 ``True`` を返します。シグナルに対してハンド" "ラが設定されていない場合には ``False`` を返します。" -#: ../../library/asyncio-eventloop.rst:1340 +#: ../../library/asyncio-eventloop.rst:1380 msgid "The :mod:`signal` module." msgstr ":mod:`signal` モジュール。" -#: ../../library/asyncio-eventloop.rst:1344 +#: ../../library/asyncio-eventloop.rst:1384 msgid "Executing code in thread or process pools" msgstr "スレッドまたはプロセスプールでコードを実行する" -#: ../../library/asyncio-eventloop.rst:1348 +#: ../../library/asyncio-eventloop.rst:1388 msgid "" "Arrange for *func* to be called in the specified executor passing *args* as " "positional arguments." msgstr "" -#: ../../library/asyncio-eventloop.rst:1351 +#: ../../library/asyncio-eventloop.rst:1391 msgid "" "The *executor* argument should be an :class:`concurrent.futures.Executor` " "instance. The default executor is used if *executor* is ``None``. The " @@ -2053,7 +2107,7 @@ msgid "" "and used by :func:`run_in_executor` if needed." msgstr "" -#: ../../library/asyncio-eventloop.rst:1359 +#: ../../library/asyncio-eventloop.rst:1399 msgid "" "import asyncio\n" "import concurrent.futures\n" @@ -2102,7 +2156,7 @@ msgid "" " asyncio.run(main())" msgstr "" -#: ../../library/asyncio-eventloop.rst:1405 +#: ../../library/asyncio-eventloop.rst:1445 msgid "" "Note that the entry point guard (``if __name__ == '__main__'``) is required " "for option 3 due to the peculiarities of :mod:`multiprocessing`, which is " @@ -2110,11 +2164,11 @@ msgid "" "importing of main module `." msgstr "" -#: ../../library/asyncio-eventloop.rst:1410 +#: ../../library/asyncio-eventloop.rst:1450 msgid "This method returns a :class:`asyncio.Future` object." msgstr "このメソッドは :class:`asyncio.Future` オブジェクトを返します。" -#: ../../library/asyncio-eventloop.rst:1412 +#: ../../library/asyncio-eventloop.rst:1452 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." @@ -2122,7 +2176,7 @@ msgstr "" "関数 *func* に :ref:`キーワード引数を渡す ` 場合は :" "func:`functools.partial` を使ってください。" -#: ../../library/asyncio-eventloop.rst:1415 +#: ../../library/asyncio-eventloop.rst:1455 msgid "" ":meth:`loop.run_in_executor` no longer configures the ``max_workers`` of the " "thread pool executor it creates, instead leaving it up to the thread pool " @@ -2134,7 +2188,7 @@ msgstr "" "`~concurrent.futures.ThreadPoolExecutor`) にデフォルト値を設定させるようにな" "りました。" -#: ../../library/asyncio-eventloop.rst:1424 +#: ../../library/asyncio-eventloop.rst:1464 msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " "*executor* must be an instance of :class:`~concurrent.futures." @@ -2142,25 +2196,25 @@ msgid "" "InterpreterPoolExecutor`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1429 +#: ../../library/asyncio-eventloop.rst:1469 msgid "" "*executor* must be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1435 +#: ../../library/asyncio-eventloop.rst:1475 msgid "Error handling API" msgstr "" -#: ../../library/asyncio-eventloop.rst:1437 +#: ../../library/asyncio-eventloop.rst:1477 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "イベントループ内での例外の扱い方をカスタマイズできます。" -#: ../../library/asyncio-eventloop.rst:1441 +#: ../../library/asyncio-eventloop.rst:1481 msgid "Set *handler* as the new event loop exception handler." msgstr "*handler* を新しいイベントループ例外ハンドラーとして設定します。" -#: ../../library/asyncio-eventloop.rst:1443 +#: ../../library/asyncio-eventloop.rst:1483 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -2175,20 +2229,20 @@ msgstr "" "``dict`` オブジェクトです (*context* についての詳細は :meth:" "`call_exception_handler` メソッドのドキュメントを参照してください)。" -#: ../../library/asyncio-eventloop.rst:1451 +#: ../../library/asyncio-eventloop.rst:1491 msgid "" "If the handler is called on behalf of a :class:`~asyncio.Task` or :class:" "`~asyncio.Handle`, it is run in the :class:`contextvars.Context` of that " "task or callback handle." msgstr "" -#: ../../library/asyncio-eventloop.rst:1457 +#: ../../library/asyncio-eventloop.rst:1497 msgid "" "The handler may be called in the :class:`~contextvars.Context` of the task " "or handle where the exception originated." msgstr "" -#: ../../library/asyncio-eventloop.rst:1462 +#: ../../library/asyncio-eventloop.rst:1502 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." @@ -2196,11 +2250,11 @@ msgstr "" "現在の例外ハンドラを返します。カスタム例外ハンドラが設定されていない場合は " "``None`` を返します。" -#: ../../library/asyncio-eventloop.rst:1469 +#: ../../library/asyncio-eventloop.rst:1509 msgid "Default exception handler." msgstr "デフォルトの例外ハンドラーです。" -#: ../../library/asyncio-eventloop.rst:1471 +#: ../../library/asyncio-eventloop.rst:1511 msgid "" "This is called when an exception occurs and no exception handler is set. " "This can be called by a custom exception handler that wants to defer to the " @@ -2210,17 +2264,17 @@ msgstr "" "出されます。デフォルト例外ハンドラの挙動を受け入れるために、カスタム例外ハン" "ドラから呼び出すことも可能です。" -#: ../../library/asyncio-eventloop.rst:1475 +#: ../../library/asyncio-eventloop.rst:1515 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "引数 *context* の意味は :meth:`call_exception_handler` と同じです。" -#: ../../library/asyncio-eventloop.rst:1480 +#: ../../library/asyncio-eventloop.rst:1520 msgid "Call the current event loop exception handler." msgstr "現在のイベントループ例外ハンドラーを呼び出します。" -#: ../../library/asyncio-eventloop.rst:1482 +#: ../../library/asyncio-eventloop.rst:1522 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" @@ -2228,70 +2282,70 @@ msgstr "" "*context* は以下のキーを含む ``dict`` オブジェクトです (将来の Python バー" "ジョンで新しいキーが追加される可能性があります):" -#: ../../library/asyncio-eventloop.rst:1485 +#: ../../library/asyncio-eventloop.rst:1525 msgid "'message': Error message;" msgstr "'message': エラーメッセージ;" -#: ../../library/asyncio-eventloop.rst:1486 +#: ../../library/asyncio-eventloop.rst:1526 msgid "'exception' (optional): Exception object;" msgstr "'exception' (任意): 例外オブジェクト;" -#: ../../library/asyncio-eventloop.rst:1487 +#: ../../library/asyncio-eventloop.rst:1527 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "'future' (任意): :class:`asyncio.Future` インスタンス;" -#: ../../library/asyncio-eventloop.rst:1488 +#: ../../library/asyncio-eventloop.rst:1528 msgid "'task' (optional): :class:`asyncio.Task` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1489 +#: ../../library/asyncio-eventloop.rst:1529 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "'handle' (任意): :class:`asyncio.Handle` インスタンス;" -#: ../../library/asyncio-eventloop.rst:1490 +#: ../../library/asyncio-eventloop.rst:1530 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "'protocol' (任意): :ref:`プロトコル ` インスタンス;" -#: ../../library/asyncio-eventloop.rst:1491 +#: ../../library/asyncio-eventloop.rst:1531 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" "'transport' (任意): :ref:`トランスポート ` インスタンス;" -#: ../../library/asyncio-eventloop.rst:1492 +#: ../../library/asyncio-eventloop.rst:1532 msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1493 +#: ../../library/asyncio-eventloop.rst:1533 msgid "'source_traceback' (optional): Traceback of the source;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1494 +#: ../../library/asyncio-eventloop.rst:1534 msgid "'handle_traceback' (optional): Traceback of the handle;" msgstr "" -#: ../../library/asyncio-eventloop.rst:1495 +#: ../../library/asyncio-eventloop.rst:1535 msgid "'asyncgen' (optional): Asynchronous generator that caused" msgstr "" -#: ../../library/asyncio-eventloop.rst:1496 +#: ../../library/asyncio-eventloop.rst:1536 msgid "the exception." msgstr "" -#: ../../library/asyncio-eventloop.rst:1500 +#: ../../library/asyncio-eventloop.rst:1540 msgid "" "This method should not be overloaded in subclassed event loops. For custom " "exception handling, use the :meth:`set_exception_handler` method." msgstr "" -#: ../../library/asyncio-eventloop.rst:1505 +#: ../../library/asyncio-eventloop.rst:1545 msgid "Enabling debug mode" msgstr "デバッグモードの有効化" -#: ../../library/asyncio-eventloop.rst:1509 +#: ../../library/asyncio-eventloop.rst:1549 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "イベントループのデバッグモード (:class:`bool`) を取得します。" -#: ../../library/asyncio-eventloop.rst:1511 +#: ../../library/asyncio-eventloop.rst:1551 msgid "" "The default value is ``True`` if the environment variable :envvar:" "`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False`` otherwise." @@ -2299,11 +2353,11 @@ msgstr "" "環境変数 :envvar:`PYTHONASYNCIODEBUG` に空でない文字列が設定されている場合の" "デフォルト値は ``True``、そうでない場合は ``False`` になります。" -#: ../../library/asyncio-eventloop.rst:1517 +#: ../../library/asyncio-eventloop.rst:1557 msgid "Set the debug mode of the event loop." msgstr "イベントループのデバッグモードを設定します。" -#: ../../library/asyncio-eventloop.rst:1521 +#: ../../library/asyncio-eventloop.rst:1561 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." @@ -2311,26 +2365,26 @@ msgstr "" "新しい :ref:`Python 開発モード ` を使ってデバッグモードを有効化する" "ことができるようになりました。" -#: ../../library/asyncio-eventloop.rst:1526 +#: ../../library/asyncio-eventloop.rst:1566 msgid "" "This attribute can be used to set the minimum execution duration in seconds " "that is considered \"slow\". When debug mode is enabled, \"slow\" callbacks " "are logged." msgstr "" -#: ../../library/asyncio-eventloop.rst:1530 +#: ../../library/asyncio-eventloop.rst:1570 msgid "Default value is 100 milliseconds." msgstr "" -#: ../../library/asyncio-eventloop.rst:1534 +#: ../../library/asyncio-eventloop.rst:1574 msgid "The :ref:`debug mode of asyncio `." msgstr ":ref:`asyncio のデバッグモード `。" -#: ../../library/asyncio-eventloop.rst:1538 +#: ../../library/asyncio-eventloop.rst:1578 msgid "Running subprocesses" msgstr "" -#: ../../library/asyncio-eventloop.rst:1540 +#: ../../library/asyncio-eventloop.rst:1580 msgid "" "Methods described in this subsections are low-level. In regular async/await " "code consider using the high-level :func:`asyncio.create_subprocess_shell` " @@ -2340,29 +2394,29 @@ msgstr "" "高水準の関数である :func:`asyncio.create_subprocess_shell` や :func:`asyncio." "create_subprocess_exec` を代わりに使うことを検討してください。" -#: ../../library/asyncio-eventloop.rst:1547 +#: ../../library/asyncio-eventloop.rst:1587 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" "`Subprocess Support on Windows ` for details." msgstr "" -#: ../../library/asyncio-eventloop.rst:1559 +#: ../../library/asyncio-eventloop.rst:1599 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" "*args* で指定されたひとつの、または複数の文字列引数からサブプロセスを生成しま" "す。" -#: ../../library/asyncio-eventloop.rst:1562 +#: ../../library/asyncio-eventloop.rst:1602 msgid "*args* must be a list of strings represented by:" msgstr "*args* は下記のいずれかに当てはまる文字列のリストでなければなりません:" -#: ../../library/asyncio-eventloop.rst:1564 +#: ../../library/asyncio-eventloop.rst:1604 msgid ":class:`str`;" msgstr ":class:`str`;" -#: ../../library/asyncio-eventloop.rst:1565 +#: ../../library/asyncio-eventloop.rst:1605 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." @@ -2370,7 +2424,7 @@ msgstr "" "または :ref:`ファイルシステムのエンコーディング ` にエン" "コードされた :class:`bytes`" -#: ../../library/asyncio-eventloop.rst:1568 +#: ../../library/asyncio-eventloop.rst:1608 msgid "" "The first string specifies the program executable, and the remaining strings " "specify the arguments. Together, string arguments form the ``argv`` of the " @@ -2379,7 +2433,7 @@ msgstr "" "引数の最初の文字列はプログラムの実行ファイルを指定します。それに続く残りの文" "字列は引数を指定し、そのプログラムに対する ``argv`` を構成します。" -#: ../../library/asyncio-eventloop.rst:1572 +#: ../../library/asyncio-eventloop.rst:1612 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=False`` and the list of strings passed as the first " @@ -2392,7 +2446,7 @@ msgstr "" "ひとつだけ取るのに対して、 *subprocess_exec* は複数の文字列引数をとることがで" "きます。" -#: ../../library/asyncio-eventloop.rst:1578 +#: ../../library/asyncio-eventloop.rst:1618 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`asyncio.SubprocessProtocol` class." @@ -2400,29 +2454,29 @@ msgstr "" "*protocol_factory* は :class:`asyncio.SubprocessProtocol` クラスの派生クラス" "を返す呼び出し可能オブジェクトでなければなりません。" -#: ../../library/asyncio-eventloop.rst:1581 +#: ../../library/asyncio-eventloop.rst:1621 msgid "Other parameters:" msgstr "その他の引数:" -#: ../../library/asyncio-eventloop.rst:1583 +#: ../../library/asyncio-eventloop.rst:1623 msgid "*stdin* can be any of these:" msgstr "*stdin* は下記のいずれかをとることができます:" -#: ../../library/asyncio-eventloop.rst:1585 -#: ../../library/asyncio-eventloop.rst:1596 -#: ../../library/asyncio-eventloop.rst:1606 +#: ../../library/asyncio-eventloop.rst:1625 +#: ../../library/asyncio-eventloop.rst:1636 +#: ../../library/asyncio-eventloop.rst:1646 msgid "a file-like object" msgstr "" -#: ../../library/asyncio-eventloop.rst:1586 +#: ../../library/asyncio-eventloop.rst:1626 msgid "" "an existing file descriptor (a positive integer), for example those created " "with :meth:`os.pipe`" msgstr "" -#: ../../library/asyncio-eventloop.rst:1587 -#: ../../library/asyncio-eventloop.rst:1597 -#: ../../library/asyncio-eventloop.rst:1607 +#: ../../library/asyncio-eventloop.rst:1627 +#: ../../library/asyncio-eventloop.rst:1637 +#: ../../library/asyncio-eventloop.rst:1647 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," @@ -2430,9 +2484,9 @@ msgstr "" "デフォルト値は :const:`subprocess.PIPE` 定数で、この場合新規にパイプを生成し" "て接続します。" -#: ../../library/asyncio-eventloop.rst:1589 -#: ../../library/asyncio-eventloop.rst:1599 -#: ../../library/asyncio-eventloop.rst:1609 +#: ../../library/asyncio-eventloop.rst:1629 +#: ../../library/asyncio-eventloop.rst:1639 +#: ../../library/asyncio-eventloop.rst:1649 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" @@ -2440,9 +2494,9 @@ msgstr "" "``None`` が設定された場合、サブプロセスは元のプロセスのファイルデスクリプタを" "引き継ぎます。" -#: ../../library/asyncio-eventloop.rst:1591 -#: ../../library/asyncio-eventloop.rst:1601 -#: ../../library/asyncio-eventloop.rst:1611 +#: ../../library/asyncio-eventloop.rst:1631 +#: ../../library/asyncio-eventloop.rst:1641 +#: ../../library/asyncio-eventloop.rst:1651 msgid "" "the :const:`subprocess.DEVNULL` constant which indicates that the special :" "data:`os.devnull` file will be used" @@ -2450,15 +2504,15 @@ msgstr "" ":const:`subprocess.DEVNULL` 定数を設定すると、特別なファイル :data:`os." "devnull` を使います。" -#: ../../library/asyncio-eventloop.rst:1594 +#: ../../library/asyncio-eventloop.rst:1634 msgid "*stdout* can be any of these:" msgstr "*stdout* は下記のいずれかをとることができます:" -#: ../../library/asyncio-eventloop.rst:1604 +#: ../../library/asyncio-eventloop.rst:1644 msgid "*stderr* can be any of these:" msgstr "*stderr* は下記のいずれかをとることができます:" -#: ../../library/asyncio-eventloop.rst:1613 +#: ../../library/asyncio-eventloop.rst:1653 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" @@ -2466,7 +2520,7 @@ msgstr "" ":const:`subprocess.STDOUT` 定数を設定すると、標準エラー出力ストリームをプロセ" "スの標準出力ストリームに接続します。" -#: ../../library/asyncio-eventloop.rst:1616 +#: ../../library/asyncio-eventloop.rst:1656 msgid "" "All other keyword arguments are passed to :class:`subprocess.Popen` without " "interpretation, except for *bufsize*, *universal_newlines*, *shell*, *text*, " @@ -2476,7 +2530,7 @@ msgstr "" "Popen` に渡されます。ただし、 *bufsize*、 *universal_newlines*、 *shell*、 " "*text*、 *encoding* および *errors* は指定してはいけません。" -#: ../../library/asyncio-eventloop.rst:1621 +#: ../../library/asyncio-eventloop.rst:1661 msgid "" "The ``asyncio`` subprocess API does not support decoding the streams as " "text. :func:`bytes.decode` can be used to convert the bytes returned from " @@ -2486,7 +2540,7 @@ msgstr "" "していません。ストリームからテキストに変換するには :func:`bytes.decode` 関数" "を使ってください。" -#: ../../library/asyncio-eventloop.rst:1625 +#: ../../library/asyncio-eventloop.rst:1665 msgid "" "If a file-like object passed as *stdin*, *stdout* or *stderr* represents a " "pipe, then the other side of this pipe should be registered with :meth:" @@ -2494,7 +2548,7 @@ msgid "" "the event loop." msgstr "" -#: ../../library/asyncio-eventloop.rst:1630 +#: ../../library/asyncio-eventloop.rst:1670 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." @@ -2502,7 +2556,7 @@ msgstr "" "他の引数についての詳細は :class:`subprocess.Popen` クラスのコンストラクタを参" "照してください。" -#: ../../library/asyncio-eventloop.rst:1633 +#: ../../library/asyncio-eventloop.rst:1673 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`asyncio.SubprocessTransport` base class and *protocol* is an " @@ -2512,14 +2566,14 @@ msgstr "" "`asyncio.SubprocessTransport` 基底クラスに適合するオブジェクトで、 " "*protocol* は *protocol_factory* によりインスタンス化されたオブジェクトです。" -#: ../../library/asyncio-eventloop.rst:1637 -#: ../../library/asyncio-eventloop.rst:1663 +#: ../../library/asyncio-eventloop.rst:1677 +#: ../../library/asyncio-eventloop.rst:1703 msgid "" "If the transport is closed or is garbage collected, the child process is " "killed if it is still running." msgstr "" -#: ../../library/asyncio-eventloop.rst:1645 +#: ../../library/asyncio-eventloop.rst:1685 msgid "" "Create a subprocess from *cmd*, which can be a :class:`str` or a :class:" "`bytes` string encoded to the :ref:`filesystem encoding ` でエンコードされた :class:" "`bytes` 文字列です。" -#: ../../library/asyncio-eventloop.rst:1650 +#: ../../library/asyncio-eventloop.rst:1690 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." @@ -2538,7 +2592,7 @@ msgstr "" "これは標準ライブラリの :class:`subprocess.Popen` クラスを ``shell=True`` で呼" "び出した場合と似ています。" -#: ../../library/asyncio-eventloop.rst:1653 +#: ../../library/asyncio-eventloop.rst:1693 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`SubprocessProtocol` class." @@ -2546,7 +2600,7 @@ msgstr "" "*protocol_factory* は :class:`SubprocessProtocol` の派生クラスを返す呼び出し" "可能オブジェクトでなければなりません。" -#: ../../library/asyncio-eventloop.rst:1656 +#: ../../library/asyncio-eventloop.rst:1696 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." @@ -2554,7 +2608,7 @@ msgstr "" "その他の引数についての詳細は :meth:`~loop.subprocess_exec` メソッドを参照して" "ください。" -#: ../../library/asyncio-eventloop.rst:1659 +#: ../../library/asyncio-eventloop.rst:1699 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`SubprocessTransport` base class and *protocol* is an object " @@ -2564,7 +2618,7 @@ msgstr "" "`SubprocessTransport` 基底クラスに適合するオブジェクトで、 *protocol* は " "*protocol_factory* によりインスタンス化されたオブジェクトです。" -#: ../../library/asyncio-eventloop.rst:1667 +#: ../../library/asyncio-eventloop.rst:1707 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -2579,11 +2633,11 @@ msgstr "" "ください。シェルコマンドを構成する文字列内の空白文字と特殊文字のエスケープ" "は、 :func:`shlex.quote` 関数を使うと適切に行うことができます。" -#: ../../library/asyncio-eventloop.rst:1676 +#: ../../library/asyncio-eventloop.rst:1716 msgid "Callback handles" msgstr "" -#: ../../library/asyncio-eventloop.rst:1680 +#: ../../library/asyncio-eventloop.rst:1720 msgid "" "A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." "call_soon_threadsafe`." @@ -2591,12 +2645,12 @@ msgstr "" ":meth:`loop.call_soon` や :meth:`loop.call_soon_threadsafe` が返すコールバッ" "クのラッパーです。" -#: ../../library/asyncio-eventloop.rst:1685 +#: ../../library/asyncio-eventloop.rst:1725 msgid "" "Return the :class:`contextvars.Context` object associated with the handle." msgstr "" -#: ../../library/asyncio-eventloop.rst:1692 +#: ../../library/asyncio-eventloop.rst:1732 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." @@ -2604,11 +2658,11 @@ msgstr "" "コールバックをキャンセルします。コールバックがキャンセル済みまたは実行済みの" "場合、このメソッドは何の影響もありません。" -#: ../../library/asyncio-eventloop.rst:1697 +#: ../../library/asyncio-eventloop.rst:1737 msgid "Return ``True`` if the callback was cancelled." msgstr "コールバックがキャンセルされた場合 ``True`` を返します。" -#: ../../library/asyncio-eventloop.rst:1703 +#: ../../library/asyncio-eventloop.rst:1743 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" "`loop.call_at`." @@ -2616,15 +2670,15 @@ msgstr "" " :meth:`loop.call_later` や :meth:`loop.call_at` が返すコールバックのラッパー" "オブジェクトです。" -#: ../../library/asyncio-eventloop.rst:1706 +#: ../../library/asyncio-eventloop.rst:1746 msgid "This class is a subclass of :class:`Handle`." msgstr "このクラスは :class:`Handle` の派生クラスです。" -#: ../../library/asyncio-eventloop.rst:1710 +#: ../../library/asyncio-eventloop.rst:1750 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "コールバックのスケジュール時刻を秒単位の :class:`float` で返します。" -#: ../../library/asyncio-eventloop.rst:1712 +#: ../../library/asyncio-eventloop.rst:1752 msgid "" "The time is an absolute timestamp, using the same time reference as :meth:" "`loop.time`." @@ -2632,11 +2686,11 @@ msgstr "" "戻り値の時刻は絶対値で、 :meth:`loop.time` と同じ参照時刻を使って定義されてい" "ます。" -#: ../../library/asyncio-eventloop.rst:1719 +#: ../../library/asyncio-eventloop.rst:1759 msgid "Server objects" msgstr "" -#: ../../library/asyncio-eventloop.rst:1721 +#: ../../library/asyncio-eventloop.rst:1761 msgid "" "Server objects are created by :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :func:`start_server`, and :func:`start_unix_server` " @@ -2646,11 +2700,11 @@ msgstr "" "create_unix_server`、 :func:`start_server` および :func:`start_unix_server` " "関数により生成されます。" -#: ../../library/asyncio-eventloop.rst:1725 +#: ../../library/asyncio-eventloop.rst:1765 msgid "Do not instantiate the :class:`Server` class directly." msgstr "" -#: ../../library/asyncio-eventloop.rst:1729 +#: ../../library/asyncio-eventloop.rst:1769 msgid "" "*Server* objects are asynchronous context managers. When used in an ``async " "with`` statement, it's guaranteed that the Server object is closed and not " @@ -2660,7 +2714,7 @@ msgstr "" "の中で使われた場合、 ``async with`` 文が完了した時に Server オブジェクトがク" "ローズされること、およびそれ以降に接続を受け付けないことが保証されます。" -#: ../../library/asyncio-eventloop.rst:1734 +#: ../../library/asyncio-eventloop.rst:1774 msgid "" "srv = await loop.create_server(...)\n" "\n" @@ -2670,19 +2724,19 @@ msgid "" "# At this point, srv is closed and no longer accepts new connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1742 +#: ../../library/asyncio-eventloop.rst:1782 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" "Python 3.7 から、 Server オブジェクトは非同期のコンテキストマネージャになりま" "した。" -#: ../../library/asyncio-eventloop.rst:1745 +#: ../../library/asyncio-eventloop.rst:1785 msgid "" "This class was exposed publicly as ``asyncio.Server`` in Python 3.9.11, " "3.10.3 and 3.11." msgstr "" -#: ../../library/asyncio-eventloop.rst:1750 +#: ../../library/asyncio-eventloop.rst:1790 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." @@ -2690,65 +2744,65 @@ msgstr "" "サーバーを停止します: 待機しているソケットをクローズし :attr:`sockets` 属性" "に ``None`` を設定します。" -#: ../../library/asyncio-eventloop.rst:1753 +#: ../../library/asyncio-eventloop.rst:1793 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "既存の受信中のクライアントとの接続を表すソケットはオープンのままです。" -#: ../../library/asyncio-eventloop.rst:1756 +#: ../../library/asyncio-eventloop.rst:1796 msgid "" "The server is closed asynchronously; use the :meth:`wait_closed` coroutine " "to wait until the server is closed (and no more connections are active)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1762 +#: ../../library/asyncio-eventloop.rst:1802 msgid "Close all existing incoming client connections." msgstr "" -#: ../../library/asyncio-eventloop.rst:1764 +#: ../../library/asyncio-eventloop.rst:1804 msgid "" "Calls :meth:`~asyncio.BaseTransport.close` on all associated transports." msgstr "" -#: ../../library/asyncio-eventloop.rst:1767 +#: ../../library/asyncio-eventloop.rst:1807 msgid "" ":meth:`close` should be called before :meth:`close_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: ../../library/asyncio-eventloop.rst:1774 +#: ../../library/asyncio-eventloop.rst:1814 msgid "" "Close all existing incoming client connections immediately, without waiting " "for pending operations to complete." msgstr "" -#: ../../library/asyncio-eventloop.rst:1777 +#: ../../library/asyncio-eventloop.rst:1817 msgid "" "Calls :meth:`~asyncio.WriteTransport.abort` on all associated transports." msgstr "" -#: ../../library/asyncio-eventloop.rst:1780 +#: ../../library/asyncio-eventloop.rst:1820 msgid "" ":meth:`close` should be called before :meth:`abort_clients` when closing the " "server to avoid races with new clients connecting." msgstr "" -#: ../../library/asyncio-eventloop.rst:1787 +#: ../../library/asyncio-eventloop.rst:1827 msgid "Return the event loop associated with the server object." msgstr "サーバオブジェクトに付随するイベントループを返します。" -#: ../../library/asyncio-eventloop.rst:1794 +#: ../../library/asyncio-eventloop.rst:1834 msgid "Start accepting connections." msgstr "接続の受け付けを開始します。" -#: ../../library/asyncio-eventloop.rst:1796 +#: ../../library/asyncio-eventloop.rst:1836 msgid "" "This method is idempotent, so it can be called when the server is already " "serving." msgstr "" -#: ../../library/asyncio-eventloop.rst:1799 +#: ../../library/asyncio-eventloop.rst:1839 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -2762,7 +2816,7 @@ msgstr "" "start_serving()`` または :meth:`Server.serve_forever` メソッドを使ってオブ" "ジェクトが接続の受け付けを開始するようにすることができます。" -#: ../../library/asyncio-eventloop.rst:1811 +#: ../../library/asyncio-eventloop.rst:1851 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." @@ -2770,7 +2824,7 @@ msgstr "" "接続の受け入れを開始し、コルーチンがキャンセルされるまで継続します。 " "``serve_forever`` タスクのキャンセルによりサーバーもクローズされます。 " -#: ../../library/asyncio-eventloop.rst:1815 +#: ../../library/asyncio-eventloop.rst:1855 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." @@ -2779,7 +2833,7 @@ msgstr "" "す。ひとつの *Server* オブジェクトにつき ``serve_forever`` タスクはひとつだけ" "存在できます。" -#: ../../library/asyncio-eventloop.rst:1821 +#: ../../library/asyncio-eventloop.rst:1861 msgid "" "async def client_connected(reader, writer):\n" " # Communicate with the client with\n" @@ -2794,23 +2848,30 @@ msgid "" "asyncio.run(main('127.0.0.1', 0))" msgstr "" -#: ../../library/asyncio-eventloop.rst:1837 +#: ../../library/asyncio-eventloop.rst:1877 msgid "Return ``True`` if the server is accepting new connections." msgstr "サーバーが新規に接続の受け入れを開始した場合 ``True`` を返します。" -#: ../../library/asyncio-eventloop.rst:1844 +#: ../../library/asyncio-eventloop.rst:1884 msgid "" "Wait until the :meth:`close` method completes and all active connections " "have finished." msgstr "" -#: ../../library/asyncio-eventloop.rst:1849 +#: ../../library/asyncio-eventloop.rst:1887 +msgid "" +"``wait_closed()`` now waits until the server is closed and all active " +"connections have finished. Previously, it returned immediately if the " +"server was already closed, even if connections were still active." +msgstr "" + +#: ../../library/asyncio-eventloop.rst:1895 msgid "" "List of socket-like objects, ``asyncio.trsock.TransportSocket``, which the " "server is listening on." msgstr "" -#: ../../library/asyncio-eventloop.rst:1852 +#: ../../library/asyncio-eventloop.rst:1898 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." @@ -2819,11 +2880,11 @@ msgstr "" "バーソケットのリストを直接返していました。 Python 3.7 ではリストのコピーが返" "されるようになりました。" -#: ../../library/asyncio-eventloop.rst:1862 +#: ../../library/asyncio-eventloop.rst:1908 msgid "Event loop implementations" msgstr "" -#: ../../library/asyncio-eventloop.rst:1864 +#: ../../library/asyncio-eventloop.rst:1910 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." @@ -2831,17 +2892,17 @@ msgstr "" "asyncio は2つの異なるイベントループの実装、 :class:`SelectorEventLoop` と :" "class:`ProactorEventLoop`、 を提供します: " -#: ../../library/asyncio-eventloop.rst:1867 +#: ../../library/asyncio-eventloop.rst:1913 msgid "By default asyncio is configured to use :class:`EventLoop`." msgstr "" -#: ../../library/asyncio-eventloop.rst:1872 +#: ../../library/asyncio-eventloop.rst:1918 msgid "" "A subclass of :class:`AbstractEventLoop` based on the :mod:`selectors` " "module." msgstr "" -#: ../../library/asyncio-eventloop.rst:1875 +#: ../../library/asyncio-eventloop.rst:1921 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " @@ -2850,7 +2911,7 @@ msgstr "" "プラットフォーム上で利用可能な最も効率の良い *selector* を使います。特定のセ" "レクタ実装を使うように手動で構成することも可能です::" -#: ../../library/asyncio-eventloop.rst:1879 +#: ../../library/asyncio-eventloop.rst:1925 msgid "" "import asyncio\n" "import selectors\n" @@ -2863,45 +2924,45 @@ msgid "" "asyncio.run(main(), loop_factory=loop_factory)" msgstr "" -#: ../../library/asyncio-eventloop.rst:1894 +#: ../../library/asyncio-eventloop.rst:1940 msgid "" "A subclass of :class:`AbstractEventLoop` for Windows that uses \"I/O " "Completion Ports\" (IOCP)." msgstr "" -#: ../../library/asyncio-eventloop.rst:1900 +#: ../../library/asyncio-eventloop.rst:1946 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: ../../library/asyncio-eventloop.rst:1905 +#: ../../library/asyncio-eventloop.rst:1951 msgid "" "An alias to the most efficient available subclass of :class:" "`AbstractEventLoop` for the given platform." msgstr "" -#: ../../library/asyncio-eventloop.rst:1908 +#: ../../library/asyncio-eventloop.rst:1954 msgid "" "It is an alias to :class:`SelectorEventLoop` on Unix and :class:" "`ProactorEventLoop` on Windows." msgstr "" -#: ../../library/asyncio-eventloop.rst:1914 +#: ../../library/asyncio-eventloop.rst:1960 msgid "Abstract base class for asyncio-compliant event loops." msgstr "asyncio に適合するイベントループの抽象基底クラスです。" -#: ../../library/asyncio-eventloop.rst:1916 +#: ../../library/asyncio-eventloop.rst:1962 msgid "" "The :ref:`asyncio-event-loop-methods` section lists all methods that an " "alternative implementation of ``AbstractEventLoop`` should have defined." msgstr "" -#: ../../library/asyncio-eventloop.rst:1922 +#: ../../library/asyncio-eventloop.rst:1968 msgid "Examples" msgstr "使用例" -#: ../../library/asyncio-eventloop.rst:1924 +#: ../../library/asyncio-eventloop.rst:1970 msgid "" "Note that all examples in this section **purposefully** show how to use the " "low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." @@ -2913,11 +2974,11 @@ msgstr "" "現代的な asyncio アプリケーションはここに示すような方法をほとんど必要としませ" "ん。 :func:`asyncio.run` のような高水準の関数の使用を検討してください。" -#: ../../library/asyncio-eventloop.rst:1934 +#: ../../library/asyncio-eventloop.rst:1980 msgid "Hello World with call_soon()" msgstr "call_soon() を使った Hello World" -#: ../../library/asyncio-eventloop.rst:1936 +#: ../../library/asyncio-eventloop.rst:1982 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" @@ -2925,7 +2986,7 @@ msgstr "" ":meth:`loop.call_soon` メソッドを使ってコールバックをスケジュールする例です。" "コールバックは ``\"Hello World\"`` を出力しイベントループを停止します::" -#: ../../library/asyncio-eventloop.rst:1940 +#: ../../library/asyncio-eventloop.rst:1986 msgid "" "import asyncio\n" "\n" @@ -2946,7 +3007,7 @@ msgid "" " loop.close()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1960 +#: ../../library/asyncio-eventloop.rst:2006 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." @@ -2954,11 +3015,11 @@ msgstr "" "コルーチンと :func:`run` 関数を使用した同じような :ref:`Hello World " "` の例。" -#: ../../library/asyncio-eventloop.rst:1967 +#: ../../library/asyncio-eventloop.rst:2013 msgid "Display the current date with call_later()" msgstr "call_later() で現在の日時を表示する" -#: ../../library/asyncio-eventloop.rst:1969 +#: ../../library/asyncio-eventloop.rst:2015 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " @@ -2968,7 +3029,7 @@ msgstr "" "call_later` メソッドを使って自身を5秒後に実行するよう再スケジュールし、イベン" "トループを停止します::" -#: ../../library/asyncio-eventloop.rst:1973 +#: ../../library/asyncio-eventloop.rst:2019 msgid "" "import asyncio\n" "import datetime as dt\n" @@ -2993,7 +3054,7 @@ msgid "" " loop.close()" msgstr "" -#: ../../library/asyncio-eventloop.rst:1997 +#: ../../library/asyncio-eventloop.rst:2043 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." @@ -3001,11 +3062,11 @@ msgstr "" "コルーチンと :func:`run` 関数を使用した同じような :ref:`現在時刻出力 " "` の例。" -#: ../../library/asyncio-eventloop.rst:2004 +#: ../../library/asyncio-eventloop.rst:2050 msgid "Watch a file descriptor for read events" msgstr "読み込みイベント用ファイル記述子の監視" -#: ../../library/asyncio-eventloop.rst:2006 +#: ../../library/asyncio-eventloop.rst:2052 msgid "" "Wait until a file descriptor received some data using the :meth:`loop." "add_reader` method and then close the event loop::" @@ -3013,7 +3074,7 @@ msgstr "" "ファイル記述子が :meth:`loop.add_reader` メソッドを使って何らかのデータを受信" "するまで待機し、その後イベントループをクローズします::" -#: ../../library/asyncio-eventloop.rst:2009 +#: ../../library/asyncio-eventloop.rst:2055 msgid "" "import asyncio\n" "from socket import socketpair\n" @@ -3049,7 +3110,7 @@ msgid "" " loop.close()" msgstr "" -#: ../../library/asyncio-eventloop.rst:2044 +#: ../../library/asyncio-eventloop.rst:2090 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." @@ -3057,7 +3118,7 @@ msgstr "" "トランスポート、プロトコル、および :meth:`loop.create_connection` メソッドを" "使用した同じような :ref:`例 `。 " -#: ../../library/asyncio-eventloop.rst:2048 +#: ../../library/asyncio-eventloop.rst:2094 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." @@ -3065,21 +3126,21 @@ msgstr "" "高水準の :func:`asyncio.open_connection` 関数とストリームを使用したもうひとつ" "の :ref:`実装例 `。" -#: ../../library/asyncio-eventloop.rst:2056 +#: ../../library/asyncio-eventloop.rst:2102 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "SIGINT および SIGTERM 用のシグナルハンドラーの設定" -#: ../../library/asyncio-eventloop.rst:2058 +#: ../../library/asyncio-eventloop.rst:2104 msgid "(This ``signal`` example only works on Unix.)" msgstr "" -#: ../../library/asyncio-eventloop.rst:2060 +#: ../../library/asyncio-eventloop.rst:2106 msgid "" "Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal." "SIGTERM` using the :meth:`loop.add_signal_handler` method::" msgstr "" -#: ../../library/asyncio-eventloop.rst:2063 +#: ../../library/asyncio-eventloop.rst:2109 msgid "" "import asyncio\n" "import functools\n" diff --git a/library/asyncio-exceptions.po b/library/asyncio-exceptions.po index c43ea035f..b8270cd2e 100644 --- a/library/asyncio-exceptions.po +++ b/library/asyncio-exceptions.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-extending.po b/library/asyncio-extending.po index 59aa8ffa8..56c64a3c5 100644 --- a/library/asyncio-extending.po +++ b/library/asyncio-extending.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/library/asyncio-future.po b/library/asyncio-future.po index b6ac0c3fb..60f4027e8 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-graph.po b/library/asyncio-graph.po index 934eee2ad..f40f54789 100644 --- a/library/asyncio-graph.po +++ b/library/asyncio-graph.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -23,7 +23,7 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../library/asyncio-graph.rst:8 -msgid "Call Graph Introspection" +msgid "Call graph introspection" msgstr "" #: ../../library/asyncio-graph.rst:10 @@ -38,32 +38,41 @@ msgid "" "within a Python program or by external profilers and debuggers." msgstr "" -#: ../../library/asyncio-graph.rst:25 +#: ../../library/asyncio-graph.rst:22 +msgid ":ref:`asyncio-introspection-tools`" +msgstr "" + +#: ../../library/asyncio-graph.rst:23 +msgid "" +"Command-line tools for inspecting tasks in another running Python process." +msgstr "" + +#: ../../library/asyncio-graph.rst:31 msgid "" "Print the async call graph for the current task or the provided :class:" "`Task` or :class:`Future`." msgstr "" -#: ../../library/asyncio-graph.rst:28 +#: ../../library/asyncio-graph.rst:34 msgid "" "This function prints entries starting from the top frame and going down " "towards the invocation point." msgstr "" -#: ../../library/asyncio-graph.rst:31 +#: ../../library/asyncio-graph.rst:37 msgid "" "The function receives an optional *future* argument. If not passed, the " "current running task will be used." msgstr "" -#: ../../library/asyncio-graph.rst:34 ../../library/asyncio-graph.rst:93 +#: ../../library/asyncio-graph.rst:40 ../../library/asyncio-graph.rst:99 msgid "" "If the function is called on *the current task*, the optional keyword-only " "*depth* argument can be used to skip the specified number of frames from top " "of the stack." msgstr "" -#: ../../library/asyncio-graph.rst:38 +#: ../../library/asyncio-graph.rst:44 msgid "" "If the optional keyword-only *limit* argument is provided, each call stack " "in the resulting graph is truncated to include at most ``abs(limit)`` " @@ -74,21 +83,21 @@ msgid "" "is printed." msgstr "" -#: ../../library/asyncio-graph.rst:46 +#: ../../library/asyncio-graph.rst:52 msgid "" "If *file* is omitted or ``None``, the function will print to :data:`sys." "stdout`." msgstr "" -#: ../../library/asyncio-graph.rst:49 +#: ../../library/asyncio-graph.rst:55 msgid "**Example:**" msgstr "" -#: ../../library/asyncio-graph.rst:51 +#: ../../library/asyncio-graph.rst:57 msgid "The following Python code:" msgstr "" -#: ../../library/asyncio-graph.rst:53 +#: ../../library/asyncio-graph.rst:59 msgid "" "import asyncio\n" "\n" @@ -102,11 +111,11 @@ msgid "" "asyncio.run(main())" msgstr "" -#: ../../library/asyncio-graph.rst:66 +#: ../../library/asyncio-graph.rst:72 msgid "will print::" msgstr "このサンプルコードは以下を出力します::" -#: ../../library/asyncio-graph.rst:68 +#: ../../library/asyncio-graph.rst:74 msgid "" "* Task(name='test', id=0x1039f0fe0)\n" "+ Call stack:\n" @@ -118,62 +127,62 @@ msgid "" " | File 't2.py', line 7, in async main()" msgstr "" -#: ../../library/asyncio-graph.rst:79 +#: ../../library/asyncio-graph.rst:85 msgid "" "Like :func:`print_call_graph`, but returns a string. If *future* is ``None`` " "and there's no current task, the function returns an empty string." msgstr "" -#: ../../library/asyncio-graph.rst:86 +#: ../../library/asyncio-graph.rst:92 msgid "" "Capture the async call graph for the current task or the provided :class:" "`Task` or :class:`Future`." msgstr "" -#: ../../library/asyncio-graph.rst:89 +#: ../../library/asyncio-graph.rst:95 msgid "" "The function receives an optional *future* argument. If not passed, the " "current running task will be used. If there's no current task, the function " "returns ``None``." msgstr "" -#: ../../library/asyncio-graph.rst:97 +#: ../../library/asyncio-graph.rst:103 msgid "Returns a ``FutureCallGraph`` data class object:" msgstr "" -#: ../../library/asyncio-graph.rst:99 +#: ../../library/asyncio-graph.rst:105 msgid "``FutureCallGraph(future, call_stack, awaited_by)``" msgstr "" -#: ../../library/asyncio-graph.rst:101 +#: ../../library/asyncio-graph.rst:107 msgid "" "Where *future* is a reference to a :class:`Future` or a :class:`Task` (or " "their subclasses.)" msgstr "" -#: ../../library/asyncio-graph.rst:104 +#: ../../library/asyncio-graph.rst:110 msgid "``call_stack`` is a tuple of ``FrameCallGraphEntry`` objects." msgstr "" -#: ../../library/asyncio-graph.rst:106 +#: ../../library/asyncio-graph.rst:112 msgid "``awaited_by`` is a tuple of ``FutureCallGraph`` objects." msgstr "" -#: ../../library/asyncio-graph.rst:108 +#: ../../library/asyncio-graph.rst:114 msgid "``FrameCallGraphEntry(frame)``" msgstr "" -#: ../../library/asyncio-graph.rst:110 +#: ../../library/asyncio-graph.rst:116 msgid "" "Where *frame* is a frame object of a regular Python function in the call " "stack." msgstr "" -#: ../../library/asyncio-graph.rst:115 +#: ../../library/asyncio-graph.rst:121 msgid "Low level utility functions" msgstr "" -#: ../../library/asyncio-graph.rst:117 +#: ../../library/asyncio-graph.rst:123 msgid "" "To introspect an async call graph asyncio requires cooperation from control " "flow structures, such as :func:`shield` or :class:`TaskGroup`. Any time an " @@ -184,23 +193,23 @@ msgid "" "control." msgstr "" -#: ../../library/asyncio-graph.rst:128 +#: ../../library/asyncio-graph.rst:134 msgid "Record that *future* is awaited on by *waiter*." msgstr "" -#: ../../library/asyncio-graph.rst:130 ../../library/asyncio-graph.rst:143 +#: ../../library/asyncio-graph.rst:136 ../../library/asyncio-graph.rst:149 msgid "" "Both *future* and *waiter* must be instances of :class:`Future` or :class:" "`Task` or their subclasses, otherwise the call would have no effect." msgstr "" -#: ../../library/asyncio-graph.rst:134 +#: ../../library/asyncio-graph.rst:140 msgid "" "A call to ``future_add_to_awaited_by()`` must be followed by an eventual " "call to the :func:`future_discard_from_awaited_by` function with the same " "arguments." msgstr "" -#: ../../library/asyncio-graph.rst:141 +#: ../../library/asyncio-graph.rst:147 msgid "Record that *future* is no longer awaited on by *waiter*." msgstr "" diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index e4097eb83..fcd012d48 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index 19fe445c1..06f66ec48 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-25 14:37+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -48,11 +48,18 @@ msgstr "" ":meth:`loop.add_reader` と :meth:`loop.add_writer` をファイル I/O を監視する" "ためには使えません。" -#: ../../library/asyncio-platforms.rst:24 +#: ../../library/asyncio-platforms.rst:22 +msgid "" +":meth:`loop.connect_read_pipe` and :meth:`loop.connect_write_pipe` cannot be " +"used with regular files. See :ref:`Supported pipe objects ` for the objects that are accepted on each platform." +msgstr "" + +#: ../../library/asyncio-platforms.rst:29 msgid "Windows" msgstr "Windows" -#: ../../library/asyncio-platforms.rst:26 +#: ../../library/asyncio-platforms.rst:31 msgid "" "**Source code:** :source:`Lib/asyncio/proactor_events.py`, :source:`Lib/" "asyncio/windows_events.py`, :source:`Lib/asyncio/windows_utils.py`" @@ -60,17 +67,17 @@ msgstr "" "**ソースコード:** :source:`Lib/asyncio/proactor_events.py`, :source:`Lib/" "asyncio/windows_events.py`, :source:`Lib/asyncio/windows_utils.py`" -#: ../../library/asyncio-platforms.rst:34 +#: ../../library/asyncio-platforms.rst:39 msgid "On Windows, :class:`ProactorEventLoop` is now the default event loop." msgstr "" "Windows では :class:`ProactorEventLoop` がデフォルトのイベントループになりま" "した。" -#: ../../library/asyncio-platforms.rst:36 +#: ../../library/asyncio-platforms.rst:41 msgid "All event loops on Windows do not support the following methods:" msgstr "全ての Windows 上のイベントループは以下のメソッドをサポートしません:" -#: ../../library/asyncio-platforms.rst:38 +#: ../../library/asyncio-platforms.rst:43 msgid "" ":meth:`loop.create_unix_connection` and :meth:`loop.create_unix_server` are " "not supported. The :const:`socket.AF_UNIX` socket family is specific to Unix." @@ -79,7 +86,7 @@ msgstr "" "ポートされません。 :const:`socket.AF_UNIX` ソケットファミリーは Unix 固有で" "す。" -#: ../../library/asyncio-platforms.rst:42 +#: ../../library/asyncio-platforms.rst:47 msgid "" ":meth:`loop.add_signal_handler` and :meth:`loop.remove_signal_handler` are " "not supported." @@ -87,11 +94,11 @@ msgstr "" ":meth:`loop.add_signal_handler` と :meth:`loop.remove_signal_handler` はサ" "ポートされていません。" -#: ../../library/asyncio-platforms.rst:45 +#: ../../library/asyncio-platforms.rst:50 msgid ":class:`SelectorEventLoop` has the following limitations:" msgstr ":class:`SelectorEventLoop` は以下の制限があります:" -#: ../../library/asyncio-platforms.rst:47 +#: ../../library/asyncio-platforms.rst:52 msgid "" ":class:`~selectors.SelectSelector` is used to wait on socket events: it " "supports sockets and is limited to 512 sockets." @@ -99,7 +106,7 @@ msgstr "" ":class:`~selectors.SelectSelector` はソケットイベントの待ち受けに使われます: " "このクラスはソケットをサポートしますが 512 ソケットまでに制限されています。" -#: ../../library/asyncio-platforms.rst:50 +#: ../../library/asyncio-platforms.rst:55 msgid "" ":meth:`loop.add_reader` and :meth:`loop.add_writer` only accept socket " "handles (e.g. pipe file descriptors are not supported)." @@ -107,7 +114,7 @@ msgstr "" ":meth:`loop.add_reader` と :meth:`loop.add_writer` はソケットハンドルのみを受" "け付けます (たとえばパイプファイル記述子はサポートされていません)。" -#: ../../library/asyncio-platforms.rst:53 +#: ../../library/asyncio-platforms.rst:58 msgid "" "Pipes are not supported, so the :meth:`loop.connect_read_pipe` and :meth:" "`loop.connect_write_pipe` methods are not implemented." @@ -115,7 +122,7 @@ msgstr "" "パイプはサポートされていません。従って :meth:`loop.connect_read_pipe` と :" "meth:`loop.connect_write_pipe` の2つのメソッドは未実装です。" -#: ../../library/asyncio-platforms.rst:56 +#: ../../library/asyncio-platforms.rst:61 msgid "" ":ref:`Subprocesses ` are not supported, i.e. :meth:`loop." "subprocess_exec` and :meth:`loop.subprocess_shell` methods are not " @@ -125,18 +132,25 @@ msgstr "" "meth:`loop.subprocess_exec` と :meth:`loop.subprocess_shell` の2つのメソッド" "は未実装です。" -#: ../../library/asyncio-platforms.rst:60 +#: ../../library/asyncio-platforms.rst:65 msgid ":class:`ProactorEventLoop` has the following limitations:" msgstr ":class:`ProactorEventLoop` は以下の制限があります:" -#: ../../library/asyncio-platforms.rst:62 +#: ../../library/asyncio-platforms.rst:67 msgid "" "The :meth:`loop.add_reader` and :meth:`loop.add_writer` methods are not " "supported." msgstr "" ":meth:`loop.add_reader` と :meth:`loop.add_writer` はサポートされていません。" -#: ../../library/asyncio-platforms.rst:65 +#: ../../library/asyncio-platforms.rst:70 +msgid "" +":meth:`loop.connect_read_pipe` and :meth:`loop.connect_write_pipe` only " +"accept a handle opened for overlapped I/O. See :ref:`Supported pipe objects " +"` for which objects are supported." +msgstr "" + +#: ../../library/asyncio-platforms.rst:74 msgid "" "The resolution of the monotonic clock on Windows is usually around 15.6 " "milliseconds. The best resolution is 0.5 milliseconds. The resolution " @@ -148,11 +162,11 @@ msgstr "" "wiki/High_Precision_Event_Timer>`_ が利用可能かどうか) および WIndows の設定" "に依存します。" -#: ../../library/asyncio-platforms.rst:75 +#: ../../library/asyncio-platforms.rst:84 msgid "Subprocess Support on Windows" msgstr "Windows におけるサブプロセスのサポート" -#: ../../library/asyncio-platforms.rst:77 +#: ../../library/asyncio-platforms.rst:86 msgid "" "On Windows, the default event loop :class:`ProactorEventLoop` supports " "subprocesses, whereas :class:`SelectorEventLoop` does not." @@ -161,19 +175,19 @@ msgstr "" "ブプロセスをサポートしますが、 :class:`SelectorEventLoop` はサポートしませ" "ん。" -#: ../../library/asyncio-platforms.rst:82 +#: ../../library/asyncio-platforms.rst:91 msgid "macOS" msgstr "macOS" -#: ../../library/asyncio-platforms.rst:84 +#: ../../library/asyncio-platforms.rst:93 msgid "Modern macOS versions are fully supported." msgstr "最近の macOS バージョンは完全にサポートされています。" -#: ../../library/asyncio-platforms.rst:87 +#: ../../library/asyncio-platforms.rst:96 msgid "macOS <= 10.8" msgstr "10.8 以前の macOS" -#: ../../library/asyncio-platforms.rst:88 +#: ../../library/asyncio-platforms.rst:97 msgid "" "On macOS 10.6, 10.7 and 10.8, the default event loop uses :class:`selectors." "KqueueSelector`, which does not support character devices on these " @@ -188,7 +202,7 @@ msgstr "" "class:`~selectors.SelectSelector` または :class:`~selectors.PollSelector` を" "使うように手動で設定します。以下はその例です::" -#: ../../library/asyncio-platforms.rst:95 +#: ../../library/asyncio-platforms.rst:104 msgid "" "import asyncio\n" "import selectors\n" diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index ed3c9287f..b690b399b 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po index c7eaca3e4..e3573825f 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index 230e4f371..c7bdd0a79 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -128,11 +128,16 @@ msgstr "" "直ちに利用できるアイテムがあるときはそれを、そうでなければ :exc:`QueueEmpty` " "を返します。" -#: ../../library/asyncio-queue.rst:77 +#: ../../library/asyncio-queue.rst:74 +msgid "" +"Raises :exc:`QueueShutDown` if the queue has been shut down and is empty." +msgstr "" + +#: ../../library/asyncio-queue.rst:79 msgid "Block until all items in the queue have been received and processed." msgstr "キューにある全ての要素が取得され、処理されるまでブロックします。" -#: ../../library/asyncio-queue.rst:79 +#: ../../library/asyncio-queue.rst:81 msgid "" "The count of unfinished tasks goes up whenever an item is added to the " "queue. The count goes down whenever a consumer coroutine calls :meth:" @@ -145,7 +150,7 @@ msgstr "" "知するために :meth:`task_done` を呼び出すと減算されます。未完了のタスクのカウ" "ント値がゼロになると、 :meth:`join` のブロックは解除されます。" -#: ../../library/asyncio-queue.rst:88 +#: ../../library/asyncio-queue.rst:90 msgid "" "Put an item into the queue. If the queue is full, wait until a free slot is " "available before adding the item." @@ -153,52 +158,52 @@ msgstr "" "要素をキューに入力します。キューが満杯の場合、要素を追加する前に空きスロット" "が利用できるようになるまで待機します。" -#: ../../library/asyncio-queue.rst:91 +#: ../../library/asyncio-queue.rst:93 ../../library/asyncio-queue.rst:101 msgid "Raises :exc:`QueueShutDown` if the queue has been shut down." msgstr "" -#: ../../library/asyncio-queue.rst:95 +#: ../../library/asyncio-queue.rst:97 msgid "Put an item into the queue without blocking." msgstr "ブロックせずにアイテムをキューに追加します。" -#: ../../library/asyncio-queue.rst:97 +#: ../../library/asyncio-queue.rst:99 msgid "If no free slot is immediately available, raise :exc:`QueueFull`." msgstr "直ちに利用できるスロットがない場合、:exc:`QueueFull` を送出します。" -#: ../../library/asyncio-queue.rst:101 +#: ../../library/asyncio-queue.rst:105 msgid "Return the number of items in the queue." msgstr "キュー内の要素数を返します。" -#: ../../library/asyncio-queue.rst:105 +#: ../../library/asyncio-queue.rst:109 msgid "Put a :class:`Queue` instance into a shutdown mode." msgstr "" -#: ../../library/asyncio-queue.rst:107 +#: ../../library/asyncio-queue.rst:111 msgid "" "The queue can no longer grow. Future calls to :meth:`~Queue.put` raise :exc:" "`QueueShutDown`. Currently blocked callers of :meth:`~Queue.put` will be " "unblocked and will raise :exc:`QueueShutDown` in the formerly awaiting task." msgstr "" -#: ../../library/asyncio-queue.rst:112 +#: ../../library/asyncio-queue.rst:116 msgid "" "If *immediate* is false (the default), the queue can be wound down normally " "with :meth:`~Queue.get` calls to extract tasks that have already been loaded." msgstr "" -#: ../../library/asyncio-queue.rst:116 +#: ../../library/asyncio-queue.rst:120 msgid "" "And if :meth:`~Queue.task_done` is called for each remaining task, a " "pending :meth:`~Queue.join` will be unblocked normally." msgstr "" -#: ../../library/asyncio-queue.rst:119 +#: ../../library/asyncio-queue.rst:123 msgid "" "Once the queue is empty, future calls to :meth:`~Queue.get` will raise :exc:" "`QueueShutDown`." msgstr "" -#: ../../library/asyncio-queue.rst:122 +#: ../../library/asyncio-queue.rst:126 msgid "" "If *immediate* is true, the queue is terminated immediately. The queue is " "drained to be completely empty and the count of unfinished tasks is reduced " @@ -208,25 +213,25 @@ msgid "" "empty." msgstr "" -#: ../../library/asyncio-queue.rst:130 +#: ../../library/asyncio-queue.rst:134 msgid "" "Use caution when using :meth:`~Queue.join` with *immediate* set to true. " "This unblocks the join even when no work has been done on the tasks, " "violating the usual invariant for joining a queue." msgstr "" -#: ../../library/asyncio-queue.rst:138 +#: ../../library/asyncio-queue.rst:142 msgid "Indicate that a formerly enqueued work item is complete." msgstr "" -#: ../../library/asyncio-queue.rst:140 +#: ../../library/asyncio-queue.rst:144 msgid "" "Used by queue consumers. For each :meth:`~Queue.get` used to fetch a work " "item, a subsequent call to :meth:`task_done` tells the queue that the " "processing on the work item is complete." msgstr "" -#: ../../library/asyncio-queue.rst:144 +#: ../../library/asyncio-queue.rst:148 msgid "" "If a :meth:`join` is currently blocking, it will resume when all items have " "been processed (meaning that a :meth:`task_done` call was received for every " @@ -236,7 +241,7 @@ msgstr "" "`~Queue.put` でキューに追加された全アイテムの :meth:`task_done` の呼び出しを" "受信したとき) に再開します。" -#: ../../library/asyncio-queue.rst:149 +#: ../../library/asyncio-queue.rst:153 msgid "" "Raises :exc:`ValueError` if called more times than there were items placed " "in the queue." @@ -244,11 +249,11 @@ msgstr "" "キューに追加されているアイテム数以上の呼び出しが行われたときに :exc:" "`ValueError` を送出します。" -#: ../../library/asyncio-queue.rst:154 +#: ../../library/asyncio-queue.rst:158 msgid "Priority Queue" msgstr "優先度付きのキュー" -#: ../../library/asyncio-queue.rst:158 +#: ../../library/asyncio-queue.rst:162 msgid "" "A variant of :class:`Queue`; retrieves entries in priority order (lowest " "first)." @@ -256,15 +261,15 @@ msgstr "" ":class:`Queue` の変種です; 優先順位にしたがって要素を取り出します (最低順位が" "最初に取り出されます)。" -#: ../../library/asyncio-queue.rst:161 +#: ../../library/asyncio-queue.rst:165 msgid "Entries are typically tuples of the form ``(priority_number, data)``." msgstr "項目は典型的には ``(priority_number, data)`` 形式のタプルです。" -#: ../../library/asyncio-queue.rst:166 +#: ../../library/asyncio-queue.rst:170 msgid "LIFO Queue" msgstr "LIFO キュー" -#: ../../library/asyncio-queue.rst:170 +#: ../../library/asyncio-queue.rst:174 msgid "" "A variant of :class:`Queue` that retrieves most recently added entries first " "(last in, first out)." @@ -272,11 +277,11 @@ msgstr "" ":class:`Queue` の変種で、最後に追加された項目を最初に取り出します (後入れ先出" "し、またはスタック)。" -#: ../../library/asyncio-queue.rst:175 +#: ../../library/asyncio-queue.rst:179 msgid "Exceptions" msgstr "例外" -#: ../../library/asyncio-queue.rst:179 +#: ../../library/asyncio-queue.rst:183 msgid "" "This exception is raised when the :meth:`~Queue.get_nowait` method is called " "on an empty queue." @@ -284,7 +289,7 @@ msgstr "" "この例外は :meth:`~Queue.get_nowait` メソッドが空のキューに対して呼ばれたとき" "に送出されます。" -#: ../../library/asyncio-queue.rst:185 +#: ../../library/asyncio-queue.rst:189 msgid "" "Exception raised when the :meth:`~Queue.put_nowait` method is called on a " "queue that has reached its *maxsize*." @@ -292,24 +297,25 @@ msgstr "" "サイズが *maxsize* に達したキューに対して :meth:`~Queue.put_nowait` メソッド" "が 呼ばれたときに送出される例外です。" -#: ../../library/asyncio-queue.rst:191 +#: ../../library/asyncio-queue.rst:195 msgid "" -"Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on " -"a queue which has been shut down." +"Exception raised when :meth:`~Queue.put`, :meth:`~Queue.put_nowait`, :meth:" +"`~Queue.get` or :meth:`~Queue.get_nowait` is called on a queue which has " +"been shut down." msgstr "" -#: ../../library/asyncio-queue.rst:198 +#: ../../library/asyncio-queue.rst:203 msgid "Examples" msgstr "使用例" -#: ../../library/asyncio-queue.rst:202 +#: ../../library/asyncio-queue.rst:207 msgid "" "Queues can be used to distribute workload between several concurrent tasks::" msgstr "" "キューを使って、並行処理を行う複数のタスクにワークロードを分散させることがで" "きます::" -#: ../../library/asyncio-queue.rst:205 +#: ../../library/asyncio-queue.rst:210 msgid "" "import asyncio\n" "import random\n" diff --git a/library/asyncio-runner.po b/library/asyncio-runner.po index fd5d0ad6b..46c14d32b 100644 --- a/library/asyncio-runner.po +++ b/library/asyncio-runner.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index d66b7c828..e88ced286 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-25 14:37+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -46,7 +46,7 @@ msgid "Here is an example of a TCP echo client written using asyncio streams::" msgstr "" "以下は asyncio ストリームを使って書いた TCP エコークライアントの例です::" -#: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:441 +#: ../../library/asyncio-stream.rst:22 ../../library/asyncio-stream.rst:451 msgid "" "import asyncio\n" "\n" @@ -136,7 +136,7 @@ msgstr "*loop* パラメータが削除されました。" #: ../../library/asyncio-stream.rst:87 ../../library/asyncio-stream.rst:131 #: ../../library/asyncio-stream.rst:167 ../../library/asyncio-stream.rst:202 -#: ../../library/asyncio-stream.rst:408 +#: ../../library/asyncio-stream.rst:418 msgid "Added the *ssl_shutdown_timeout* parameter." msgstr "*ssl_shutdown_timeout* パラメータが追加されました。" @@ -511,19 +511,28 @@ msgstr "" "をブロックします。待ち受けの必要がない場合、 :meth:`drain` は即座にリターンし" "ます。" -#: ../../library/asyncio-stream.rst:389 +#: ../../library/asyncio-stream.rst:387 +msgid "" +"When the write buffer is below the high watermark, :meth:`drain` returns " +"immediately without yielding to the event loop. As a result, code which " +"repeatedly calls ``write()`` followed by ``await drain()`` may prevent other " +"tasks from running. To prevent blocking behavior, yield to the event loop " +"explicitly with ``await asyncio.sleep(0)`` (see :func:`asyncio.sleep`)." +msgstr "" + +#: ../../library/asyncio-stream.rst:399 msgid "Upgrade an existing stream-based connection to TLS." msgstr "" -#: ../../library/asyncio-stream.rst:391 +#: ../../library/asyncio-stream.rst:401 msgid "Parameters:" msgstr "引数:" -#: ../../library/asyncio-stream.rst:393 +#: ../../library/asyncio-stream.rst:403 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "*sslcontext*: 構成済みの :class:`~ssl.SSLContext` インスタンスです。" -#: ../../library/asyncio-stream.rst:395 +#: ../../library/asyncio-stream.rst:405 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." @@ -531,52 +540,52 @@ msgstr "" "*server_hostname*: 対象のサーバーの証明書との照合に使われるホスト名を設定また" "は上書きします。" -#: ../../library/asyncio-stream.rst:398 +#: ../../library/asyncio-stream.rst:408 msgid "" "*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake " "to complete before aborting the connection. ``60.0`` seconds if ``None`` " "(default)." msgstr "" -#: ../../library/asyncio-stream.rst:402 +#: ../../library/asyncio-stream.rst:412 msgid "" "*ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown " "to complete before aborting the connection. ``30.0`` seconds if ``None`` " "(default)." msgstr "" -#: ../../library/asyncio-stream.rst:414 +#: ../../library/asyncio-stream.rst:424 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "" "ストリームがクローズされたか、またはクローズ処理中の場合に ``True`` を返しま" "す。" -#: ../../library/asyncio-stream.rst:422 +#: ../../library/asyncio-stream.rst:432 msgid "Wait until the stream is closed." msgstr "ストリームがクローズされるまで待機します。" -#: ../../library/asyncio-stream.rst:424 +#: ../../library/asyncio-stream.rst:434 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " "is closed, ensuring that all data has been flushed before e.g. exiting the " "program." msgstr "" -#: ../../library/asyncio-stream.rst:432 +#: ../../library/asyncio-stream.rst:442 msgid "Examples" msgstr "使用例" -#: ../../library/asyncio-stream.rst:437 +#: ../../library/asyncio-stream.rst:447 msgid "TCP echo client using streams" msgstr "ストリームを使った TCP Echo クライアント" -#: ../../library/asyncio-stream.rst:439 +#: ../../library/asyncio-stream.rst:449 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" ":func:`asyncio.open_connection` 関数を使った TCP Echo クライアントです::" -#: ../../library/asyncio-stream.rst:463 +#: ../../library/asyncio-stream.rst:473 msgid "" "The :ref:`TCP echo client protocol " "` example uses the low-level :meth:" @@ -586,15 +595,15 @@ msgstr "" "` の例は低水準の :meth:`loop." "create_connection` メソッドを使っています。" -#: ../../library/asyncio-stream.rst:470 +#: ../../library/asyncio-stream.rst:480 msgid "TCP echo server using streams" msgstr "ストリームを使った TCP Echo サーバー" -#: ../../library/asyncio-stream.rst:472 +#: ../../library/asyncio-stream.rst:482 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr ":func:`asyncio.start_server` 関数を使った TCP Echo サーバーです::" -#: ../../library/asyncio-stream.rst:474 +#: ../../library/asyncio-stream.rst:484 msgid "" "import asyncio\n" "\n" @@ -626,7 +635,7 @@ msgid "" "asyncio.run(main())" msgstr "" -#: ../../library/asyncio-stream.rst:506 +#: ../../library/asyncio-stream.rst:516 msgid "" "The :ref:`TCP echo server protocol " "` example uses the :meth:`loop." @@ -636,17 +645,17 @@ msgstr "" "` の例は :meth:`loop." "create_server` メソッドを使っています。" -#: ../../library/asyncio-stream.rst:511 +#: ../../library/asyncio-stream.rst:521 msgid "Get HTTP headers" msgstr "HTTP ヘッダーの取得" -#: ../../library/asyncio-stream.rst:513 +#: ../../library/asyncio-stream.rst:523 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" "コマンドラインから渡された URL の HTTP ヘッダーを問い合わせる簡単な例です::" -#: ../../library/asyncio-stream.rst:515 +#: ../../library/asyncio-stream.rst:525 msgid "" "import asyncio\n" "import urllib.parse\n" @@ -685,27 +694,27 @@ msgid "" "asyncio.run(print_http_headers(url))" msgstr "" -#: ../../library/asyncio-stream.rst:552 +#: ../../library/asyncio-stream.rst:562 msgid "Usage::" msgstr "使い方::" -#: ../../library/asyncio-stream.rst:554 +#: ../../library/asyncio-stream.rst:564 msgid "python example.py http://example.com/path/page.html" msgstr "" -#: ../../library/asyncio-stream.rst:556 +#: ../../library/asyncio-stream.rst:566 msgid "or with HTTPS::" msgstr "または HTTPS を使用::" -#: ../../library/asyncio-stream.rst:558 +#: ../../library/asyncio-stream.rst:568 msgid "python example.py https://example.com/path/page.html" msgstr "" -#: ../../library/asyncio-stream.rst:564 +#: ../../library/asyncio-stream.rst:574 msgid "Register an open socket to wait for data using streams" msgstr "ストリームを使ってデータを待つオープンソケットの登録" -#: ../../library/asyncio-stream.rst:566 +#: ../../library/asyncio-stream.rst:576 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" @@ -713,7 +722,7 @@ msgstr "" ":func:`open_connection` 関数を使ってソケットがデータを受信するまで待つコルー" "チンです::" -#: ../../library/asyncio-stream.rst:569 +#: ../../library/asyncio-stream.rst:579 msgid "" "import asyncio\n" "import socket\n" @@ -746,7 +755,7 @@ msgid "" "asyncio.run(wait_for_data())" msgstr "" -#: ../../library/asyncio-stream.rst:601 +#: ../../library/asyncio-stream.rst:611 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " @@ -756,7 +765,7 @@ msgstr "" "` 例では、低水準のプロトコルと :meth:" "`loop.create_connection` メソッドを使っています。" -#: ../../library/asyncio-stream.rst:605 +#: ../../library/asyncio-stream.rst:615 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index e9971e97f..2feca4747 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index 2c68aaf08..931f37057 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 8ef367e74..22c99e76a 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-13 17:08+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -470,23 +470,39 @@ msgid "" " task.add_done_callback(background_tasks.discard)" msgstr "" -#: ../../library/asyncio-task.rst:293 ../../library/asyncio-task.rst:1239 +#: ../../library/asyncio-task.rst:291 +msgid "" +"Note that this approach never awaits the tasks, so if a task fails, its " +"exception is never retrieved and asyncio logs a \"Task exception was never " +"retrieved\" message when the task is garbage collected. To avoid this, use :" +"class:`asyncio.TaskGroup` which keeps a strong reference to each task, " +"awaits them and propagates their exceptions::" +msgstr "" + +#: ../../library/asyncio-task.rst:298 +msgid "" +"async with asyncio.TaskGroup() as tg:\n" +" for i in range(10):\n" +" tg.create_task(some_coro(param=i))" +msgstr "" + +#: ../../library/asyncio-task.rst:304 ../../library/asyncio-task.rst:1265 msgid "Added the *name* parameter." msgstr "*name* パラメータを追加しました。" -#: ../../library/asyncio-task.rst:296 ../../library/asyncio-task.rst:1246 +#: ../../library/asyncio-task.rst:307 ../../library/asyncio-task.rst:1272 msgid "Added the *context* parameter." msgstr "*context* パラメータを追加しました。" -#: ../../library/asyncio-task.rst:299 +#: ../../library/asyncio-task.rst:310 msgid "Added the *eager_start* parameter by passing on all *kwargs*." msgstr "" -#: ../../library/asyncio-task.rst:304 +#: ../../library/asyncio-task.rst:315 msgid "Task cancellation" msgstr "" -#: ../../library/asyncio-task.rst:306 +#: ../../library/asyncio-task.rst:317 msgid "" "Tasks can easily and safely be cancelled. When a task is cancelled, :exc:" "`asyncio.CancelledError` will be raised in the task at the next opportunity." @@ -494,7 +510,7 @@ msgstr "" "タスクは簡単に、そして安全にキャンセルできます。タスクがキャンセルされた場" "合、:exc:`asyncio.CancelledError` が次の機会に送出されます。" -#: ../../library/asyncio-task.rst:310 +#: ../../library/asyncio-task.rst:321 msgid "" "It is recommended that coroutines use ``try/finally`` blocks to robustly " "perform clean-up logic. In case :exc:`asyncio.CancelledError` is explicitly " @@ -503,7 +519,7 @@ msgid "" "code will not need to be aware of it." msgstr "" -#: ../../library/asyncio-task.rst:316 +#: ../../library/asyncio-task.rst:327 msgid "" "The asyncio components that enable structured concurrency, like :class:" "`asyncio.TaskGroup` and :func:`asyncio.timeout`, are implemented using " @@ -514,47 +530,47 @@ msgid "" "``uncancel()`` to completely remove the cancellation state." msgstr "" -#: ../../library/asyncio-task.rst:328 +#: ../../library/asyncio-task.rst:339 msgid "Task groups" msgstr "" -#: ../../library/asyncio-task.rst:330 +#: ../../library/asyncio-task.rst:341 msgid "" "Task groups combine a task creation API with a convenient and reliable way " "to wait for all tasks in the group to finish." msgstr "" -#: ../../library/asyncio-task.rst:335 +#: ../../library/asyncio-task.rst:346 msgid "" "An :ref:`asynchronous context manager ` holding a " "group of tasks. Tasks can be added to the group using :meth:`create_task`. " "All tasks are awaited when the context manager exits." msgstr "" -#: ../../library/asyncio-task.rst:344 +#: ../../library/asyncio-task.rst:355 msgid "" "Create a task in this task group. The signature matches that of :func:" "`asyncio.create_task`. If the task group is inactive (e.g. not yet entered, " "already finished, or in the process of shutting down), we will close the " -"given ``coro``." +"given ``coro`` and raise :exc:`RuntimeError`." msgstr "" -#: ../../library/asyncio-task.rst:352 +#: ../../library/asyncio-task.rst:363 msgid "Close the given coroutine if the task group is not active." msgstr "" -#: ../../library/asyncio-task.rst:356 +#: ../../library/asyncio-task.rst:367 msgid "Passes on all *kwargs* to :meth:`loop.create_task`" msgstr "" -#: ../../library/asyncio-task.rst:360 +#: ../../library/asyncio-task.rst:371 msgid "" "Cancel the task group. This is a non-exceptional, early exit of the task " "group's lifetime -- useful once the group's goal has been met or its " "services no longer needed." msgstr "" -#: ../../library/asyncio-task.rst:364 +#: ../../library/asyncio-task.rst:375 msgid "" ":meth:`~asyncio.Task.cancel` will be called on any tasks in the group that " "aren't yet done, as well as the parent (body) of the group. The task group " @@ -562,7 +578,7 @@ msgid "" "raised." msgstr "" -#: ../../library/asyncio-task.rst:368 +#: ../../library/asyncio-task.rst:379 msgid "" "If :meth:`cancel` is called before entering the task group, the group will " "be cancelled upon entry. This is useful for patterns where one piece of " @@ -570,39 +586,39 @@ msgid "" "order to have the ability to cancel anything run within the group." msgstr "" -#: ../../library/asyncio-task.rst:373 +#: ../../library/asyncio-task.rst:384 msgid "" ":meth:`cancel` is idempotent and may be called after the task group has " "already exited." msgstr "" -#: ../../library/asyncio-task.rst:376 +#: ../../library/asyncio-task.rst:387 msgid "Some ways to use :meth:`cancel`:" msgstr "" -#: ../../library/asyncio-task.rst:378 +#: ../../library/asyncio-task.rst:389 msgid "call it from the task group body based on some condition or event" msgstr "" -#: ../../library/asyncio-task.rst:379 +#: ../../library/asyncio-task.rst:390 msgid "" "pass the task group instance to child tasks via :meth:`create_task`, " -"allowing a child task to conditionally cancel the entire entire group" +"allowing a child task to conditionally cancel the entire group" msgstr "" -#: ../../library/asyncio-task.rst:381 +#: ../../library/asyncio-task.rst:392 msgid "" "pass the task group instance or bound :meth:`cancel` method to some other " "task *before* opening the task group, allowing remote cancellation" msgstr "" -#: ../../library/asyncio-task.rst:386 ../../library/asyncio-task.rst:546 -#: ../../library/asyncio-task.rst:719 ../../library/asyncio-task.rst:780 -#: ../../library/asyncio-task.rst:806 ../../library/asyncio-task.rst:847 +#: ../../library/asyncio-task.rst:397 ../../library/asyncio-task.rst:565 +#: ../../library/asyncio-task.rst:738 ../../library/asyncio-task.rst:799 +#: ../../library/asyncio-task.rst:825 ../../library/asyncio-task.rst:862 msgid "Example::" msgstr "以下はプログラム例です::" -#: ../../library/asyncio-task.rst:388 +#: ../../library/asyncio-task.rst:399 msgid "" "async def main():\n" " async with asyncio.TaskGroup() as tg:\n" @@ -612,7 +628,7 @@ msgid "" "result()}\")" msgstr "" -#: ../../library/asyncio-task.rst:394 +#: ../../library/asyncio-task.rst:405 msgid "" "The ``async with`` statement will wait for all tasks in the group to finish. " "While waiting, new tasks may still be added to the group (for example, by " @@ -623,7 +639,7 @@ msgid "" "may be added to the group." msgstr "" -#: ../../library/asyncio-task.rst:402 +#: ../../library/asyncio-task.rst:413 msgid "" "The first time any of the tasks belonging to the group fails with an " "exception other than :exc:`asyncio.CancelledError`, the remaining tasks in " @@ -635,7 +651,7 @@ msgid "" "bubble out of the containing ``async with`` statement." msgstr "" -#: ../../library/asyncio-task.rst:412 +#: ../../library/asyncio-task.rst:423 msgid "" "Once all tasks have finished, if any tasks have failed with an exception " "other than :exc:`asyncio.CancelledError`, those exceptions are combined in " @@ -643,7 +659,7 @@ msgid "" "their documentation) which is then raised." msgstr "" -#: ../../library/asyncio-task.rst:419 +#: ../../library/asyncio-task.rst:430 msgid "" "Two base exceptions are treated specially: If any task fails with :exc:" "`KeyboardInterrupt` or :exc:`SystemExit`, the task group still cancels the " @@ -652,7 +668,7 @@ msgid "" "`ExceptionGroup` or :exc:`BaseExceptionGroup`." msgstr "" -#: ../../library/asyncio-task.rst:425 +#: ../../library/asyncio-task.rst:436 msgid "" "If the body of the ``async with`` statement exits with an exception (so :" "meth:`~object.__aexit__` is called with an exception set), this is treated " @@ -661,10 +677,13 @@ msgid "" "exception group and raised. The exception passed into :meth:`~object." "__aexit__`, unless it is :exc:`asyncio.CancelledError`, is also included in " "the exception group. The same special case is made for :exc:" -"`KeyboardInterrupt` and :exc:`SystemExit` as in the previous paragraph." +"`KeyboardInterrupt` and :exc:`SystemExit` as in the previous paragraph. " +"There is an additional special case made only for the body of the ``async " +"with``: if it raises :exc:`GeneratorExit` and none of the other tasks raise " +"exceptions that would be reported, then the :exc:`GeneratorExit` is reraised." msgstr "" -#: ../../library/asyncio-task.rst:437 +#: ../../library/asyncio-task.rst:452 msgid "" "Task groups are careful not to mix up the internal cancellation used to " "\"wake up\" their :meth:`~object.__aexit__` with cancellation requests for " @@ -675,7 +694,7 @@ msgid "" "receive another cancellation and process its own exceptions." msgstr "" -#: ../../library/asyncio-task.rst:445 +#: ../../library/asyncio-task.rst:460 msgid "" "In the case where a task group is cancelled externally and also must raise " "an :exc:`ExceptionGroup`, it will call the parent task's :meth:`~asyncio." @@ -683,27 +702,31 @@ msgid "" "be raised at the next :keyword:`await`, so the cancellation is not lost." msgstr "" -#: ../../library/asyncio-task.rst:451 +#: ../../library/asyncio-task.rst:466 msgid "" "Task groups preserve the cancellation count reported by :meth:`asyncio.Task." "cancelling`." msgstr "" -#: ../../library/asyncio-task.rst:456 +#: ../../library/asyncio-task.rst:471 msgid "" "Improved handling of simultaneous internal and external cancellations and " "correct preservation of cancellation counts." msgstr "" -#: ../../library/asyncio-task.rst:460 +#: ../../library/asyncio-task.rst:476 +msgid "Addition of the special case for :exc:`GeneratorExit`." +msgstr "" + +#: ../../library/asyncio-task.rst:479 msgid "Sleeping" msgstr "スリープ" -#: ../../library/asyncio-task.rst:465 +#: ../../library/asyncio-task.rst:484 msgid "Block for *delay* seconds." msgstr "*delay* 秒だけ停止します。" -#: ../../library/asyncio-task.rst:467 +#: ../../library/asyncio-task.rst:486 msgid "" "If *result* is provided, it is returned to the caller when the coroutine " "completes." @@ -711,14 +734,14 @@ msgstr "" "*result* が提供されている場合は、コルーチン完了時にそれが呼び出し元に返されま" "す。" -#: ../../library/asyncio-task.rst:470 +#: ../../library/asyncio-task.rst:489 msgid "" "``sleep()`` always suspends the current task, allowing other tasks to run." msgstr "" "``sleep()`` は常に現在の Task を一時中断し、他の Task が実行されるのを許可し" "ます。" -#: ../../library/asyncio-task.rst:473 +#: ../../library/asyncio-task.rst:492 msgid "" "Setting the delay to 0 provides an optimized path to allow other tasks to " "run. This can be used by long-running functions to avoid blocking the event " @@ -728,12 +751,12 @@ msgstr "" "す。この方法は、実行時間の長い関数が、その実行時間全体にわたってイベントルー" "プをブロックしないようにするために利用できます。" -#: ../../library/asyncio-task.rst:479 +#: ../../library/asyncio-task.rst:498 msgid "" "Example of coroutine displaying the current date every second for 5 seconds::" msgstr "現在の時刻を5秒間、毎秒表示するコルーチンの例::" -#: ../../library/asyncio-task.rst:482 +#: ../../library/asyncio-task.rst:501 msgid "" "import asyncio\n" "import datetime as dt\n" @@ -750,21 +773,21 @@ msgid "" "asyncio.run(display_date())" msgstr "" -#: ../../library/asyncio-task.rst:497 ../../library/asyncio-task.rst:595 -#: ../../library/asyncio-task.rst:694 ../../library/asyncio-task.rst:872 -#: ../../library/asyncio-task.rst:927 ../../library/asyncio-task.rst:984 +#: ../../library/asyncio-task.rst:516 ../../library/asyncio-task.rst:614 +#: ../../library/asyncio-task.rst:713 ../../library/asyncio-task.rst:887 +#: ../../library/asyncio-task.rst:949 ../../library/asyncio-task.rst:1010 msgid "Removed the *loop* parameter." msgstr "*loop* パラメータが削除されました。" -#: ../../library/asyncio-task.rst:500 +#: ../../library/asyncio-task.rst:519 msgid "Raises :exc:`ValueError` if *delay* is :data:`~math.nan`." msgstr "" -#: ../../library/asyncio-task.rst:505 +#: ../../library/asyncio-task.rst:524 msgid "Running tasks concurrently" msgstr "" -#: ../../library/asyncio-task.rst:509 +#: ../../library/asyncio-task.rst:528 msgid "" "Run :ref:`awaitable objects ` in the *aws* sequence " "*concurrently*." @@ -772,7 +795,7 @@ msgstr "" "*aws* シーケンスにある :ref:`awaitable オブジェクト ` を " "*並行* 実行します。" -#: ../../library/asyncio-task.rst:512 +#: ../../library/asyncio-task.rst:531 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task." @@ -780,7 +803,7 @@ msgstr "" "*aws* にある awaitable がコルーチンである場合、自動的に Task としてスケジュー" "ルされます。" -#: ../../library/asyncio-task.rst:515 +#: ../../library/asyncio-task.rst:534 msgid "" "If all awaitables are completed successfully, the result is an aggregate " "list of returned values. The order of result values corresponds to the " @@ -790,7 +813,7 @@ msgstr "" "す。\n" "返り値の順序は、 *aws* での awaitable の順序に相当します。" -#: ../../library/asyncio-task.rst:519 +#: ../../library/asyncio-task.rst:538 msgid "" "If *return_exceptions* is ``False`` (default), the first raised exception is " "immediately propagated to the task that awaits on ``gather()``. Other " @@ -801,7 +824,7 @@ msgstr "" "await しているタスクに対して、最初の例外が直接伝えられます。*aws* に並んでい" "る他の awaitable は、**キャンセルされずに** 引き続いて実行されます。" -#: ../../library/asyncio-task.rst:524 +#: ../../library/asyncio-task.rst:543 msgid "" "If *return_exceptions* is ``True``, exceptions are treated the same as " "successful results, and aggregated in the result list." @@ -809,7 +832,7 @@ msgstr "" "*return_exceptions* が ``True`` だった場合、例外は成功した結果と同じように取" "り扱われ、結果リストに集められます。" -#: ../../library/asyncio-task.rst:527 +#: ../../library/asyncio-task.rst:546 msgid "" "If ``gather()`` is *cancelled*, all submitted awaitables (that have not " "completed yet) are also *cancelled*." @@ -817,7 +840,7 @@ msgstr "" "``gather()`` が *キャンセル* された場合、起動された全ての (未完了の) " "awaitable も *キャンセル* されます。" -#: ../../library/asyncio-task.rst:530 +#: ../../library/asyncio-task.rst:549 msgid "" "If any Task or Future from the *aws* sequence is *cancelled*, it is treated " "as if it raised :exc:`CancelledError` -- the ``gather()`` call is **not** " @@ -830,7 +853,7 @@ msgstr "" "これは、起動された 1 つの Task あるいは Future のキャンセルが、他の Task ある" "いは Future のキャンセルを引き起こすのを避けるためです。" -#: ../../library/asyncio-task.rst:537 +#: ../../library/asyncio-task.rst:556 msgid "" "A new alternative to create and run tasks concurrently and wait for their " "completion is :class:`asyncio.TaskGroup`. *TaskGroup* provides stronger " @@ -840,7 +863,7 @@ msgid "" "tasks." msgstr "" -#: ../../library/asyncio-task.rst:548 +#: ../../library/asyncio-task.rst:567 msgid "" "import asyncio\n" "\n" @@ -879,7 +902,7 @@ msgid "" "# [2, 6, 24]" msgstr "" -#: ../../library/asyncio-task.rst:584 +#: ../../library/asyncio-task.rst:603 msgid "" "If *return_exceptions* is false, cancelling gather() after it has been " "marked done won't cancel any submitted awaitables. For instance, gather can " @@ -888,7 +911,7 @@ msgid "" "the awaitables) from gather won't cancel any other awaitables." msgstr "" -#: ../../library/asyncio-task.rst:591 +#: ../../library/asyncio-task.rst:610 msgid "" "If the *gather* itself is cancelled, the cancellation is propagated " "regardless of *return_exceptions*." @@ -896,22 +919,22 @@ msgstr "" "*gather* 自身がキャンセルされた場合は、 *return_exceptions* の値に関わらず" "キャンセルが伝搬されます。" -#: ../../library/asyncio-task.rst:598 +#: ../../library/asyncio-task.rst:617 msgid "" "Deprecation warning is emitted if no positional arguments are provided or " "not all positional arguments are Future-like objects and there is no running " "event loop." msgstr "" -#: ../../library/asyncio-task.rst:607 +#: ../../library/asyncio-task.rst:626 msgid "Eager task factory" msgstr "" -#: ../../library/asyncio-task.rst:611 +#: ../../library/asyncio-task.rst:630 msgid "A task factory for eager task execution." msgstr "" -#: ../../library/asyncio-task.rst:613 +#: ../../library/asyncio-task.rst:632 msgid "" "When using this factory (via :meth:`loop.set_task_factory(asyncio." "eager_task_factory) `), coroutines begin execution " @@ -921,13 +944,13 @@ msgid "" "synchronously." msgstr "" -#: ../../library/asyncio-task.rst:619 +#: ../../library/asyncio-task.rst:638 msgid "" "A common example where this is beneficial is coroutines which employ caching " "or memoization to avoid actual I/O when possible." msgstr "" -#: ../../library/asyncio-task.rst:624 +#: ../../library/asyncio-task.rst:643 msgid "" "Immediate execution of the coroutine is a semantic change. If the coroutine " "returns or raises, the task is never scheduled to the event loop. If the " @@ -936,32 +959,32 @@ msgid "" "the application's task execution order is likely to change." msgstr "" -#: ../../library/asyncio-task.rst:635 +#: ../../library/asyncio-task.rst:654 msgid "" "Create an eager task factory, similar to :func:`eager_task_factory`, using " "the provided *custom_task_constructor* when creating a new task instead of " "the default :class:`Task`." msgstr "" -#: ../../library/asyncio-task.rst:639 +#: ../../library/asyncio-task.rst:658 msgid "" "*custom_task_constructor* must be a *callable* with the signature matching " "the signature of :class:`Task.__init__ `. The callable must return a :" "class:`asyncio.Task`-compatible object." msgstr "" -#: ../../library/asyncio-task.rst:643 +#: ../../library/asyncio-task.rst:662 msgid "" "This function returns a *callable* intended to be used as a task factory of " "an event loop via :meth:`loop.set_task_factory(factory) `)." msgstr "" -#: ../../library/asyncio-task.rst:650 +#: ../../library/asyncio-task.rst:669 msgid "Shielding from cancellation" msgstr "" -#: ../../library/asyncio-task.rst:654 +#: ../../library/asyncio-task.rst:673 msgid "" "Protect an :ref:`awaitable object ` from being :meth:" "`cancelled `." @@ -969,30 +992,30 @@ msgstr "" ":meth:`キャンセル ` から :ref:`awaitable オブジェクト ` を保護します。" -#: ../../library/asyncio-task.rst:657 ../../library/asyncio-task.rst:827 +#: ../../library/asyncio-task.rst:676 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." msgstr "" "*aw* がコルーチンだった場合、自動的に Task としてスケジュールされます。" -#: ../../library/asyncio-task.rst:659 +#: ../../library/asyncio-task.rst:678 msgid "The statement::" msgstr "文::" -#: ../../library/asyncio-task.rst:661 +#: ../../library/asyncio-task.rst:680 msgid "" "task = asyncio.create_task(something())\n" "res = await shield(task)" msgstr "" -#: ../../library/asyncio-task.rst:664 +#: ../../library/asyncio-task.rst:683 msgid "is equivalent to::" msgstr "は、以下と同じです ::" -#: ../../library/asyncio-task.rst:666 +#: ../../library/asyncio-task.rst:685 msgid "res = await something()" msgstr "" -#: ../../library/asyncio-task.rst:668 +#: ../../library/asyncio-task.rst:687 msgid "" "*except* that if the coroutine containing it is cancelled, the Task running " "in ``something()`` is not cancelled. From the point of view of " @@ -1006,7 +1029,7 @@ msgstr "" "呼び出し元がキャンセルされた場合でも、 \"await\" 式は :exc:`CancelledError` " "を送出します。" -#: ../../library/asyncio-task.rst:674 +#: ../../library/asyncio-task.rst:693 msgid "" "If ``something()`` is cancelled by other means (i.e. from within itself) " "that would also cancel ``shield()``." @@ -1014,7 +1037,7 @@ msgstr "" "注意: ``something()`` が他の理由 (例えば、原因が自分自身) でキャンセルされた" "場合は ``shield()`` でも保護できません。" -#: ../../library/asyncio-task.rst:677 +#: ../../library/asyncio-task.rst:696 msgid "" "If it is desired to completely ignore cancellation (not recommended) the " "``shield()`` function should be combined with a try/except clause, as " @@ -1023,7 +1046,7 @@ msgstr "" "完全にキャンセルを無視したい場合 (推奨はしません) は、 ``shield()`` 関数は次" "のように try/except 節と組み合わせることになるでしょう::" -#: ../../library/asyncio-task.rst:681 +#: ../../library/asyncio-task.rst:700 msgid "" "task = asyncio.create_task(something())\n" "try:\n" @@ -1032,7 +1055,7 @@ msgid "" " res = None" msgstr "" -#: ../../library/asyncio-task.rst:689 +#: ../../library/asyncio-task.rst:708 msgid "" "Save a reference to tasks passed to this function, to avoid a task " "disappearing mid-execution. The event loop only keeps weak references to " @@ -1040,43 +1063,43 @@ msgid "" "any time, even before it's done." msgstr "" -#: ../../library/asyncio-task.rst:697 +#: ../../library/asyncio-task.rst:716 msgid "" "Deprecation warning is emitted if *aw* is not Future-like object and there " "is no running event loop." msgstr "" -#: ../../library/asyncio-task.rst:703 +#: ../../library/asyncio-task.rst:722 msgid "Timeouts" msgstr "タイムアウト" -#: ../../library/asyncio-task.rst:707 +#: ../../library/asyncio-task.rst:726 msgid "" "Return an :ref:`asynchronous context manager ` that " "can be used to limit the amount of time spent waiting on something." msgstr "" -#: ../../library/asyncio-task.rst:711 +#: ../../library/asyncio-task.rst:730 msgid "" "*delay* can either be ``None``, or a float/int number of seconds to wait. If " "*delay* is ``None``, no time limit will be applied; this can be useful if " "the delay is unknown when the context manager is created." msgstr "" -#: ../../library/asyncio-task.rst:716 +#: ../../library/asyncio-task.rst:735 msgid "" "In either case, the context manager can be rescheduled after creation using :" "meth:`Timeout.reschedule`." msgstr "" -#: ../../library/asyncio-task.rst:721 +#: ../../library/asyncio-task.rst:740 msgid "" "async def main():\n" " async with asyncio.timeout(10):\n" " await long_running_task()" msgstr "" -#: ../../library/asyncio-task.rst:725 +#: ../../library/asyncio-task.rst:744 msgid "" "If ``long_running_task`` takes more than 10 seconds to complete, the context " "manager will cancel the current task and handle the resulting :exc:`asyncio." @@ -1084,18 +1107,18 @@ msgid "" "can be caught and handled." msgstr "" -#: ../../library/asyncio-task.rst:732 +#: ../../library/asyncio-task.rst:751 msgid "" "The :func:`asyncio.timeout` context manager is what transforms the :exc:" "`asyncio.CancelledError` into a :exc:`TimeoutError`, which means the :exc:" "`TimeoutError` can only be caught *outside* of the context manager." msgstr "" -#: ../../library/asyncio-task.rst:737 +#: ../../library/asyncio-task.rst:756 msgid "Example of catching :exc:`TimeoutError`::" msgstr "" -#: ../../library/asyncio-task.rst:739 +#: ../../library/asyncio-task.rst:758 msgid "" "async def main():\n" " try:\n" @@ -1107,54 +1130,54 @@ msgid "" " print(\"This statement will run regardless.\")" msgstr "" -#: ../../library/asyncio-task.rst:748 +#: ../../library/asyncio-task.rst:767 msgid "" "The context manager produced by :func:`asyncio.timeout` can be rescheduled " "to a different deadline and inspected." msgstr "" -#: ../../library/asyncio-task.rst:753 +#: ../../library/asyncio-task.rst:772 msgid "" "An :ref:`asynchronous context manager ` for " "cancelling overdue coroutines." msgstr "" -#: ../../library/asyncio-task.rst:756 +#: ../../library/asyncio-task.rst:775 msgid "" "Prefer using :func:`asyncio.timeout` or :func:`asyncio.timeout_at` rather " "than instantiating :class:`!Timeout` directly." msgstr "" -#: ../../library/asyncio-task.rst:759 +#: ../../library/asyncio-task.rst:778 msgid "" "``when`` should be an absolute time at which the context should time out, as " "measured by the event loop's clock:" msgstr "" -#: ../../library/asyncio-task.rst:762 +#: ../../library/asyncio-task.rst:781 msgid "If ``when`` is ``None``, the timeout will never trigger." msgstr "" -#: ../../library/asyncio-task.rst:763 +#: ../../library/asyncio-task.rst:782 msgid "" "If ``when < loop.time()``, the timeout will trigger on the next iteration of " "the event loop." msgstr "" -#: ../../library/asyncio-task.rst:768 +#: ../../library/asyncio-task.rst:787 msgid "" "Return the current deadline, or ``None`` if the current deadline is not set." msgstr "" -#: ../../library/asyncio-task.rst:773 +#: ../../library/asyncio-task.rst:792 msgid "Reschedule the timeout." msgstr "" -#: ../../library/asyncio-task.rst:777 +#: ../../library/asyncio-task.rst:796 msgid "Return whether the context manager has exceeded its deadline (expired)." msgstr "" -#: ../../library/asyncio-task.rst:782 +#: ../../library/asyncio-task.rst:801 msgid "" "async def main():\n" " try:\n" @@ -1172,17 +1195,17 @@ msgid "" " print(\"Looks like we haven't finished on time.\")" msgstr "" -#: ../../library/asyncio-task.rst:797 +#: ../../library/asyncio-task.rst:816 msgid "Timeout context managers can be safely nested." msgstr "" -#: ../../library/asyncio-task.rst:803 +#: ../../library/asyncio-task.rst:822 msgid "" "Similar to :func:`asyncio.timeout`, except *when* is the absolute time to " "stop waiting, or ``None``." msgstr "" -#: ../../library/asyncio-task.rst:808 +#: ../../library/asyncio-task.rst:827 msgid "" "async def main():\n" " loop = get_running_loop()\n" @@ -1196,7 +1219,7 @@ msgid "" " print(\"This statement will run regardless.\")" msgstr "" -#: ../../library/asyncio-task.rst:824 +#: ../../library/asyncio-task.rst:843 msgid "" "Wait for the *aw* :ref:`awaitable ` to complete with a " "timeout." @@ -1204,7 +1227,7 @@ msgstr "" "*aw* :ref:`awaitable ` が、完了するかタイムアウトになるの" "を待ちます。" -#: ../../library/asyncio-task.rst:829 +#: ../../library/asyncio-task.rst:846 msgid "" "*timeout* can either be ``None`` or a float or int number of seconds to wait " "for. If *timeout* is ``None``, block until the future completes." @@ -1213,20 +1236,15 @@ msgstr "" "す。\n" "*timeout* が ``None`` の場合、 Future が完了するまで待ちます。" -#: ../../library/asyncio-task.rst:833 -msgid "" -"If a timeout occurs, it cancels the task and raises :exc:`TimeoutError`." +#: ../../library/asyncio-task.rst:850 +msgid "If a timeout occurs, it cancels *aw* and raises :exc:`TimeoutError`." msgstr "" -#: ../../library/asyncio-task.rst:836 -msgid "" -"To avoid the task :meth:`cancellation `, wrap it in :func:" -"`shield`." +#: ../../library/asyncio-task.rst:852 +msgid "To prevent *aw* from being cancelled, wrap it in :func:`shield`." msgstr "" -"Task の :meth:`キャンセル ` を避けるためには、 :func:`shield` の" -"中にラップしてください。" -#: ../../library/asyncio-task.rst:839 +#: ../../library/asyncio-task.rst:854 msgid "" "The function will wait until the future is actually cancelled, so the total " "wait time may exceed the *timeout*. If an exception happens during " @@ -1236,11 +1254,11 @@ msgstr "" "*timeout* を超えることがあります。キャンセル中に例外が発生した場合は、その例" "外は伝達されます。" -#: ../../library/asyncio-task.rst:843 +#: ../../library/asyncio-task.rst:858 msgid "If the wait is cancelled, the future *aw* is also cancelled." msgstr "待機が中止された場合 *aw* も中止されます。" -#: ../../library/asyncio-task.rst:849 +#: ../../library/asyncio-task.rst:864 msgid "" "async def eternity():\n" " # Sleep for one hour\n" @@ -1261,44 +1279,50 @@ msgid "" "# timeout!" msgstr "" -#: ../../library/asyncio-task.rst:867 +#: ../../library/asyncio-task.rst:882 msgid "" "When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " "cancelled. Previously, it raised :exc:`TimeoutError` immediately." msgstr "" -#: ../../library/asyncio-task.rst:875 +#: ../../library/asyncio-task.rst:890 msgid "Raises :exc:`TimeoutError` instead of :exc:`asyncio.TimeoutError`." msgstr "" -#: ../../library/asyncio-task.rst:880 +#: ../../library/asyncio-task.rst:893 +msgid "" +"Implemented using :func:`asyncio.timeout`, a coroutine passed as *aw* is no " +"longer wrapped in a :class:`Task` when *timeout* is positive." +msgstr "" + +#: ../../library/asyncio-task.rst:899 msgid "Waiting primitives" msgstr "" -#: ../../library/asyncio-task.rst:885 +#: ../../library/asyncio-task.rst:904 msgid "" "Run :class:`~asyncio.Future` and :class:`~asyncio.Task` instances in the " "*aws* iterable concurrently and block until the condition specified by " "*return_when*." msgstr "" -#: ../../library/asyncio-task.rst:889 +#: ../../library/asyncio-task.rst:908 msgid "The *aws* iterable must not be empty." msgstr "イテラブル *aws* は空であってはなりません。" -#: ../../library/asyncio-task.rst:891 +#: ../../library/asyncio-task.rst:910 msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." msgstr "Task/Future からなる 2 つの集合 ``(done, pending)`` を返します。" -#: ../../library/asyncio-task.rst:893 +#: ../../library/asyncio-task.rst:912 msgid "Usage::" msgstr "使い方::" -#: ../../library/asyncio-task.rst:895 +#: ../../library/asyncio-task.rst:914 msgid "done, pending = await asyncio.wait(aws)" msgstr "" -#: ../../library/asyncio-task.rst:897 +#: ../../library/asyncio-task.rst:916 msgid "" "*timeout* (a float or int), if specified, can be used to control the maximum " "number of seconds to wait before returning." @@ -1306,14 +1330,14 @@ msgstr "" "*timeout* (浮動小数点数または整数) が指定されていたら、処理を返すのを待つ最大" "秒数を制御するのに使われます。" -#: ../../library/asyncio-task.rst:900 +#: ../../library/asyncio-task.rst:919 msgid "" "Note that this function does not raise :exc:`TimeoutError`. Futures or Tasks " "that aren't done when the timeout occurs are simply returned in the second " "set." msgstr "" -#: ../../library/asyncio-task.rst:904 +#: ../../library/asyncio-task.rst:923 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -1321,30 +1345,30 @@ msgstr "" "*return_when* でこの関数がいつ結果を返すか指定します。指定できる値は以下の 定" "数のどれか一つです:" -#: ../../library/asyncio-task.rst:910 +#: ../../library/asyncio-task.rst:929 msgid "Constant" msgstr "定数" -#: ../../library/asyncio-task.rst:911 +#: ../../library/asyncio-task.rst:930 msgid "Description" msgstr "説明" -#: ../../library/asyncio-task.rst:914 +#: ../../library/asyncio-task.rst:933 msgid "The function will return when any future finishes or is cancelled." msgstr "いずれかのフューチャが終了したかキャンセルされたときに返します。" -#: ../../library/asyncio-task.rst:917 +#: ../../library/asyncio-task.rst:936 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" "`ALL_COMPLETED`." msgstr "" -#: ../../library/asyncio-task.rst:922 +#: ../../library/asyncio-task.rst:941 msgid "The function will return when all futures finish or are cancelled." msgstr "すべてのフューチャが終了したかキャンセルされたときに返します。" -#: ../../library/asyncio-task.rst:924 +#: ../../library/asyncio-task.rst:943 msgid "" "Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " "when a timeout occurs." @@ -1352,22 +1376,28 @@ msgstr "" ":func:`~asyncio.wait_for` と異なり、 ``wait()`` はタイムアウトが起きたとき" "に Future をキャンセルしません。" -#: ../../library/asyncio-task.rst:930 +#: ../../library/asyncio-task.rst:946 +msgid "" +"If ``wait()`` is cancelled, the futures in *aws* are not cancelled and " +"continue to run." +msgstr "" + +#: ../../library/asyncio-task.rst:952 msgid "Passing coroutine objects to ``wait()`` directly is forbidden." msgstr "" -#: ../../library/asyncio-task.rst:933 ../../library/asyncio-task.rst:991 +#: ../../library/asyncio-task.rst:955 ../../library/asyncio-task.rst:1017 msgid "Added support for generators yielding tasks." msgstr "" -#: ../../library/asyncio-task.rst:939 +#: ../../library/asyncio-task.rst:961 msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " "concurrently. The returned object can be iterated to obtain the results of " "the awaitables as they finish." msgstr "" -#: ../../library/asyncio-task.rst:943 +#: ../../library/asyncio-task.rst:965 msgid "" "The object returned by ``as_completed()`` can be iterated as an :term:" "`asynchronous iterator` or a plain :term:`iterator`. When asynchronous " @@ -1376,7 +1406,7 @@ msgid "" "tasks with their results. Example::" msgstr "" -#: ../../library/asyncio-task.rst:949 +#: ../../library/asyncio-task.rst:971 msgid "" "ipv4_connect = create_task(open_connection(\"127.0.0.1\", 80))\n" "ipv6_connect = create_task(open_connection(\"::1\", 80))\n" @@ -1393,20 +1423,20 @@ msgid "" " print(\"IPv4 connection established.\")" msgstr "" -#: ../../library/asyncio-task.rst:963 +#: ../../library/asyncio-task.rst:985 msgid "" "During asynchronous iteration, implicitly-created tasks will be yielded for " "supplied awaitables that aren't tasks or futures." msgstr "" -#: ../../library/asyncio-task.rst:966 +#: ../../library/asyncio-task.rst:988 msgid "" "When used as a plain iterator, each iteration yields a new coroutine that " "returns the result or raises the exception of the next completed awaitable. " "This pattern is compatible with Python versions older than 3.13::" msgstr "" -#: ../../library/asyncio-task.rst:970 +#: ../../library/asyncio-task.rst:992 msgid "" "ipv4_connect = create_task(open_connection(\"127.0.0.1\", 80))\n" "ipv6_connect = create_task(open_connection(\"::1\", 80))\n" @@ -1419,34 +1449,41 @@ msgid "" " reader, writer = await next_connect" msgstr "" -#: ../../library/asyncio-task.rst:980 +#: ../../library/asyncio-task.rst:1002 msgid "" "A :exc:`TimeoutError` is raised if the timeout occurs before all awaitables " "are done. This is raised by the ``async for`` loop during asynchronous " "iteration or by the coroutines yielded during plain iteration." msgstr "" -#: ../../library/asyncio-task.rst:987 +#: ../../library/asyncio-task.rst:1006 +msgid "" +"``as_completed()`` does not cancel the tasks running the supplied " +"awaitables: if a timeout occurs or the iteration is cancelled, the remaining " +"tasks continue to run." +msgstr "" + +#: ../../library/asyncio-task.rst:1013 msgid "" "Deprecation warning is emitted if not all awaitable objects in the *aws* " "iterable are Future-like objects and there is no running event loop." msgstr "" -#: ../../library/asyncio-task.rst:994 +#: ../../library/asyncio-task.rst:1020 msgid "" "The result can now be used as either an :term:`asynchronous iterator` or as " "a plain :term:`iterator` (previously it was only a plain iterator)." msgstr "" -#: ../../library/asyncio-task.rst:1000 +#: ../../library/asyncio-task.rst:1026 msgid "Running in threads" msgstr "" -#: ../../library/asyncio-task.rst:1005 +#: ../../library/asyncio-task.rst:1031 msgid "Asynchronously run function *func* in a separate thread." msgstr "別のスレッドで非同期的に関数 *func* を実行します。" -#: ../../library/asyncio-task.rst:1007 +#: ../../library/asyncio-task.rst:1033 msgid "" "Any \\*args and \\*\\*kwargs supplied for this function are directly passed " "to *func*. Also, the current :class:`contextvars.Context` is propagated, " @@ -1457,19 +1494,19 @@ msgstr "" "た、イベントループスレッドのコンテキスト変数に関数を実行するスレッドからアク" "セスできるように、現在の :class:`contextvars.Context` も伝播されます。" -#: ../../library/asyncio-task.rst:1012 +#: ../../library/asyncio-task.rst:1038 msgid "" "Return a coroutine that can be awaited to get the eventual result of *func*." msgstr "関数 *func* の最終結果を待ち受けできるコルーチンを返します。" -#: ../../library/asyncio-task.rst:1014 +#: ../../library/asyncio-task.rst:1040 msgid "" "This coroutine function is primarily intended to be used for executing IO-" "bound functions/methods that would otherwise block the event loop if they " "were run in the main thread. For example::" msgstr "" -#: ../../library/asyncio-task.rst:1018 +#: ../../library/asyncio-task.rst:1044 msgid "" "def blocking_io():\n" " print(f\"start blocking_io at {time.strftime('%X')}\")\n" @@ -1498,7 +1535,7 @@ msgid "" "# finished main at 19:50:54" msgstr "" -#: ../../library/asyncio-task.rst:1044 +#: ../../library/asyncio-task.rst:1070 msgid "" "Directly calling ``blocking_io()`` in any coroutine would block the event " "loop for its duration, resulting in an additional 1 second of run time. " @@ -1506,7 +1543,7 @@ msgid "" "thread without blocking the event loop." msgstr "" -#: ../../library/asyncio-task.rst:1051 +#: ../../library/asyncio-task.rst:1077 msgid "" "Due to the :term:`GIL`, ``asyncio.to_thread()`` can typically only be used " "to make IO-bound functions non-blocking. However, for extension modules that " @@ -1514,17 +1551,17 @@ msgid "" "``asyncio.to_thread()`` can also be used for CPU-bound functions." msgstr "" -#: ../../library/asyncio-task.rst:1060 +#: ../../library/asyncio-task.rst:1086 msgid "Scheduling from other threads" msgstr "" -#: ../../library/asyncio-task.rst:1064 +#: ../../library/asyncio-task.rst:1090 msgid "Submit a coroutine to the given event loop. Thread-safe." msgstr "" "与えられたイベントループにコルーチンを送ります。\n" "この処理は、スレッドセーフです。" -#: ../../library/asyncio-task.rst:1066 +#: ../../library/asyncio-task.rst:1092 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." @@ -1532,7 +1569,7 @@ msgstr "" "他の OS スレッドから結果を待つための :class:`concurrent.futures.Future` を返" "します。" -#: ../../library/asyncio-task.rst:1069 +#: ../../library/asyncio-task.rst:1095 msgid "" "This function is meant to be called from a different OS thread than the one " "where the event loop is running. Example::" @@ -1541,7 +1578,7 @@ msgstr "" "び出すためのものです。\n" "例えば次のように使います::" -#: ../../library/asyncio-task.rst:1072 +#: ../../library/asyncio-task.rst:1098 msgid "" "def in_thread(loop: asyncio.AbstractEventLoop) -> None:\n" " # Run some blocking IO\n" @@ -1565,11 +1602,11 @@ msgid "" " await asyncio.to_thread(in_thread, loop)" msgstr "" -#: ../../library/asyncio-task.rst:1092 +#: ../../library/asyncio-task.rst:1118 msgid "It's also possible to run the other way around. Example::" msgstr "" -#: ../../library/asyncio-task.rst:1094 +#: ../../library/asyncio-task.rst:1120 msgid "" "@contextlib.contextmanager\n" "def loop_in_thread() -> Generator[asyncio.AbstractEventLoop]:\n" @@ -1605,7 +1642,7 @@ msgid "" " assert future.result(timeout=2) == 3" msgstr "" -#: ../../library/asyncio-task.rst:1126 +#: ../../library/asyncio-task.rst:1152 msgid "" "If an exception is raised in the coroutine, the returned Future will be " "notified. It can also be used to cancel the task in the event loop::" @@ -1613,7 +1650,7 @@ msgstr "" "コルーチンから例外が送出された場合、返された Future に通知されます。\n" "これはイベントループの Task をキャンセルするのにも使えます::" -#: ../../library/asyncio-task.rst:1130 +#: ../../library/asyncio-task.rst:1156 msgid "" "try:\n" " result = future.result(timeout)\n" @@ -1626,14 +1663,14 @@ msgid "" " print(f'The coroutine returned: {result!r}')" msgstr "" -#: ../../library/asyncio-task.rst:1140 +#: ../../library/asyncio-task.rst:1166 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." msgstr "" "このドキュメントの :ref:`asyncio-multithreading` 節を参照してください。" -#: ../../library/asyncio-task.rst:1143 +#: ../../library/asyncio-task.rst:1169 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." @@ -1641,11 +1678,11 @@ msgstr "" "他の asyncio 関数とは異なり、この関数は明示的に渡される *loop* 引数を必要とし" "ます。" -#: ../../library/asyncio-task.rst:1150 +#: ../../library/asyncio-task.rst:1176 msgid "Introspection" msgstr "イントロスペクション" -#: ../../library/asyncio-task.rst:1155 +#: ../../library/asyncio-task.rst:1181 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." @@ -1653,7 +1690,7 @@ msgstr "" "現在実行中の :class:`Task` インスタンスを返します。実行中の Task が無い場合" "は ``None`` を返します。" -#: ../../library/asyncio-task.rst:1158 +#: ../../library/asyncio-task.rst:1184 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." @@ -1661,13 +1698,13 @@ msgstr "" "*loop* が ``None`` の場合、 :func:`get_running_loop` が現在のループを取得する" "のに使われます。" -#: ../../library/asyncio-task.rst:1166 +#: ../../library/asyncio-task.rst:1192 msgid "Return a set of not yet finished :class:`Task` objects run by the loop." msgstr "" "ループで実行された :class:`Task` オブジェクトでまだ完了していないものの集合を" "返します。" -#: ../../library/asyncio-task.rst:1169 +#: ../../library/asyncio-task.rst:1195 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." @@ -1675,15 +1712,15 @@ msgstr "" "*loop* が ``None`` の場合、 :func:`get_running_loop` は現在のループを取得する" "のに使われます。" -#: ../../library/asyncio-task.rst:1177 +#: ../../library/asyncio-task.rst:1203 msgid "Return ``True`` if *obj* is a coroutine object." msgstr "" -#: ../../library/asyncio-task.rst:1184 +#: ../../library/asyncio-task.rst:1210 msgid "Task object" msgstr "" -#: ../../library/asyncio-task.rst:1188 +#: ../../library/asyncio-task.rst:1214 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." @@ -1692,7 +1729,7 @@ msgstr "" "オブジェクトです。\n" "スレッドセーフではありません。" -#: ../../library/asyncio-task.rst:1191 +#: ../../library/asyncio-task.rst:1217 msgid "" "Tasks are used to run coroutines in event loops. If a coroutine awaits on a " "Future, the Task suspends the execution of the coroutine and waits for the " @@ -1704,7 +1741,7 @@ msgstr "" "止させ、 Future の完了を待ちます。\n" "Future が *完了* したら、 Task が内包しているコルーチンの実行を再開します。" -#: ../../library/asyncio-task.rst:1197 +#: ../../library/asyncio-task.rst:1223 msgid "" "Event loops use cooperative scheduling: an event loop runs one Task at a " "time. While a Task awaits for the completion of a Future, the event loop " @@ -1715,7 +1752,7 @@ msgstr "" "Task が Future の完了を待っているときは、イベントループは他の Task やコール" "バックを動作させるか、 IO 処理を実行します。" -#: ../../library/asyncio-task.rst:1202 +#: ../../library/asyncio-task.rst:1228 msgid "" "Use the high-level :func:`asyncio.create_task` function to create Tasks, or " "the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " @@ -1726,7 +1763,7 @@ msgstr "" "ださい。\n" "手作業での Task の実装は推奨されません。" -#: ../../library/asyncio-task.rst:1207 +#: ../../library/asyncio-task.rst:1233 msgid "" "To cancel a running Task use the :meth:`cancel` method. Calling it will " "cause the Task to throw a :exc:`CancelledError` exception into the wrapped " @@ -1734,7 +1771,7 @@ msgid "" "cancellation, the awaited object will be cancelled." msgstr "" -#: ../../library/asyncio-task.rst:1212 +#: ../../library/asyncio-task.rst:1238 msgid "" ":meth:`cancelled` can be used to check if the Task was cancelled. The method " "returns ``True`` if the wrapped coroutine did not suppress the :exc:" @@ -1745,7 +1782,7 @@ msgstr "" "タスクが実際にキャンセルされている場合に、このメソッドは ``True`` を変えま" "す。" -#: ../../library/asyncio-task.rst:1217 +#: ../../library/asyncio-task.rst:1243 msgid "" ":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" "meth:`Future.set_result` and :meth:`Future.set_exception`." @@ -1753,7 +1790,7 @@ msgstr "" ":class:`asyncio.Task` は、:meth:`Future.set_result` と :meth:`Future." "set_exception` を除いて、:class:`Future` の API をすべて継承しています。" -#: ../../library/asyncio-task.rst:1221 +#: ../../library/asyncio-task.rst:1247 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *coro* to run in. If no *context* is " @@ -1761,7 +1798,7 @@ msgid "" "in the copied context." msgstr "" -#: ../../library/asyncio-task.rst:1226 +#: ../../library/asyncio-task.rst:1252 msgid "" "An optional keyword-only *eager_start* argument allows eagerly starting the " "execution of the :class:`asyncio.Task` at task creation time. If set to " @@ -1771,31 +1808,31 @@ msgid "" "eagerly and will skip scheduling to the event loop." msgstr "" -#: ../../library/asyncio-task.rst:1233 +#: ../../library/asyncio-task.rst:1259 msgid "" "Tasks are :ref:`generic ` over the return type of their wrapped " "coroutines." msgstr "" -#: ../../library/asyncio-task.rst:1236 +#: ../../library/asyncio-task.rst:1262 msgid "Added support for the :mod:`contextvars` module." msgstr ":mod:`contextvars` モジュールのサポートを追加。" -#: ../../library/asyncio-task.rst:1242 +#: ../../library/asyncio-task.rst:1268 msgid "" "Deprecation warning is emitted if *loop* is not specified and there is no " "running event loop." msgstr "" -#: ../../library/asyncio-task.rst:1249 +#: ../../library/asyncio-task.rst:1275 msgid "Added the *eager_start* parameter." msgstr "" -#: ../../library/asyncio-task.rst:1254 +#: ../../library/asyncio-task.rst:1280 msgid "Return ``True`` if the Task is *done*." msgstr "Task が *完了* しているなら ``True`` を返します。" -#: ../../library/asyncio-task.rst:1256 +#: ../../library/asyncio-task.rst:1282 msgid "" "A Task is *done* when the wrapped coroutine either returned a value, raised " "an exception, or the Task was cancelled." @@ -1803,11 +1840,11 @@ msgstr "" "Task がラップしているコルーチンが値を返すか、例外を送出するか、または Task が" "キャンセルされたとき、 Task は *完了* します。" -#: ../../library/asyncio-task.rst:1261 +#: ../../library/asyncio-task.rst:1287 msgid "Return the result of the Task." msgstr "Task の結果を返します。" -#: ../../library/asyncio-task.rst:1263 +#: ../../library/asyncio-task.rst:1289 msgid "" "If the Task is *done*, the result of the wrapped coroutine is returned (or " "if the coroutine raised an exception, that exception is re-raised.)" @@ -1815,7 +1852,7 @@ msgstr "" "Task が *完了* している場合、ラップしているコルーチンの結果が返されます (コ" "ルーチンが例外を送出された場合、その例外が例外が再送出されます)" -#: ../../library/asyncio-task.rst:1267 ../../library/asyncio-task.rst:1281 +#: ../../library/asyncio-task.rst:1293 ../../library/asyncio-task.rst:1307 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." @@ -1823,17 +1860,17 @@ msgstr "" "Task が *キャンセル* されている場合、このメソッドは :exc:`CancelledError` 例" "外を送出します。" -#: ../../library/asyncio-task.rst:1270 +#: ../../library/asyncio-task.rst:1296 msgid "" "If the Task's result isn't yet available, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -#: ../../library/asyncio-task.rst:1275 +#: ../../library/asyncio-task.rst:1301 msgid "Return the exception of the Task." msgstr "Task の例外を返します。" -#: ../../library/asyncio-task.rst:1277 +#: ../../library/asyncio-task.rst:1303 msgid "" "If the wrapped coroutine raised an exception that exception is returned. If " "the wrapped coroutine returned normally this method returns ``None``." @@ -1841,7 +1878,7 @@ msgstr "" "ラップされたコルーチンが例外を送出した場合、その例外が返されます。ラップされ" "たコルーチンが正常終了した場合、このメソッドは ``None`` を返します。" -#: ../../library/asyncio-task.rst:1284 +#: ../../library/asyncio-task.rst:1310 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." @@ -1849,26 +1886,26 @@ msgstr "" "Task がまだ *完了* していない場合、このメソッドは :exc:`InvalidStateError` 例" "外を送出します。" -#: ../../library/asyncio-task.rst:1289 +#: ../../library/asyncio-task.rst:1315 msgid "Add a callback to be run when the Task is *done*." msgstr "Task が *完了* したときに実行されるコールバックを追加します。" -#: ../../library/asyncio-task.rst:1291 ../../library/asyncio-task.rst:1300 +#: ../../library/asyncio-task.rst:1317 ../../library/asyncio-task.rst:1326 msgid "This method should only be used in low-level callback-based code." msgstr "このメソッドは低水準のコールバックベースのコードでのみ使うべきです。" -#: ../../library/asyncio-task.rst:1293 +#: ../../library/asyncio-task.rst:1319 msgid "" "See the documentation of :meth:`Future.add_done_callback` for more details." msgstr "" "詳細については :meth:`Future.add_done_callback` のドキュメントを参照してくだ" "さい。" -#: ../../library/asyncio-task.rst:1298 +#: ../../library/asyncio-task.rst:1324 msgid "Remove *callback* from the callbacks list." msgstr "コールバックリストから *callback* を削除します。" -#: ../../library/asyncio-task.rst:1302 +#: ../../library/asyncio-task.rst:1328 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." @@ -1876,11 +1913,11 @@ msgstr "" "詳細については :meth:`Future.remove_done_callback` のドキュメントを参照してく" "ださい。" -#: ../../library/asyncio-task.rst:1307 +#: ../../library/asyncio-task.rst:1333 msgid "Return the list of stack frames for this Task." msgstr "このタスクのスタックフレームのリストを返します。" -#: ../../library/asyncio-task.rst:1309 +#: ../../library/asyncio-task.rst:1335 msgid "" "If the wrapped coroutine is not done, this returns the stack where it is " "suspended. If the coroutine has completed successfully or was cancelled, " @@ -1892,16 +1929,16 @@ msgstr "" "トを返します。コルーチンが例外で終了した場合はトレースバックフレームのリスト" "を返します。" -#: ../../library/asyncio-task.rst:1315 +#: ../../library/asyncio-task.rst:1341 msgid "The frames are always ordered from oldest to newest." msgstr "フレームは常に古いものから新しい物へ並んでいます。" -#: ../../library/asyncio-task.rst:1317 +#: ../../library/asyncio-task.rst:1343 msgid "Only one stack frame is returned for a suspended coroutine." msgstr "" "サスペンドされているコルーチンの場合スタックフレームが 1 個だけ返されます。" -#: ../../library/asyncio-task.rst:1319 +#: ../../library/asyncio-task.rst:1345 msgid "" "The optional *limit* argument sets the maximum number of frames to return; " "by default all available frames are returned. The ordering of the returned " @@ -1915,11 +1952,11 @@ msgstr "" "だリストが返されますが、トレースバックでは古い順に並んだリストが返されます" "(これは traceback モジュールの振る舞いと一致します)。" -#: ../../library/asyncio-task.rst:1328 +#: ../../library/asyncio-task.rst:1354 msgid "Print the stack or traceback for this Task." msgstr "このタスクのスタックまたはトレースバックを出力します。" -#: ../../library/asyncio-task.rst:1330 +#: ../../library/asyncio-task.rst:1356 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." @@ -1927,40 +1964,40 @@ msgstr "" "このメソッドは :meth:`get_stack` によって取得されるフレームに対し、 " "traceback モジュールと同じような出力を生成します。" -#: ../../library/asyncio-task.rst:1333 +#: ../../library/asyncio-task.rst:1359 msgid "The *limit* argument is passed to :meth:`get_stack` directly." msgstr "引数 *limit* は :meth:`get_stack` にそのまま渡されます。" -#: ../../library/asyncio-task.rst:1335 +#: ../../library/asyncio-task.rst:1361 msgid "" "The *file* argument is an I/O stream to which the output is written; by " "default output is written to :data:`sys.stdout`." msgstr "" -#: ../../library/asyncio-task.rst:1340 +#: ../../library/asyncio-task.rst:1366 msgid "Return the coroutine object wrapped by the :class:`Task`." msgstr ":class:`Task` がラップしているコルーチンオブジェクトを返します。" -#: ../../library/asyncio-task.rst:1344 +#: ../../library/asyncio-task.rst:1370 msgid "" "This will return ``None`` for Tasks which have already completed eagerly. " "See the :ref:`Eager Task Factory `." msgstr "" -#: ../../library/asyncio-task.rst:1351 +#: ../../library/asyncio-task.rst:1377 msgid "Newly added eager task execution means result may be ``None``." msgstr "" -#: ../../library/asyncio-task.rst:1355 +#: ../../library/asyncio-task.rst:1381 msgid "" "Return the :class:`contextvars.Context` object associated with the task." msgstr "" -#: ../../library/asyncio-task.rst:1362 +#: ../../library/asyncio-task.rst:1388 msgid "Return the name of the Task." msgstr "Task の名前を返します。" -#: ../../library/asyncio-task.rst:1364 +#: ../../library/asyncio-task.rst:1390 msgid "" "If no name has been explicitly assigned to the Task, the default asyncio " "Task implementation generates a default name during instantiation." @@ -1968,17 +2005,17 @@ msgstr "" "Task に対して明示的に名前が設定されていない場合, デフォルトの asyncio Task 実" "装はタスクをインスタンス化する際にデフォルトの名前を生成します。" -#: ../../library/asyncio-task.rst:1372 +#: ../../library/asyncio-task.rst:1398 msgid "Set the name of the Task." msgstr "Task に名前を設定します。" -#: ../../library/asyncio-task.rst:1374 +#: ../../library/asyncio-task.rst:1400 msgid "" "The *value* argument can be any object, which is then converted to a string." msgstr "" "引数 *value* は文字列に変換可能なオブジェクトであれば何でもかまいません。" -#: ../../library/asyncio-task.rst:1377 +#: ../../library/asyncio-task.rst:1403 msgid "" "In the default Task implementation, the name will be visible in the :func:" "`repr` output of a task object." @@ -1986,23 +2023,23 @@ msgstr "" "Task のデフォルト実装では、名前はオブジェクトの :func:`repr` メソッドの出力で" "確認できます。" -#: ../../library/asyncio-task.rst:1384 +#: ../../library/asyncio-task.rst:1410 msgid "Request the Task to be cancelled." msgstr "このタスクに、自身のキャンセルを要求します。" -#: ../../library/asyncio-task.rst:1386 +#: ../../library/asyncio-task.rst:1412 msgid "" "If the Task is already *done* or *cancelled*, return ``False``, otherwise, " "return ``True``." msgstr "" -#: ../../library/asyncio-task.rst:1389 +#: ../../library/asyncio-task.rst:1415 msgid "" "The method arranges for a :exc:`CancelledError` exception to be thrown into " "the wrapped coroutine on the next cycle of the event loop." msgstr "" -#: ../../library/asyncio-task.rst:1392 +#: ../../library/asyncio-task.rst:1418 msgid "" "The coroutine then has a chance to clean up or even deny the request by " "suppressing the exception with a :keyword:`try` ... ... ``except " @@ -2014,22 +2051,22 @@ msgid "" "addition to catching the exception." msgstr "" -#: ../../library/asyncio-task.rst:1402 +#: ../../library/asyncio-task.rst:1428 msgid "" "If the Task being cancelled is currently awaiting on a future-like object, " "that awaited object will also be cancelled. This cancellation propagates " "down the entire chain of awaited objects." msgstr "" -#: ../../library/asyncio-task.rst:1406 +#: ../../library/asyncio-task.rst:1432 msgid "Added the *msg* parameter." msgstr "" -#: ../../library/asyncio-task.rst:1409 +#: ../../library/asyncio-task.rst:1435 msgid "The ``msg`` parameter is propagated from cancelled task to its awaiter." msgstr "" -#: ../../library/asyncio-task.rst:1414 +#: ../../library/asyncio-task.rst:1440 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" @@ -2037,7 +2074,7 @@ msgstr "" "以下の例は、コルーチンがどのようにしてキャンセルのリクエストを阻止するかを示" "しています::" -#: ../../library/asyncio-task.rst:1417 +#: ../../library/asyncio-task.rst:1443 msgid "" "async def cancel_me():\n" " print('cancel_me(): before sleep')\n" @@ -2074,11 +2111,11 @@ msgid "" "# main(): cancel_me is cancelled now" msgstr "" -#: ../../library/asyncio-task.rst:1453 +#: ../../library/asyncio-task.rst:1479 msgid "Return ``True`` if the Task is *cancelled*." msgstr "Task が *キャンセルされた* 場合に ``True`` を返します。" -#: ../../library/asyncio-task.rst:1455 +#: ../../library/asyncio-task.rst:1481 msgid "" "The Task is *cancelled* when the cancellation was requested with :meth:" "`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " @@ -2088,21 +2125,21 @@ msgstr "" "ているコルーチンが内部で送出された :exc:`CancelledError` 例外を伝達したと" "き、 Task は実際に *キャンセル* されます。" -#: ../../library/asyncio-task.rst:1461 +#: ../../library/asyncio-task.rst:1487 msgid "Decrement the count of cancellation requests to this Task." msgstr "" -#: ../../library/asyncio-task.rst:1463 +#: ../../library/asyncio-task.rst:1489 msgid "Returns the remaining number of cancellation requests." msgstr "" -#: ../../library/asyncio-task.rst:1465 +#: ../../library/asyncio-task.rst:1491 msgid "" "Note that once execution of a cancelled task completed, further calls to :" "meth:`uncancel` are ineffective." msgstr "" -#: ../../library/asyncio-task.rst:1470 +#: ../../library/asyncio-task.rst:1496 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. In particular, if a Task gets successfully uncancelled, this " @@ -2111,7 +2148,7 @@ msgid "" "respective structured block. For example::" msgstr "" -#: ../../library/asyncio-task.rst:1477 +#: ../../library/asyncio-task.rst:1503 msgid "" "async def make_request_with_timeout():\n" " try:\n" @@ -2125,7 +2162,7 @@ msgid "" " await unrelated_code()" msgstr "" -#: ../../library/asyncio-task.rst:1488 +#: ../../library/asyncio-task.rst:1514 msgid "" "While the block with ``make_request()`` and ``make_another_request()`` might " "get cancelled due to the timeout, ``unrelated_code()`` should continue " @@ -2134,14 +2171,14 @@ msgid "" "similar fashion." msgstr "" -#: ../../library/asyncio-task.rst:1494 +#: ../../library/asyncio-task.rst:1520 msgid "" "If end-user code is, for some reason, suppressing cancellation by catching :" "exc:`CancelledError`, it needs to call this method to remove the " "cancellation state." msgstr "" -#: ../../library/asyncio-task.rst:1498 +#: ../../library/asyncio-task.rst:1524 msgid "" "When this method decrements the cancellation count to zero, the method " "checks if a previous :meth:`cancel` call had arranged for :exc:" @@ -2150,17 +2187,17 @@ msgid "" "``_must_cancel`` flag)." msgstr "" -#: ../../library/asyncio-task.rst:1504 +#: ../../library/asyncio-task.rst:1530 msgid "Changed to rescind pending cancellation requests upon reaching zero." msgstr "" -#: ../../library/asyncio-task.rst:1509 +#: ../../library/asyncio-task.rst:1535 msgid "" "Return the number of pending cancellation requests to this Task, i.e., the " "number of calls to :meth:`cancel` less the number of :meth:`uncancel` calls." msgstr "" -#: ../../library/asyncio-task.rst:1513 +#: ../../library/asyncio-task.rst:1539 msgid "" "Note that if this number is greater than zero but the Task is still " "executing, :meth:`cancelled` will still return ``False``. This is because " @@ -2169,7 +2206,7 @@ msgid "" "to zero." msgstr "" -#: ../../library/asyncio-task.rst:1519 +#: ../../library/asyncio-task.rst:1545 msgid "" "This method is used by asyncio's internals and isn't expected to be used by " "end-user code. See :meth:`uncancel` for more details." diff --git a/library/asyncio-threading.po b/library/asyncio-threading.po index 3d59d53b5..95aa7277f 100644 --- a/library/asyncio-threading.po +++ b/library/asyncio-threading.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-03 17:25+0000\n" "PO-Revision-Date: 2026-06-11 17:36+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/library/asyncio-tools.po b/library/asyncio-tools.po new file mode 100644 index 000000000..0aeb413f3 --- /dev/null +++ b/library/asyncio-tools.po @@ -0,0 +1,234 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2026 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" +"PO-Revision-Date: 2026-07-11 14:48+0000\n" +"Last-Translator: python-doc bot, 2026\n" +"Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" +"ja/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ja\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../../library/asyncio-tools.rst:7 +msgid "Command-line introspection tools" +msgstr "" + +#: ../../library/asyncio-tools.rst:9 +msgid "**Source code:** :source:`Lib/asyncio/tools.py`" +msgstr "" + +#: ../../library/asyncio-tools.rst:13 +msgid "" +"The :mod:`!asyncio` module can be invoked as a script via ``python -m " +"asyncio`` to inspect the task graph of another running Python process " +"without modifying it or restarting it. The :mod:`!asyncio.tools` submodule " +"implements this interface." +msgstr "" + +#: ../../library/asyncio-tools.rst:18 +msgid "The following commands inspect the process identified by ``PID``:" +msgstr "" + +#: ../../library/asyncio-tools.rst:20 +msgid "" +"$ python -m asyncio pstree [--retries N] PID\n" +"$ python -m asyncio ps [--retries N] PID" +msgstr "" + +#: ../../library/asyncio-tools.rst:25 +msgid "" +"The commands read the target process state without executing any code in it. " +"They are only available on supported platforms and may require permission to " +"inspect another process. See the :ref:`permission requirements ` for details." +msgstr "" + +#: ../../library/asyncio-tools.rst:31 +msgid ":ref:`asyncio-graph`" +msgstr "" + +#: ../../library/asyncio-tools.rst:32 +msgid "" +"Programmatic APIs for inspecting the async call graph of a task or future in " +"the current process." +msgstr "" + +#: ../../library/asyncio-tools.rst:35 +msgid "" +"The command examples below use this program, which creates a task hierarchy " +"suitable for inspection and prints its process ID:" +msgstr "" + +#: ../../library/asyncio-tools.rst:38 +msgid "example.py" +msgstr "" + +#: ../../library/asyncio-tools.rst:38 +msgid "" +"import asyncio\n" +"import os\n" +"\n" +"async def play(track):\n" +" await asyncio.sleep(3600)\n" +" print(f\"🎵 Finished: {track}\")\n" +"\n" +"async def album(name, tracks):\n" +" async with asyncio.TaskGroup() as tg:\n" +" for track in tracks:\n" +" tg.create_task(play(track), name=track)\n" +"\n" +"async def main():\n" +" print(f\"PID: {os.getpid()}\")\n" +" async with asyncio.TaskGroup() as tg:\n" +" tg.create_task(\n" +" album(\"Sundowning\", [\"TNDNBTG\", \"Levitate\"]),\n" +" name=\"Sundowning\",\n" +" )\n" +" tg.create_task(\n" +" album(\"TMBTE\", [\"DYWTYLM\", \"Aqua Regia\"]),\n" +" name=\"TMBTE\",\n" +" )\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: ../../library/asyncio-tools.rst:67 +msgid "Run the program in one terminal and leave it running:" +msgstr "" + +#: ../../library/asyncio-tools.rst:69 +msgid "" +"$ python example.py\n" +"PID: 12345" +msgstr "" + +#: ../../library/asyncio-tools.rst:74 +msgid "" +"Then pass the printed process ID to the commands from another terminal. " +"Thread IDs, task IDs, file paths, and line numbers vary between runs and " +"source layouts." +msgstr "" + +#: ../../library/asyncio-tools.rst:81 +msgid "Command-line options" +msgstr "コマンドラインオプション" + +#: ../../library/asyncio-tools.rst:85 +msgid "" +"Display task and coroutine relationships as a tree. Each task is shown with " +"its full coroutine stack, nested under the task (if any) that is awaiting " +"it. This subcommand is useful for quickly identifying which branch of a " +"task hierarchy is blocked and where in its coroutine stack execution has " +"paused:" +msgstr "" + +#: ../../library/asyncio-tools.rst:91 +msgid "" +"$ python -m asyncio pstree 12345\n" +"└── (T) Task-1\n" +" └── main example.py:12\n" +" └── TaskGroup.__aexit__ Lib/asyncio/taskgroups.py:75\n" +" └── TaskGroup._aexit Lib/asyncio/taskgroups.py:124\n" +" ├── (T) Sundowning\n" +" │ └── album example.py:7\n" +" │ └── TaskGroup.__aexit__ Lib/asyncio/taskgroups." +"py:75\n" +" │ └── TaskGroup._aexit Lib/asyncio/taskgroups." +"py:124\n" +" │ ├── (T) TNDNBTG\n" +" │ │ └── play example.py:4\n" +" │ │ └── sleep Lib/asyncio/tasks.py:702\n" +" │ └── (T) Levitate\n" +" │ └── play example.py:4\n" +" │ └── sleep Lib/asyncio/tasks.py:702\n" +" └── (T) TMBTE\n" +" └── album example.py:7\n" +" └── TaskGroup.__aexit__ Lib/asyncio/taskgroups." +"py:75\n" +" └── TaskGroup._aexit Lib/asyncio/taskgroups." +"py:124\n" +" ├── (T) DYWTYLM\n" +" │ └── play example.py:4\n" +" │ └── sleep Lib/asyncio/tasks.py:702\n" +" └── (T) Aqua Regia\n" +" └── play example.py:4\n" +" └── sleep Lib/asyncio/tasks.py:702" +msgstr "" + +#: ../../library/asyncio-tools.rst:119 +msgid "" +"If the await graph contains a cycle, ``pstree`` reports an error instead of " +"printing a tree. A cycle in the await graph is unusual and typically " +"indicates a programming error:" +msgstr "" + +#: ../../library/asyncio-tools.rst:123 +msgid "" +"$ python -m asyncio pstree 12345\n" +"ERROR: await-graph contains cycles - cannot print a tree!\n" +"\n" +"cycle: Task-2 → Task-3 → Task-2" +msgstr "" + +#: ../../library/asyncio-tools.rst:132 +msgid "" +"Display a flat table of all pending tasks in the process *PID*. Each row " +"shows the event-loop thread ID, task ID and name, coroutine stack, and the " +"awaiting task's stack, name, and ID, if any." +msgstr "" + +#: ../../library/asyncio-tools.rst:136 +msgid "" +"This subcommand prints all tasks regardless of whether the await graph " +"contains cycles:" +msgstr "" + +#: ../../library/asyncio-tools.rst:139 +msgid "" +"$ python -m asyncio ps 12345\n" +"tid task id task name coroutine " +"stack awaiter " +"chain awaiter name awaiter id\n" +"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n" +"18445801 0x10a456060 Task-1 TaskGroup._aexit -> " +"TaskGroup.__aexit__ -> " +"main " +"0x0\n" +"18445801 0x10a439f60 Sundowning TaskGroup._aexit -> " +"TaskGroup.__aexit__ -> album TaskGroup._aexit -> TaskGroup.__aexit__ -> " +"main Task-1 0x10a456060\n" +"18445801 0x10a439d70 TMBTE TaskGroup._aexit -> " +"TaskGroup.__aexit__ -> album TaskGroup._aexit -> TaskGroup.__aexit__ -> " +"main Task-1 0x10a456060\n" +"18445801 0x10a2a3a80 TNDNBTG sleep -> " +"play TaskGroup._aexit -> TaskGroup." +"__aexit__ -> album Sundowning 0x10a439f60\n" +"18445801 0x10a2a38a0 Levitate sleep -> " +"play TaskGroup._aexit -> TaskGroup." +"__aexit__ -> album Sundowning 0x10a439f60\n" +"18445801 0x10a2d7150 DYWTYLM sleep -> " +"play TaskGroup._aexit -> TaskGroup." +"__aexit__ -> album TMBTE 0x10a439d70\n" +"18445801 0x10a6bdaa0 Aqua Regia sleep -> " +"play TaskGroup._aexit -> TaskGroup." +"__aexit__ -> album TMBTE 0x10a439d70" +msgstr "" + +#: ../../library/asyncio-tools.rst:154 +msgid "" +"Retry failed attempts to inspect the target process up to *N* times. This " +"can help when the target process changes while its state is being read." +msgstr "" diff --git a/library/asyncio.po b/library/asyncio.po index a24d5c5dd..09eccf472 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-11 17:33+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: souma987, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -24,15 +24,19 @@ msgstr "" "Language: ja\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: ../../library/asyncio.rst:100 +#: ../../library/asyncio.rst:107 msgid "High-level APIs" msgstr "高水準 API" -#: ../../library/asyncio.rst:113 +#: ../../library/asyncio.rst:119 +msgid "Introspection APIs" +msgstr "" + +#: ../../library/asyncio.rst:126 msgid "Low-level APIs" msgstr "低水準 API" -#: ../../library/asyncio.rst:124 +#: ../../library/asyncio.rst:137 msgid "Guides and Tutorials" msgstr "ガイドとチュートリアル" @@ -118,6 +122,21 @@ msgid ":ref:`synchronize ` concurrent code;" msgstr "並列処理のコードを :ref:`同期 ` させる" #: ../../library/asyncio.rst:50 +msgid "For **introspection**, asyncio provides APIs and tools for:" +msgstr "" + +#: ../../library/asyncio.rst:52 +msgid "" +"inspecting the :ref:`async call graph ` of tasks and futures;" +msgstr "" + +#: ../../library/asyncio.rst:54 +msgid "" +"inspecting tasks in another running Python process with :ref:`command-line " +"tools `;" +msgstr "" + +#: ../../library/asyncio.rst:57 msgid "" "Additionally, there are **low-level** APIs for *library and framework " "developers* to:" @@ -125,7 +144,7 @@ msgstr "" "これに加えて、 *ライブラリやフレームワークの開発者* が次のことをするための **" "低レベル** API があります:" -#: ../../library/asyncio.rst:53 +#: ../../library/asyncio.rst:60 msgid "" "create and manage :ref:`event loops `, which provide " "asynchronous APIs for :ref:`networking `, running :ref:" @@ -137,7 +156,7 @@ msgstr "" "` の取り扱いなどのための非同期 API を提供する :ref:`" "イベントループ ` の作成と管理を行う" -#: ../../library/asyncio.rst:58 +#: ../../library/asyncio.rst:65 msgid "" "implement efficient protocols using :ref:`transports `;" @@ -145,7 +164,7 @@ msgstr "" ":ref:`Transport ` を使った効率的な protocol を" "実装します" -#: ../../library/asyncio.rst:61 +#: ../../library/asyncio.rst:68 msgid "" ":ref:`bridge ` callback-based libraries and code with async/" "await syntax." @@ -165,17 +184,17 @@ msgstr "" "このモジュールは WebAssembly では動作しないか、利用不可です。詳しくは、:ref:" "`wasm-availability` を見てください。" -#: ../../library/asyncio.rst:69 +#: ../../library/asyncio.rst:76 msgid "asyncio REPL" msgstr "asyncio REPL" -#: ../../library/asyncio.rst:70 +#: ../../library/asyncio.rst:77 msgid "" "You can experiment with an ``asyncio`` concurrent context in the :term:" "`REPL`:" msgstr ":term:`REPL` で、``asyncio`` 並行コンテキストを試すことができます:" -#: ../../library/asyncio.rst:72 +#: ../../library/asyncio.rst:79 msgid "" "$ python -m asyncio\n" "asyncio REPL ...\n" @@ -195,14 +214,14 @@ msgstr "" ">>> await asyncio.sleep(10, result='hello')\n" "'hello'" -#: ../../library/asyncio.rst:82 +#: ../../library/asyncio.rst:89 msgid "" "This REPL provides limited compatibility with :envvar:`PYTHON_BASIC_REPL`. " "It is recommended that the default REPL is used for full functionality and " "the latest features." msgstr "" -#: ../../library/asyncio.rst:86 +#: ../../library/asyncio.rst:93 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_stdin`` with no " "arguments." @@ -210,20 +229,20 @@ msgstr "" "引数無しで :ref:`監査イベント ` ``cpython.run_stdin`` を送出しま" "す。 " -#: ../../library/asyncio.rst:88 +#: ../../library/asyncio.rst:95 msgid "(also 3.11.10, 3.10.15, 3.9.20, and 3.8.20) Emits audit events." msgstr "" -#: ../../library/asyncio.rst:91 +#: ../../library/asyncio.rst:98 msgid "" "Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also " "executed. Emits audit events." msgstr "" -#: ../../library/asyncio.rst:99 +#: ../../library/asyncio.rst:106 msgid "Reference" msgstr "リファレンス" -#: ../../library/asyncio.rst:134 +#: ../../library/asyncio.rst:147 msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." msgstr "asyncio のソースコードは :source:`Lib/asyncio/` にあります。" diff --git a/library/asyncore.po b/library/asyncore.po index 78bb7ab6a..ea4091099 100644 --- a/library/asyncore.po +++ b/library/asyncore.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" diff --git a/library/atexit.po b/library/atexit.po index f6806312a..1ba0995f9 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-05 16:26+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -28,128 +28,114 @@ msgstr ":mod:`!atexit` --- 終了ハンドラー" #: ../../library/atexit.rst:9 msgid "" -"The :mod:`!atexit` module defines functions to register and unregister " -"cleanup functions. Functions thus registered are automatically executed " -"upon normal interpreter termination. :mod:`!atexit` runs these functions in " -"the *reverse* order in which they were registered; if you register ``A``, " -"``B``, and ``C``, at interpreter termination time they will be run in the " -"order ``C``, ``B``, ``A``." +"The :mod:`!atexit` module defines functions to register and unregister :dfn:" +"`exit handlers`: functions that are automatically executed \"at exit\", that " +"is, upon normal program termination (for instance, if :func:`sys.exit` is " +"called or the main module's execution completes) or, more generally, upon :" +"term:`interpreter shutdown`." msgstr "" -#: ../../library/atexit.rst:16 +#: ../../library/atexit.rst:15 msgid "" -"**Note:** The functions registered via this module are not called when the " -"program is killed by a signal not handled by Python, when a Python fatal " -"internal error is detected, or when :func:`os._exit` is called." +"At exit, all registered exit handlers are called in the *reverse* order in " +"which they were registered. If you register ``A``, ``B``, and ``C``, at " +"interpreter shutdown time they will be run in the order ``C``, ``B``, ``A``. " +"The assumption is that lower level modules will normally be imported before " +"higher level modules and thus must be cleaned up later." msgstr "" -"**注意:** このモジュールを使用して登録された関数は、プログラムが Python が扱" -"わないシグナルによって kill された場合、Python 内部で致命的なエラーが検出され" -"た場合、あるいは :func:`os._exit` が呼び出された場合は実行されません。" -#: ../../library/atexit.rst:20 +#: ../../library/atexit.rst:22 msgid "" -"**Note:** The effect of registering or unregistering functions from within a " -"cleanup function is undefined." -msgstr "" -"**注意:** クリーンアップ関数内からの関数の登録・登録解除効果は定義されていま" -"せん。" - -#: ../../library/atexit.rst:23 -msgid "" -"When used with C-API subinterpreters, registered functions are local to the " -"interpreter they were registered in." +"If an exception is raised during execution of an exit handler, a traceback " +"is printed (unless :exc:`SystemExit` is raised) and the exception " +"information is saved. After all exit handlers have had a chance to run, the " +"last exception to be raised is re-raised." msgstr "" -"C-API のサブインタープリタで使われているとき、登録された関数は登録先のイン" -"タープリタのローカルな関数になります。" -#: ../../library/atexit.rst:29 +#: ../../library/atexit.rst:27 msgid "" -"Register *func* as a function to be executed at termination. Any optional " -"arguments that are to be passed to *func* must be passed as arguments to :" -"func:`register`. It is possible to register the same function and arguments " -"more than once." +"In programs that use multiple interpreters, each interpreter has its own " +"stack of exit handlers, which are executed when the interpreter shuts down " +"(for example, with :meth:`concurrent.interpreters.Interpreter.close` or the " +"C API :c:func:`Py_EndInterpreter`). Registration functions in this module " +"only affect the interpreter they are called from." msgstr "" -"*func* を終了時に実行する関数として登録します。*func* に渡す引数は :func:" -"`register` の引数として指定しなければなりません。同じ関数を同じ引数で複数回登" -"録できます。" #: ../../library/atexit.rst:34 msgid "" -"At normal program termination (for instance, if :func:`sys.exit` is called " -"or the main module's execution completes), all functions registered are " -"called in last in, first out order. The assumption is that lower level " -"modules will normally be imported before higher level modules and thus must " -"be cleaned up later." +"**Note:** Exit handlers are not called when the program is killed by a " +"signal not handled by Python, when a Python fatal internal error is " +"detected, or when :func:`os._exit` is called." msgstr "" -"通常のプログラムの終了時、例えば :func:`sys.exit` が呼び出されるとき、あるい" -"は、メインモジュールの実行が完了したときに、登録された全ての関数を、最後に登" -"録されたものから順に呼び出します。通常、より低レベルのモジュールはより高レベ" -"ルのモジュールより前に import されるので、後で後始末が行われるという仮定に基" -"づいています。" -#: ../../library/atexit.rst:40 +#: ../../library/atexit.rst:38 msgid "" -"If an exception is raised during execution of the exit handlers, a traceback " -"is printed (unless :exc:`SystemExit` is raised) and the exception " -"information is saved. After all exit handlers have had a chance to run, the " -"last exception to be raised is re-raised." +"**Note:** The effect of registering or unregistering functions from within a " +"cleanup function is undefined." msgstr "" -"終了ハンドラの実行中に例外が発生すると、(:exc:`SystemExit` 以外の場合は)ト" -"レースバックを表示して、例外の情報を保存します。全ての終了ハンドラに動作する" -"チャンスを与えた後に、最後に送出された例外を再送出します。" +"**注意:** クリーンアップ関数内からの関数の登録・登録解除効果は定義されていま" +"せん。" -#: ../../library/atexit.rst:45 +#: ../../library/atexit.rst:42 msgid "" -"This function returns *func*, which makes it possible to use it as a " -"decorator." -msgstr "この関数は *func* を返し、これをデコレータとして利用できます。" +"When writing exit handlers, especially in C API extensions, keep in mind " +"that other exit handlers may still run arbitrary Python code after you clean " +"up. Such code should succeed or fail with an exception, rather than crash." +msgstr "" -#: ../../library/atexit.rst:49 +#: ../../library/atexit.rst:47 msgid "" -"Starting new threads or calling :func:`os.fork` from a registered function " -"can lead to race condition between the main Python runtime thread freeing " -"thread states while internal :mod:`threading` routines or the new process " -"try to use that state. This can lead to crashes rather than clean shutdown." +"Attempts to start a new thread or :func:`os.fork` a new process in an exit " +"handler now leads to :exc:`RuntimeError`. Previously, this could cause race " +"conditions between the main Python runtime thread freeing thread states " +"while internal :mod:`threading` routines or the new process try to use that " +"state, which could lead to crashes rather than clean shutdown." msgstr "" -"登録された関数から新しいスレッドを開始したり、 :func:`os.fork` を呼び出したり" -"すると、メインの Python ランタイムスレッドがスレッド状態を開放する一方で、内" -"部の :mod:`threading` ルーチンや新しいプロセスがそのスレッド状態を使用しよう" -"と試みる競合が発生します。これはクリーンなシャットダウンではなく、クラッシュ" -"につながる恐れがあります。" #: ../../library/atexit.rst:55 msgid "" -"Attempts to start a new thread or :func:`os.fork` a new process in a " -"registered function now leads to :exc:`RuntimeError`." +"When used with subinterpreters, registered functions are local to the " +"interpreter they were registered in." msgstr "" -"登録された関数から新しいスレッドの開始または新しいプロセスの :func:`os.fork` " -"が試みられた場合は、 :exc:`RuntimeError` が発生するようになりました。" #: ../../library/atexit.rst:61 msgid "" -"Remove *func* from the list of functions to be run at interpreter shutdown. :" -"func:`unregister` silently does nothing if *func* was not previously " -"registered. If *func* has been registered more than once, every occurrence " -"of that function in the :mod:`!atexit` call stack will be removed. Equality " -"comparisons (``==``) are used internally during unregistration, so function " -"references do not need to have matching identities." +"Register *func* as an exit handler. Any optional arguments that are to be " +"passed to *func* must be passed as arguments to :func:`register`. It is " +"possible to register the same function and arguments more than once." msgstr "" +#: ../../library/atexit.rst:66 +msgid "" +"This function returns *func*, which makes it possible to use it as a " +"decorator." +msgstr "この関数は *func* を返し、これをデコレータとして利用できます。" + #: ../../library/atexit.rst:71 +msgid "" +"Remove *func* from the list of exit handlers. :func:`unregister` silently " +"does nothing if *func* was not previously registered. If *func* has been " +"registered more than once, every occurrence of that function in the :mod:`!" +"atexit` call stack will be removed. Equality comparisons (``==``) are used " +"internally during unregistration, so function references do not need to have " +"matching identities." +msgstr "" + +#: ../../library/atexit.rst:81 msgid "Module :mod:`readline`" msgstr ":mod:`readline` モジュール" -#: ../../library/atexit.rst:72 +#: ../../library/atexit.rst:82 msgid "" "Useful example of :mod:`!atexit` to read and write :mod:`readline` history " "files." msgstr "" -#: ../../library/atexit.rst:79 +#: ../../library/atexit.rst:89 msgid ":mod:`!atexit` Example" msgstr "" -#: ../../library/atexit.rst:81 +#: ../../library/atexit.rst:91 msgid "" "The following simple example demonstrates how a module can initialize a " "counter from a file when it is imported and save the counter's updated value " @@ -160,7 +146,7 @@ msgstr "" "プログラムが終了するときにアプリケーションがこのモジュールを明示的に呼び出さ" "なくてもカウンタが更新されるようにする方法を示しています。 ::" -#: ../../library/atexit.rst:86 +#: ../../library/atexit.rst:96 msgid "" "try:\n" " with open('counterfile') as infile:\n" @@ -181,7 +167,7 @@ msgid "" "atexit.register(savecounter)" msgstr "" -#: ../../library/atexit.rst:104 +#: ../../library/atexit.rst:114 msgid "" "Positional and keyword arguments may also be passed to :func:`register` to " "be passed along to the registered function when it is called::" @@ -189,7 +175,7 @@ msgstr "" ":func:`register` に指定した位置引数とキーワード引数は登録した関数を呼び出す際" "に渡されます::" -#: ../../library/atexit.rst:107 +#: ../../library/atexit.rst:117 msgid "" "def goodbye(name, adjective):\n" " print('Goodbye %s, it was %s to meet you.' % (name, adjective))\n" @@ -201,11 +187,11 @@ msgid "" "atexit.register(goodbye, adjective='nice', name='Donny')" msgstr "" -#: ../../library/atexit.rst:116 +#: ../../library/atexit.rst:126 msgid "Usage as a :term:`decorator`::" msgstr ":term:`デコレータ ` として利用する例::" -#: ../../library/atexit.rst:118 +#: ../../library/atexit.rst:128 msgid "" "import atexit\n" "\n" @@ -214,7 +200,7 @@ msgid "" " print('You are now leaving the Python sector.')" msgstr "" -#: ../../library/atexit.rst:124 +#: ../../library/atexit.rst:134 msgid "This only works with functions that can be called without arguments." msgstr "" "デコレータとして利用できるのは、その関数が引数なしで呼び出された場合に限られ" diff --git a/library/audioop.po b/library/audioop.po index 21aff3998..376d45fa5 100644 --- a/library/audioop.po +++ b/library/audioop.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: souma987, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/audit_events.po b/library/audit_events.po index 50844948f..58c66ff65 100644 --- a/library/audit_events.po +++ b/library/audit_events.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/base64.po b/library/base64.po index 29e227a80..8ec9aceca 100644 --- a/library/base64.po +++ b/library/base64.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/bdb.po b/library/bdb.po index e869068a0..8f00e30dc 100644 --- a/library/bdb.po +++ b/library/bdb.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/binary.po b/library/binary.po index 3afc09309..b19290f70 100644 --- a/library/binary.po +++ b/library/binary.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/binascii.po b/library/binascii.po index 42d8fe806..b303dff36 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/bisect.po b/library/bisect.po index d8fd54f9a..9da6d25e2 100644 --- a/library/bisect.po +++ b/library/bisect.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-09 16:27+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -203,7 +203,7 @@ msgid "" "The search functions are stateless and discard key function results after " "they are used. Consequently, if the search functions are used in a loop, " "the key function may be called again and again on the same array elements. " -"If the key function isn't fast, consider wrapping it with :py:func:" +"If the key function isn't fast, consider wrapping it with :py:deco:" "`functools.cache` to avoid duplicate computations. Alternatively, consider " "searching an array of precomputed keys to locate the insertion point (as " "shown in the examples section below)." diff --git a/library/builtins.po b/library/builtins.po index 08429688c..b5781be71 100644 --- a/library/builtins.po +++ b/library/builtins.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/bz2.po b/library/bz2.po index de8620320..4995731db 100644 --- a/library/bz2.po +++ b/library/bz2.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/calendar.po b/library/calendar.po index fb81e2c47..d976f1133 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-29 17:28+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -515,11 +515,9 @@ msgstr "" #: ../../library/calendar.rst:405 msgid "" -"Return a header containing abbreviated weekday names. *n* specifies the " +"Return a header containing abbreviated weekday names. *width* specifies the " "width in characters for one weekday." msgstr "" -"短縮された曜日名を含むヘッダを返します。*n* は各曜日を何文字で表すかを指定し" -"ます。" #: ../../library/calendar.rst:411 msgid "" diff --git a/library/cgi.po b/library/cgi.po index 52025acba..a49cbddf9 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: souma987, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/cgitb.po b/library/cgitb.po index c33851852..c8962f6eb 100644 --- a/library/cgitb.po +++ b/library/cgitb.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: souma987, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/chunk.po b/library/chunk.po index f9d094674..b673a2b05 100644 --- a/library/chunk.po +++ b/library/chunk.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: souma987, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/cmath.po b/library/cmath.po index f27846c90..ef73f37e6 100644 --- a/library/cmath.po +++ b/library/cmath.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/cmd.po b/library/cmd.po index 2f2b64a45..c8a02df77 100644 --- a/library/cmd.po +++ b/library/cmd.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/cmdline.po b/library/cmdline.po index c72cc3db5..64910476e 100644 --- a/library/cmdline.po +++ b/library/cmdline.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/cmdlinelibs.po b/library/cmdlinelibs.po index c585e8e72..32fcae5f2 100644 --- a/library/cmdlinelibs.po +++ b/library/cmdlinelibs.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: qqfunc, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/code.po b/library/code.po index 0012a1c28..e913e1acb 100644 --- a/library/code.po +++ b/library/code.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/codecs.po b/library/codecs.po index 5c48e199a..4fe8d5ac6 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/codeop.po b/library/codeop.po index 7b572c3f8..3ce8dadc5 100644 --- a/library/codeop.po +++ b/library/codeop.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/collections.abc.po b/library/collections.abc.po index ab4a142e0..6da5dd7f0 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-09 16:27+0000\n" +"POT-Creation-Date: 2026-08-29 17:28+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/collections.po b/library/collections.po index 550305a1a..3dbcce85f 100644 --- a/library/collections.po +++ b/library/collections.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-07 15:19+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -1103,16 +1103,10 @@ msgid "" "A `round-robin scheduler `_ can be implemented with input iterators stored in a :" "class:`deque`. Values are yielded from the active iterator in position " -"zero. If that iterator is exhausted, it can be removed with :meth:`~deque." -"popleft`; otherwise, it can be cycled back to the end with the :meth:`~deque." -"rotate` method::" +"zero. If that iterator is :term:`exhausted`, it can be removed with :meth:" +"`~deque.popleft`; otherwise, it can be cycled back to the end with the :meth:" +"`~deque.rotate` method::" msgstr "" -"`ラウンドロビンスケジューラ `_ は、入力されたイテレータを :class:`deque` に格納すること" -"で実装できます。\n" -"値は、位置0にある選択中のイテレータから取り出されます。\n" -"そのイテレータが値を出し切った場合は、 :meth:`~deque.popleft` で除去できま" -"す; そうでない場合は、 :meth:`~deque.rotate` メソッドで末尾に回せます::" #: ../../library/collections.rst:697 msgid "" @@ -1989,10 +1983,8 @@ msgstr "" #: ../../library/collections.rst:1230 msgid "" "An :class:`OrderedDict` would also be useful for implementing variants of :" -"func:`functools.lru_cache`:" +"deco:`functools.lru_cache`:" msgstr "" -":class:`OrderedDict` は :func:`functools.lru_cache` の変種を実装するのにも役" -"に立ちます:" #: ../../library/collections.rst:1233 msgid "" diff --git a/library/colorsys.po b/library/colorsys.po index 9ccf7407e..81e8bac97 100644 --- a/library/colorsys.po +++ b/library/colorsys.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -43,12 +43,10 @@ msgstr "" #: ../../library/colorsys.rst:21 msgid "" -"More information about color spaces can be found at https://poynton.ca/" -"ColorFAQ.html and https://www.cambridgeincolour.com/tutorials/color-spaces." -"htm." +"More information about color spaces can be found at https://www.poynton.ca/" +"pdf/ColourFAQ.pdf and https://www.cambridgeincolour.com/tutorials/color-" +"spaces.htm." msgstr "" -"色空間に関するより詳細な情報は https://poynton.ca/ColorFAQ.html と https://" -"www.cambridgeincolour.com/tutorials/color-spaces.htm にあります。" #: ../../library/colorsys.rst:25 msgid "The :mod:`!colorsys` module defines the following functions:" diff --git a/library/compileall.po b/library/compileall.po index 52b340c52..adb0d0675 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/compression.po b/library/compression.po index fb4dd50aa..eb3d7289f 100644 --- a/library/compression.po +++ b/library/compression.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/compression.zstd.po b/library/compression.zstd.po index d5e283cbd..52aaff1c5 100644 --- a/library/compression.zstd.po +++ b/library/compression.zstd.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-03 17:25+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -470,7 +470,7 @@ msgstr "" #: ../../library/compression.zstd.rst:348 msgid "" "Attempting to decompress data after the end of a frame will raise a :exc:" -"`ZstdError`. Any data found after the end of the frame is ignored and saved " +"`EOFError`. Any data found after the end of the frame is ignored and saved " "in the :attr:`~.unused_data` attribute." msgstr "" @@ -701,7 +701,7 @@ msgstr "" #: ../../library/compression.zstd.rst:506 msgid "" -"Parameters are optional; any omitted parameter will have it's value selected " +"Parameters are optional; any omitted parameter will have its value selected " "automatically." msgstr "" @@ -1008,7 +1008,7 @@ msgstr "" msgid "" "An :class:`~enum.IntEnum` containing the advanced decompression parameter " "keys that can be used when decompressing data. Parameters are optional; any " -"omitted parameter will have it's value selected automatically." +"omitted parameter will have its value selected automatically." msgstr "" #: ../../library/compression.zstd.rst:740 diff --git a/library/concurrency.po b/library/concurrency.po index 3dfff6ae4..c104671dd 100644 --- a/library/concurrency.po +++ b/library/concurrency.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 70e173609..d30b6d16d 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-01 17:31+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -332,7 +332,7 @@ msgstr "" "た。" #: ../../library/concurrent.futures.rst:195 -#: ../../library/concurrent.futures.rst:405 +#: ../../library/concurrent.futures.rst:400 msgid "Added the *initializer* and *initargs* arguments." msgstr "*initializer* と *initargs* 引数が追加されました。" @@ -588,14 +588,7 @@ msgid "" "with the \"fork\" start method." msgstr "" -#: ../../library/concurrent.futures.rst:390 -msgid "" -"Bugs have been reported when using the *max_tasks_per_child* feature that " -"can result in the :class:`ProcessPoolExecutor` hanging in some " -"circumstances. Follow its eventual resolution in :gh:`115634`." -msgstr "" - -#: ../../library/concurrent.futures.rst:394 +#: ../../library/concurrent.futures.rst:389 msgid "" "When one of the worker processes terminates abruptly, a :exc:`~concurrent." "futures.process.BrokenProcessPool` error is now raised. Previously, " @@ -607,19 +600,19 @@ msgstr "" "以前は挙動は未定義でしたが、 executor や futures がフリーズしたりデッドロッ" "クを起こすことがしばしばでした。" -#: ../../library/concurrent.futures.rst:401 +#: ../../library/concurrent.futures.rst:396 msgid "" "The *mp_context* argument was added to allow users to control the " "start_method for worker processes created by the pool." msgstr "" -#: ../../library/concurrent.futures.rst:407 +#: ../../library/concurrent.futures.rst:402 msgid "" "The *max_tasks_per_child* argument was added to allow users to control the " "lifetime of workers in the pool." msgstr "" -#: ../../library/concurrent.futures.rst:411 +#: ../../library/concurrent.futures.rst:406 msgid "" "On POSIX systems, if your application has multiple threads and the :mod:" "`multiprocessing` context uses the ``\"fork\"`` start method: The :func:`os." @@ -628,13 +621,13 @@ msgid "" "start method. See the :func:`os.fork` documentation for further explanation." msgstr "" -#: ../../library/concurrent.futures.rst:419 +#: ../../library/concurrent.futures.rst:414 msgid "" "*max_workers* uses :func:`os.process_cpu_count` by default, instead of :func:" "`os.cpu_count`." msgstr "" -#: ../../library/concurrent.futures.rst:423 +#: ../../library/concurrent.futures.rst:418 msgid "" "The default process start method (see :ref:`multiprocessing-start-methods`) " "changed away from *fork*. If you require the *fork* start method for :class:" @@ -642,6 +635,13 @@ msgid "" "get_context(\"fork\")``." msgstr "" +#: ../../library/concurrent.futures.rst:424 +msgid "" +"Fixed a deadlock (:gh:`115634`) where the executor could hang after a worker " +"process exited upon reaching its *max_tasks_per_child* limit while tasks " +"remained queued." +msgstr "" + #: ../../library/concurrent.futures.rst:431 msgid "" "Attempt to terminate all living worker processes immediately by calling :" diff --git a/library/concurrent.interpreters.po b/library/concurrent.interpreters.po index b3fd87d02..e5d442226 100644 --- a/library/concurrent.interpreters.po +++ b/library/concurrent.interpreters.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-03 17:25+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: Takanori Suzuki , 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -50,8 +50,8 @@ msgstr "" msgid "" "For concurrency, interpreters themselves (and this module) don't provide " "much more than isolation, which on its own isn't useful. Actual concurrency " -"is available separately through :mod:`threads ` See `below " -"`_" +"is available separately through :mod:`threads ` -- see `below " +"`_." msgstr "" #: ../../library/concurrent.interpreters.rst:28 @@ -315,7 +315,7 @@ msgstr "" #: ../../library/concurrent.interpreters.rst:194 msgid "" -"There is a small number of Python types that actually share mutable data " +"There are a small number of Python types that actually share mutable data " "between interpreters:" msgstr "" @@ -420,8 +420,8 @@ msgstr "" #: ../../library/concurrent.interpreters.rst:277 msgid "" -"Return the result of calling running the given function in the interpreter " -"(in the current thread)." +"Return the result of running the given function in the interpreter (in the " +"current thread)." msgstr "" #: ../../library/concurrent.interpreters.rst:284 diff --git a/library/concurrent.po b/library/concurrent.po index 7a724b9d7..34d6f2813 100644 --- a/library/concurrent.po +++ b/library/concurrent.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/configparser.po b/library/configparser.po index f8d41b721..95b867828 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/constants.po b/library/constants.po index 28dcf4205..a8919758b 100644 --- a/library/constants.po +++ b/library/constants.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/contextlib.po b/library/contextlib.po index a4cd28708..7a5e250d0 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-09 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -160,22 +160,14 @@ msgstr "" #: ../../library/contextlib.rst:91 msgid "" -":func:`contextmanager` uses :class:`ContextDecorator` so the context " +":deco:`contextmanager` uses :class:`ContextDecorator` so the context " "managers it creates can be used as decorators as well as in :keyword:`with` " "statements. When used as a decorator, a new generator instance is implicitly " "created on each function call (this allows the otherwise \"one-shot\" " -"context managers created by :func:`contextmanager` to meet the requirement " +"context managers created by :deco:`contextmanager` to meet the requirement " "that context managers support multiple invocations in order to be used as " "decorators)." msgstr "" -":func:`contextmanager` は :class:`ContextDecorator` を使っているので、 :func:" -"`contextmanager` で作ったコンテキストマネージャは :keyword:`with` 文だけでな" -"くデコレータとしても利用できます。デコレーターとして利用された場合、新しい " -"generator インスタンスが関数呼び出しのたびに暗黙に生成されます (このことに" -"よって、 :func:`contextmanager` によって作られたなにがしか「単発」コンテキス" -"トマネージャを、コンテキストマネージャがデコレータとして使われるためには多重" -"に呼び出されることをサポートする必要がある、という要件に合致させることが出来" -"ます。)" #: ../../library/contextlib.rst:98 msgid "Use of :class:`ContextDecorator`." @@ -183,12 +175,9 @@ msgstr ":class:`ContextDecorator` の使用。" #: ../../library/contextlib.rst:104 msgid "" -"Similar to :func:`~contextlib.contextmanager`, but creates an :ref:" +"Similar to :deco:`~contextlib.contextmanager`, but creates an :ref:" "`asynchronous context manager `." msgstr "" -":func:`~contextlib.contextmanager` と似ていますが、 :ref:`非同期コンテキスト" -"マネージャ (asynchronous context manager) ` を生成し" -"ます。" #: ../../library/contextlib.rst:107 msgid "" @@ -227,12 +216,9 @@ msgstr "" #: ../../library/contextlib.rst:131 msgid "" -"Context managers defined with :func:`asynccontextmanager` can be used either " +"Context managers defined with :deco:`asynccontextmanager` can be used either " "as decorators or with :keyword:`async with` statements::" msgstr "" -":func:`asynccontextmanager` とともに定義されたコンテキストマネージャは、デコ" -"レータとして使うことも :keyword:`async with` 文と組み合わせて使うこともできま" -"す::" #: ../../library/contextlib.rst:134 msgid "" @@ -256,22 +242,15 @@ msgstr "" msgid "" "When used as a decorator, a new generator instance is implicitly created on " "each function call. This allows the otherwise \"one-shot\" context managers " -"created by :func:`asynccontextmanager` to meet the requirement that context " +"created by :deco:`asynccontextmanager` to meet the requirement that context " "managers support multiple invocations in order to be used as decorators." msgstr "" -"デコレータとして使われた場合は、各関数呼び出しに対して暗黙のうちに新しいジェ" -"ネレータインスタンスが生成されます。これにより、 :func:`asynccontextmanager` " -"で生成された単回使用のコンテキストマネージャが複数回呼び出し可能となり、コン" -"テキストマネージャをデコレータとして使うことができるための要件を満たすように" -"することができます。" #: ../../library/contextlib.rst:154 msgid "" -"Async context managers created with :func:`asynccontextmanager` can be used " +"Async context managers created with :deco:`asynccontextmanager` can be used " "as decorators." msgstr "" -":func:`asynccontextmanager` により生成された非同期コンテキストマネージャをデ" -"コレータとして使うことができるようになりました。" #: ../../library/contextlib.rst:161 msgid "" @@ -634,11 +613,9 @@ msgstr "" #: ../../library/contextlib.rst:403 msgid "" -"``ContextDecorator`` is used by :func:`contextmanager`, so you get this " +"``ContextDecorator`` is used by :deco:`contextmanager`, so you get this " "functionality automatically." msgstr "" -":func:`contextmanager` は ``ContextDecorator`` を利用しているので、自動的にデ" -"コレーターとしても利用できるようになります。" #: ../../library/contextlib.rst:406 msgid "Example of ``ContextDecorator``::" @@ -1094,8 +1071,8 @@ msgid "Similar to :meth:`ExitStack.close` but properly handles awaitables." msgstr "" #: ../../library/contextlib.rst:705 -msgid "Continuing the example for :func:`asynccontextmanager`::" -msgstr ":func:`asynccontextmanager` の使用例の続きです::" +msgid "Continuing the example for :deco:`asynccontextmanager`::" +msgstr "" #: ../../library/contextlib.rst:707 msgid "" @@ -1505,13 +1482,10 @@ msgstr "" #: ../../library/contextlib.rst:963 msgid "" -"Context managers created using :func:`contextmanager` are also single use " +"Context managers created using :deco:`contextmanager` are also single use " "context managers, and will complain about the underlying generator failing " "to yield if an attempt is made to use them a second time::" msgstr "" -":func:`contextmanager` により生成されたコンテキストマネージャも単回使用のコン" -"テキスト マネージャです。二回目に使おうとした場合、内部にあるジェネレータが" -"値の生成に失敗したと訴えるでしょう::" #: ../../library/contextlib.rst:967 msgid "" diff --git a/library/contextvars.po b/library/contextvars.po index 5a370b360..70da9513d 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-23 14:16+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/copy.po b/library/copy.po index 0f97ff9fb..7fb309b9e 100644 --- a/library/copy.po +++ b/library/copy.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/copyreg.po b/library/copyreg.po index dcafd875b..a10112cbf 100644 --- a/library/copyreg.po +++ b/library/copyreg.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/crypt.po b/library/crypt.po index a2250b7d5..db8724e99 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: souma987, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/crypto.po b/library/crypto.po index de5a8d172..efd5884f5 100644 --- a/library/crypto.po +++ b/library/crypto.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-09-11 17:24+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" diff --git a/library/csv.po b/library/csv.po index 060906e4a..a92490f3e 100644 --- a/library/csv.po +++ b/library/csv.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-06-23 16:23+0000\n" +"POT-Creation-Date: 2026-08-27 23:26+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: Takanori Suzuki , 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" @@ -463,7 +463,15 @@ msgstr "" "`Dialect` サブクラスを返します。オプションの *delimiters* パラメータを与えた" "場合、有効なデリミタ文字を含んでいるはずの文字列として解釈されます。" -#: ../../library/csv.rst:318 +#: ../../library/csv.rst:315 +msgid "" +"If several delimiters fit the sample equally well --- for example if both " +"``','`` and ``';'`` split every row consistently --- the delimiters listed " +"in the :attr:`~Sniffer.preferred` attribute are preferred, in that order, no " +"matter how many times each of them occurs." +msgstr "" + +#: ../../library/csv.rst:323 msgid "" "Analyze the sample text (presumed to be in CSV format) and return :const:" "`True` if the first row appears to be a series of column headers. Inspecting " @@ -471,23 +479,23 @@ msgid "" "sample contains a header:" msgstr "" -#: ../../library/csv.rst:323 +#: ../../library/csv.rst:328 msgid "the second through n-th rows contain numeric values" msgstr "2番目からn番目の行は数値を含みます。" -#: ../../library/csv.rst:324 +#: ../../library/csv.rst:329 msgid "" "the second through n-th rows contain strings where at least one value's " "length differs from that of the putative header of that column." msgstr "" -#: ../../library/csv.rst:327 +#: ../../library/csv.rst:332 msgid "" "Twenty-one rows after the header are sampled; if more than half of the " "columns + rows meet the criteria, :const:`True` is returned." msgstr "" -#: ../../library/csv.rst:332 +#: ../../library/csv.rst:337 msgid "" "This method is a rough heuristic and may produce both false positives and " "negatives." @@ -495,11 +503,22 @@ msgstr "" "このメソッドは大雑把なヒューリスティックであり、結果が偽陽性や偽陰性である可" "能性があります。" -#: ../../library/csv.rst:335 +#: ../../library/csv.rst:340 +msgid "The :class:`Sniffer` class has the following attribute:" +msgstr "" + +#: ../../library/csv.rst:344 +msgid "" +"The list of the delimiters preferred for breaking ties, in the order of " +"preference. It can be modified. Its initial value is ``[',', '\\t', ';', ' " +"', ':']``." +msgstr "" + +#: ../../library/csv.rst:349 msgid "An example for :class:`Sniffer` use::" msgstr ":class:`Sniffer` の利用例::" -#: ../../library/csv.rst:337 +#: ../../library/csv.rst:351 msgid "" "with open('example.csv', newline='') as csvfile:\n" " dialect = csv.Sniffer().sniff(csvfile.read(1024))\n" @@ -508,33 +527,32 @@ msgid "" " # ... process CSV file contents here ..." msgstr "" -#: ../../library/csv.rst:346 +#: ../../library/csv.rst:360 msgid "The :mod:`!csv` module defines the following constants:" msgstr "" -#: ../../library/csv.rst:350 +#: ../../library/csv.rst:364 msgid "Instructs :class:`writer` objects to quote all fields." msgstr "" ":class:`writer` オブジェクトに対し、全てのフィールドをクオートするように指示" "します。" -#: ../../library/csv.rst:355 +#: ../../library/csv.rst:369 msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " "special characters such as *delimiter*, *quotechar*, ``'\\r'``, ``'\\n'`` or " -"any of the characters in *lineterminator*." +"any of the characters in *lineterminator*. If *doublequote* is :const:" +"`False` and *escapechar* is set, the *quotechar* is escaped instead of " +"causing the field to be quoted." msgstr "" -":class:`writer` オブジェクトに対し、 *delimiter* 、 *quotechar*、``'\\r'``、" -"``'\\n'`` または *lineterminator* に含まれる任意の文字のような特別な文字を含" -"むフィールドだけをクオートするように指示します。" -#: ../../library/csv.rst:362 +#: ../../library/csv.rst:378 msgid "Instructs :class:`writer` objects to quote all non-numeric fields." msgstr "" ":class:`writer` オブジェクトに対し、全ての非数値フィールドをクオートするよう" "に指示します。" -#: ../../library/csv.rst:364 +#: ../../library/csv.rst:380 msgid "" "Instructs :class:`reader` objects to convert all non-quoted fields to type :" "class:`float`." @@ -542,7 +560,7 @@ msgstr "" ":class:`reader` オブジェクトに、クォーテーションで囲まれていないすべての" "フィールドを :class:`float` 型に変換するよう指示します。" -#: ../../library/csv.rst:367 +#: ../../library/csv.rst:383 msgid "" "Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, or :" "class:`~enum.IntEnum`, have a string representation that cannot be converted " @@ -550,7 +568,7 @@ msgid "" "data:`QUOTE_STRINGS` modes." msgstr "" -#: ../../library/csv.rst:375 +#: ../../library/csv.rst:391 msgid "" "Instructs :class:`writer` objects to never quote fields. When the current " "*delimiter*, *quotechar*, *escapechar*, ``'\\r'``, ``'\\n'`` or any of the " @@ -560,7 +578,7 @@ msgid "" "Set *quotechar* to ``None`` to prevent its escaping." msgstr "" -#: ../../library/csv.rst:383 +#: ../../library/csv.rst:399 msgid "" "Instructs :class:`reader` objects to perform no special processing of quote " "characters." @@ -568,45 +586,45 @@ msgstr "" ":class:`reader` オブジェクトに、クオート文字に対する特殊処理を行わないよう指" "示します。" -#: ../../library/csv.rst:387 +#: ../../library/csv.rst:403 msgid "" "Instructs :class:`writer` objects to quote all fields which are not " "``None``. This is similar to :data:`QUOTE_ALL`, except that if a field " "value is ``None`` an empty (unquoted) string is written." msgstr "" -#: ../../library/csv.rst:391 +#: ../../library/csv.rst:407 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) field as " "``None`` and to otherwise behave as :data:`QUOTE_ALL`." msgstr "" -#: ../../library/csv.rst:398 +#: ../../library/csv.rst:414 msgid "" "Instructs :class:`writer` objects to always place quotes around fields which " "are strings. This is similar to :data:`QUOTE_NONNUMERIC`, except that if a " "field value is ``None`` an empty (unquoted) string is written." msgstr "" -#: ../../library/csv.rst:402 +#: ../../library/csv.rst:418 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) string as " "``None`` and to otherwise behave as :data:`QUOTE_NONNUMERIC`." msgstr "" -#: ../../library/csv.rst:407 +#: ../../library/csv.rst:423 msgid "The :mod:`!csv` module defines the following exception:" msgstr "" -#: ../../library/csv.rst:412 +#: ../../library/csv.rst:428 msgid "Raised by any of the functions when an error is detected." msgstr "全ての関数において、エラーが検出された際に送出される例外です。" -#: ../../library/csv.rst:417 +#: ../../library/csv.rst:433 msgid "Dialects and Formatting Parameters" msgstr "Dialect クラスと書式化パラメータ" -#: ../../library/csv.rst:419 +#: ../../library/csv.rst:435 msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " @@ -619,18 +637,18 @@ msgid "" "attributes defined below for the :class:`Dialect` class." msgstr "" -#: ../../library/csv.rst:429 +#: ../../library/csv.rst:445 msgid "Dialects support the following attributes:" msgstr "Dialect は以下の属性をサポートしています:" -#: ../../library/csv.rst:434 +#: ../../library/csv.rst:450 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "" "フィールド間を分割するのに用いられる 1 文字からなる文字列です。デフォルトで" "は ``','`` です。" -#: ../../library/csv.rst:439 +#: ../../library/csv.rst:455 msgid "" "Controls how instances of *quotechar* appearing inside a field should " "themselves be quoted. When :const:`True`, the character is doubled. When :" @@ -643,7 +661,7 @@ msgstr "" "*escapechar* は *quotechar* の前に置かれます。デフォルトでは :const:`True` で" "す。" -#: ../../library/csv.rst:444 +#: ../../library/csv.rst:460 msgid "" "On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" "exc:`Error` is raised if a *quotechar* is found in a field." @@ -652,38 +670,43 @@ msgstr "" "ていない場合、フィールド内に *quotechar* が現れると :exc:`Error` が送出されま" "す。" -#: ../../library/csv.rst:450 +#: ../../library/csv.rst:466 msgid "" "A one-character string used by the writer to escape characters that require " "escaping:" msgstr "" -#: ../../library/csv.rst:453 +#: ../../library/csv.rst:469 msgid "" "the *delimiter*, the *quotechar*, ``'\\r'``, ``'\\n'`` and any of the " "characters in *lineterminator* are escaped if *quoting* is set to :const:" "`QUOTE_NONE`;" msgstr "" -#: ../../library/csv.rst:456 +#: ../../library/csv.rst:472 msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" msgstr "" -#: ../../library/csv.rst:457 +#: ../../library/csv.rst:473 msgid "the *escapechar* itself." msgstr "" -#: ../../library/csv.rst:459 +#: ../../library/csv.rst:475 msgid "" "On reading, the *escapechar* removes any special meaning from the following " "character. It defaults to :const:`None`, which disables escaping." msgstr "" -#: ../../library/csv.rst:462 +#: ../../library/csv.rst:478 +msgid "" +"Previously the *escapechar* itself was not escaped, which lost it on reading." +msgstr "" + +#: ../../library/csv.rst:482 msgid "An empty *escapechar* is not allowed." msgstr "空の *escapechar* は許可されていません。" -#: ../../library/csv.rst:467 +#: ../../library/csv.rst:487 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." @@ -691,7 +714,7 @@ msgstr "" ":class:`writer` が作り出す各行を終端する際に用いられる文字列です。デフォルト" "では ``'\\r\\n'`` です。" -#: ../../library/csv.rst:472 +#: ../../library/csv.rst:492 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " @@ -701,7 +724,7 @@ msgstr "" "にハードコードされており、 *lineterminator* を無視します。この振る舞いは将来" "変更されるかもしれません。" -#: ../../library/csv.rst:479 +#: ../../library/csv.rst:499 msgid "" "A one-character string used to quote fields containing special characters, " "such as the *delimiter* or the *quotechar*, or which contain new-line " @@ -710,11 +733,11 @@ msgid "" "prevent escaping ``'\"'`` if *quoting* is set to :const:`QUOTE_NONE`." msgstr "" -#: ../../library/csv.rst:486 +#: ../../library/csv.rst:506 msgid "An empty *quotechar* is not allowed." msgstr "空の *quotechar* は許可されていません。" -#: ../../library/csv.rst:491 +#: ../../library/csv.rst:511 msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :ref:`QUOTE_\\* constants