# 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, 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-12-17 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/" "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" #: ../../glossary.rst:5 msgid "Glossary" msgstr "用語集" #: ../../glossary.rst:10 msgid "``>>>``" msgstr "``>>>``" #: ../../glossary.rst:12 msgid "" "The default Python prompt of the :term:`interactive` shell. Often seen for " "code examples which can be executed interactively in the interpreter." msgstr "" ":term:`対話型 ` シェルにおけるデフォルトの Python プロンプトで" "す。インタープリターで対話的に実行されるコード例でよく見られます。" #: ../../glossary.rst:15 msgid "``...``" msgstr "``...``" #: ../../glossary.rst:17 msgid "Can refer to:" msgstr "次のものが考えられます:" #: ../../glossary.rst:19 msgid "" "The default Python prompt of the :term:`interactive` shell when entering the " "code for an indented code block, when within a pair of matching left and " "right delimiters (parentheses, square brackets, curly braces or triple " "quotes), or after specifying a decorator." msgstr "" "対話型 (:term:`interactive`) シェルにおいて、インデントされたコードブロック、" "対応する左右の区切り文字の組 (丸括弧、角括弧、波括弧、三重引用符) の内側、デ" "コレーターの後に、コードを入力する際に表示されるデフォルトの Python プロンプ" "トです。" #: ../../glossary.rst:26 msgid "" "The three dots form of the :ref:`Ellipsis ` object." msgstr "" #: ../../glossary.rst:27 msgid "abstract base class" msgstr "abstract base class" #: ../../glossary.rst:29 msgid "" "Abstract base classes complement :term:`duck-typing` by providing a way to " "define interfaces when other techniques like :func:`hasattr` would be clumsy " "or subtly wrong (for example with :ref:`magic methods `). " "ABCs introduce virtual subclasses, which are classes that don't inherit from " "a class but are still recognized by :func:`isinstance` and :func:" "`issubclass`; see the :mod:`abc` module documentation. Python comes with " "many built-in ABCs for data structures (in the :mod:`collections.abc` " "module), numbers (in the :mod:`numbers` module), streams (in the :mod:`io` " "module), import finders and loaders (in the :mod:`importlib.abc` module). " "You can create your own ABCs with the :mod:`abc` module." msgstr "" "(抽象基底クラス) 抽象基底クラスは :term:`duck-typing` を補完するもので、 :" "func:`hasattr` などの別のテクニックでは不恰好であったり微妙に誤る (例えば :" "ref:`magic methods ` の場合) 場合にインターフェースを定義する" "方法を提供します。ABC は仮想 (virtual) サブクラスを導入します。これは親クラス" "から継承しませんが、それでも :func:`isinstance` や :func:`issubclass` に認識" "されます; :mod:`abc` モジュールのドキュメントを参照してください。Python に" "は、多くの組み込み ABC が同梱されています。その対象は、(:mod:`collections." "abc` モジュールで) データ構造、(:mod:`numbers` モジュールで) 数、(:mod:`io` " "モジュールで) ストリーム、(:mod:`importlib.abc` モジュールで) インポートファ" "インダ及びローダーです。 :mod:`abc` モジュールを利用して独自の ABC を作成でき" "ます。" #: ../../glossary.rst:40 msgid "annotate function" msgstr "" #: ../../glossary.rst:42 msgid "" "A function that can be called to retrieve the :term:`annotations " "` of an object. This function is accessible as the :attr:" "`~object.__annotate__` attribute of functions, classes, and modules. " "Annotate functions are a subset of :term:`evaluate functions `." msgstr "" #: ../../glossary.rst:46 msgid "annotation" msgstr "annotation" #: ../../glossary.rst:48 msgid "" "A label associated with a variable, a class attribute or a function " "parameter or return value, used by convention as a :term:`type hint`." msgstr "" "(アノテーション) 変数、クラス属性、関数のパラメータや返り値に関係するラベルで" "す。\n" "慣例により :term:`type hint` として使われています。" #: ../../glossary.rst:52 msgid "" "Annotations of local variables cannot be accessed at runtime, but " "annotations of global variables, class attributes, and functions can be " "retrieved by calling :func:`annotationlib.get_annotations` on modules, " "classes, and functions, respectively." msgstr "" #: ../../glossary.rst:57 msgid "" "See :term:`variable annotation`, :term:`function annotation`, :pep:`484`, :" "pep:`526`, and :pep:`649`, which describe this functionality. Also see :ref:" "`annotations-howto` for best practices on working with annotations." msgstr "" #: ../../glossary.rst:61 msgid "argument" msgstr "引数 (argument)" #: ../../glossary.rst:63 msgid "" "A value passed to a :term:`function` (or :term:`method`) when calling the " "function. There are two kinds of argument:" msgstr "" "(実引数) 関数を呼び出す際に、 :term:`関数` (または :term:`メソッド " "`) に渡す値です。実引数には2種類あります:" #: ../../glossary.rst:66 msgid "" ":dfn:`keyword argument`: an argument preceded by an identifier (e.g. " "``name=``) in a function call or passed as a value in a dictionary preceded " "by ``**``. For example, ``3`` and ``5`` are both keyword arguments in the " "following calls to :func:`complex`::" msgstr "" ":dfn:`キーワード引数`: 関数呼び出しの際に引数の前に識別子がついたもの (例: " "``name=``) や、 ``**`` に続けた辞書の中の値として渡された引数。例えば、次の :" "func:`complex` の呼び出しでは、 ``3`` と ``5`` がキーワード引数です::" #: ../../glossary.rst:71 msgid "" "complex(real=3, imag=5)\n" "complex(**{'real': 3, 'imag': 5})" msgstr "" #: ../../glossary.rst:74 msgid "" ":dfn:`positional argument`: an argument that is not a keyword argument. " "Positional arguments can appear at the beginning of an argument list and/or " "be passed as elements of an :term:`iterable` preceded by ``*``. For example, " "``3`` and ``5`` are both positional arguments in the following calls::" msgstr "" ":dfn:`位置引数`: キーワード引数以外の引数。位置引数は引数リストの先頭に書くこ" "とができ、また ``*`` に続けた :term:`iterable` の要素として渡すことができま" "す。例えば、次の例では ``3`` と ``5`` は両方共位置引数です::" #: ../../glossary.rst:80 msgid "" "complex(3, 5)\n" "complex(*(3, 5))" msgstr "" #: ../../glossary.rst:83 msgid "" "Arguments are assigned to the named local variables in a function body. See " "the :ref:`calls` section for the rules governing this assignment. " "Syntactically, any expression can be used to represent an argument; the " "evaluated value is assigned to the local variable." msgstr "" "実引数は関数の実体において名前付きのローカル変数に割り当てられます。割り当て" "を行う規則については :ref:`calls` を参照してください。シンタックスにおいて実" "引数を表すためにあらゆる式を使うことが出来ます。評価された値はローカル変数に" "割り当てられます。" #: ../../glossary.rst:88 msgid "" "See also the :term:`parameter` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " "and :pep:`362`." msgstr "" ":term:`仮引数` 、FAQ の :ref:`実引数と仮引数の違いは何ですか? " "` 、:pep:`362` を参照してください。" #: ../../glossary.rst:91 msgid "asynchronous context manager" msgstr "asynchronous context manager" #: ../../glossary.rst:93 msgid "" "An object which controls the environment seen in an :keyword:`async with` " "statement by defining :meth:`~object.__aenter__` and :meth:`~object." "__aexit__` methods. Introduced by :pep:`492`." msgstr "" "(非同期コンテキストマネージャ)\n" ":meth:`~object.__aenter__` と :meth:`~object.__aexit__` メソッドを定義するこ" "とで :keyword:`async with` 文内の環境を管理するオブジェクトです。 :pep:" "`492` で導入されました。" #: ../../glossary.rst:96 msgid "asynchronous generator" msgstr "asynchronous generator" #: ../../glossary.rst:98 msgid "" "A function which returns an :term:`asynchronous generator iterator`. It " "looks like a coroutine function defined with :keyword:`async def` except " "that it contains :keyword:`yield` expressions for producing a series of " "values usable in an :keyword:`async for` loop." msgstr "" "(非同期ジェネレータ)\n" ":term:`asynchronous generator iterator` を返す関数です。\n" ":keyword:`async def` で定義されたコルーチン関数に似ていますが、 :keyword:" "`yield` 式を持つ点で異なります。\n" ":keyword:`yield` 式は :keyword:`async for` ループで使用できる値の並びを生成す" "るのに使用されます。" #: ../../glossary.rst:103 msgid "" "Usually refers to an asynchronous generator function, but may refer to an " "*asynchronous generator iterator* in some contexts. In cases where the " "intended meaning isn't clear, using the full terms avoids ambiguity." msgstr "" "通常は非同期ジェネレータ関数を指しますが、文脈によっては *非同期ジェネレータ" "イテレータ* を指す場合があります。\n" "意図された意味が明らかでない場合、 明瞭化のために完全な単語を使用します。" #: ../../glossary.rst:107 msgid "" "An asynchronous generator function may contain :keyword:`await` expressions " "as well as :keyword:`async for`, and :keyword:`async with` statements." msgstr "" "非同期ジェネレータ関数には、 :keyword:`async for` 文や :keyword:`async with` " "文だけでなく :keyword:`await` 式もあることがあります。" #: ../../glossary.rst:110 msgid "asynchronous generator iterator" msgstr "asynchronous generator iterator" #: ../../glossary.rst:112 msgid "An object created by an :term:`asynchronous generator` function." msgstr "" #: ../../glossary.rst:114 msgid "" "This is an :term:`asynchronous iterator` which when called using the :meth:" "`~object.__anext__` method returns an awaitable object which will execute " "the body of the asynchronous generator function until the next :keyword:" "`yield` expression." msgstr "" "これは :term:`asynchronous iterator` で、 :meth:`~object.__anext__` メソッド" "を使って呼ばれると awaitable オブジェクトを返します。 この awaitable オブ" "ジェクトは、次の :keyword:`yield` 式まで非同期ジェネレータ関数の本体を実行し" "ます。" #: ../../glossary.rst:119 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "execution state (including local variables and pending try-statements). " "When the *asynchronous generator iterator* effectively resumes with another " "awaitable returned by :meth:`~object.__anext__`, it picks up where it left " "off. See :pep:`492` and :pep:`525`." msgstr "" #: ../../glossary.rst:124 msgid "asynchronous iterable" msgstr "asynchronous iterable" #: ../../glossary.rst:126 msgid "" "An object, that can be used in an :keyword:`async for` statement. Must " "return an :term:`asynchronous iterator` from its :meth:`~object.__aiter__` " "method. Introduced by :pep:`492`." msgstr "" "(非同期イテラブル)\n" ":keyword:`async for` 文の中で使用できるオブジェクトです。 自身の :meth:" "`~object.__aiter__` メソッドから :term:`asynchronous iterator` を返さなければ" "なりません。 :pep:`492` で導入されました。" #: ../../glossary.rst:129 msgid "asynchronous iterator" msgstr "asynchronous iterator" #: ../../glossary.rst:131 msgid "" "An object that implements the :meth:`~object.__aiter__` and :meth:`~object." "__anext__` methods. :meth:`~object.__anext__` must return an :term:" "`awaitable` object. :keyword:`async for` resolves the awaitables returned by " "an asynchronous iterator's :meth:`~object.__anext__` method until it raises " "a :exc:`StopAsyncIteration` exception. Introduced by :pep:`492`." msgstr "" "(非同期イテレータ)\n" ":meth:`~object.__aiter__` と :meth:`~object.__anext__` メソッドを実装したオブ" "ジェクトです。 :meth:`~object.__anext__` は :term:`awaitable` オブジェクトを" "返さなければなりません。 :keyword:`async for` は :exc:`StopAsyncIteration` " "例外を送出するまで、非同期イテレータの :meth:`~object.__anext__` メソッドが返" "す awaitable を解決します。 :pep:`492` で導入されました。" #: ../../glossary.rst:136 msgid "atomic operation" msgstr "" #: ../../glossary.rst:138 msgid "" "An operation that appears to execute as a single, indivisible step: no other " "thread can observe it half-done, and its effects become visible all at " "once. Python does not guarantee that high-level statements are atomic (for " "example, ``x += 1`` performs multiple bytecode operations and is not " "atomic). Atomicity is only guaranteed where explicitly documented. See " "also :term:`race condition` and :term:`data race`." msgstr "" #: ../../glossary.rst:144 msgid "attached thread state" msgstr "" #: ../../glossary.rst:147 msgid "A :term:`thread state` that is active for the current OS thread." msgstr "" #: ../../glossary.rst:149 msgid "" "When a :term:`thread state` is attached, the OS thread has access to the " "full Python C API and can safely invoke the bytecode interpreter." msgstr "" #: ../../glossary.rst:153 msgid "" "Unless a function explicitly notes otherwise, attempting to call the C API " "without an attached thread state will result in a fatal error or undefined " "behavior. A thread state can be attached and detached explicitly by the " "user through the C API, or implicitly by the runtime, including during " "blocking C calls and by the bytecode interpreter in between calls." msgstr "" #: ../../glossary.rst:160 msgid "" "On most builds of Python, having an attached thread state implies that the " "caller holds the :term:`GIL` for the current interpreter, so only one OS " "thread can have an attached thread state at a given moment. In :term:`free-" "threaded ` builds of Python, threads can concurrently hold " "an attached thread state, allowing for true parallelism of the bytecode " "interpreter." msgstr "" #: ../../glossary.rst:166 msgid "attribute" msgstr "属性" #: ../../glossary.rst:168 msgid "" "A value associated with an object which is usually referenced by name using " "dotted expressions. For example, if an object *o* has an attribute *a* it " "would be referenced as *o.a*." msgstr "" "(属性) オブジェクトに関連付けられ、ドット表記式によって名前で通常参照される値" "です。例えば、オブジェクト *o* が属性 *a* を持っているとき、その属性は *o.a* " "で参照されます。" #: ../../glossary.rst:173 msgid "" "It is possible to give an object an attribute whose name is not an " "identifier as defined by :ref:`identifiers`, for example using :func:" "`setattr`, if the object allows it. Such an attribute will not be accessible " "using a dotted expression, and would instead need to be retrieved with :func:" "`getattr`." msgstr "" "オブジェクトには、 :ref:`identifiers` で定義される識別子ではない名前の属性を" "与えることができます。たとえば :func:`setattr` を使い、オブジェクトがそれを許" "可している場合に行えます。このような属性はドット表記式ではアクセスできず、代" "わりに :func:`getattr` を使って取る必要があります。" #: ../../glossary.rst:178 msgid "awaitable" msgstr "awaitable" #: ../../glossary.rst:180 msgid "" "An object that can be used in an :keyword:`await` expression. Can be a :" "term:`coroutine` or an object with an :meth:`~object.__await__` method. See " "also :pep:`492`." msgstr "" "(待機可能)\n" ":keyword:`await` 式で使用することが出来るオブジェクトです。 :term:" "`coroutine` か、 :meth:`~object.__await__` メソッドがあるオブジェクトです。 :" "pep:`492` を参照してください。" #: ../../glossary.rst:183 msgid "BDFL" msgstr "BDFL" #: ../../glossary.rst:185 msgid "" "Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." msgstr "" "慈悲深き終身独裁者 (Benevolent Dictator For Life) の略です。Python の作者、" "`Guido van Rossum `_ のことです。" #: ../../glossary.rst:187 msgid "binary file" msgstr "binary file" #: ../../glossary.rst:189 msgid "" "A :term:`file object` able to read and write :term:`bytes-like objects " "`. Examples of binary files are files opened in binary " "mode (``'rb'``, ``'wb'`` or ``'rb+'``), :data:`sys.stdin.buffer `, :data:`sys.stdout.buffer `, and instances of :class:`io." "BytesIO` and :class:`gzip.GzipFile`." msgstr "" "(バイナリファイル)\n" ":term:`bytes-like オブジェクト ` の読み込みおよび書き込み" "ができる :term:`ファイルオブジェクト ` です。\n" "バイナリファイルの例は、バイナリモード (``'rb'``, ``'wb'`` or ``'rb+'``) で開" "かれたファイル、:data:`sys.stdin.buffer `、:data:`sys.stdout." "buffer `、 :class:`io.BytesIO` や :class:`gzip.GzipFile`. のイン" "スタンスです。" #: ../../glossary.rst:196 msgid "" "See also :term:`text file` for a file object able to read and write :class:" "`str` objects." msgstr "" ":class:`str` オブジェクトの読み書きができるファイルオブジェクトについては、 :" "term:`text file` も参照してください。" #: ../../glossary.rst:198 msgid "borrowed reference" msgstr "" #: ../../glossary.rst:200 msgid "" "In Python's C API, a borrowed reference is a reference to an object, where " "the code using the object does not own the reference. It becomes a dangling " "pointer if the object is destroyed. For example, a garbage collection can " "remove the last :term:`strong reference` to the object and so destroy it." msgstr "" #: ../../glossary.rst:206 msgid "" "Calling :c:func:`Py_INCREF` on the :term:`borrowed reference` is recommended " "to convert it to a :term:`strong reference` in-place, except when the object " "cannot be destroyed before the last usage of the borrowed reference. The :c:" "func:`Py_NewRef` function can be used to create a new :term:`strong " "reference`." msgstr "" #: ../../glossary.rst:211 msgid "bytes-like object" msgstr "bytes-like object" #: ../../glossary.rst:213 msgid "" "An object that supports the :ref:`bufferobjects` and can export a C-:term:" "`contiguous` buffer. This includes all :class:`bytes`, :class:`bytearray`, " "and :class:`array.array` objects, as well as many common :class:`memoryview` " "objects. Bytes-like objects can be used for various operations that work " "with binary data; these include compression, saving to a binary file, and " "sending over a socket." msgstr "" ":ref:`bufferobjects` をサポートしていて、 C 言語の意味で :term:`連続した " "` バッファーを提供可能なオブジェクト。\n" ":class:`bytes`, :class:`bytearray`, :class:`array.array` や、多くの一般的な :" "class:`memoryview` オブジェクトがこれに当たります。\n" "bytes-like オブジェクトは、データ圧縮、バイナリファイルへの保存、ソケットを経" "由した送信など、バイナリデータを要求するいろいろな操作に利用することができま" "す。" #: ../../glossary.rst:220 msgid "" "Some operations need the binary data to be mutable. The documentation often " "refers to these as \"read-write bytes-like objects\". Example mutable " "buffer objects include :class:`bytearray` and a :class:`memoryview` of a :" "class:`bytearray`. Other operations require the binary data to be stored in " "immutable objects (\"read-only bytes-like objects\"); examples of these " "include :class:`bytes` and a :class:`memoryview` of a :class:`bytes` object." msgstr "" "幾つかの操作ではバイナリデータを変更する必要があります。\n" "その操作のドキュメントではよく \"読み書き可能な bytes-like オブジェクト\" に" "言及しています。\n" "変更可能なバッファーオブジェクトには、 :class:`bytearray` と :class:" "`bytearray` の :class:`memoryview` などが含まれます。\n" "また、他の幾つかの操作では不変なオブジェクト内のバイナリデータ (\"読み出し専" "用の bytes-like オブジェクト\") を必要します。それには :class:`bytes` と :" "class:`bytes` の :class:`memoryview` オブジェクトが含まれます。" #: ../../glossary.rst:228 msgid "bytecode" msgstr "bytecode" #: ../../glossary.rst:230 msgid "" "Python source code is compiled into bytecode, the internal representation of " "a Python program in the CPython interpreter. The bytecode is also cached in " "``.pyc`` files so that executing the same file is faster the second time " "(recompilation from source to bytecode can be avoided). This \"intermediate " "language\" is said to run on a :term:`virtual machine` that executes the " "machine code corresponding to each bytecode. Do note that bytecodes are not " "expected to work between different Python virtual machines, nor to be stable " "between Python releases." msgstr "" "(バイトコード) Python のソースコードは、 Python プログラムの CPython インタプ" "リタの内部表現であるバイトコードへとコンパイルされます。\n" "バイトコードは ``.pyc`` ファイルにキャッシュされ、同じファイルが二度目に実行" "されるときはより高速になります (ソースコードからバイトコードへの再度のコンパ" "イルは回避されます)。\n" "この \"中間言語 (intermediate language)\" は、各々のバイトコードに対応する機" "械語を実行する :term:`仮想マシン ` で動作するといえます。\n" "重要な注意として、バイトコードは異なる Python 仮想マシン間で動作することや、" "Python リリース間で安定であることは期待されていません。" #: ../../glossary.rst:240 msgid "" "A list of bytecode instructions can be found in the documentation for :ref:" "`the dis module `." msgstr "" "バイトコードの命令一覧は :ref:`dis モジュール ` にあります。" #: ../../glossary.rst:242 msgid "callable" msgstr "callable" #: ../../glossary.rst:244 msgid "" "A callable is an object that can be called, possibly with a set of arguments " "(see :term:`argument`), with the following syntax::" msgstr "" #: ../../glossary.rst:247 msgid "callable(argument1, argument2, argumentN)" msgstr "" #: ../../glossary.rst:249 msgid "" "A :term:`function`, and by extension a :term:`method`, is a callable. An " "instance of a class that implements the :meth:`~object.__call__` method is " "also a callable." msgstr "" #: ../../glossary.rst:252 msgid "callback" msgstr "callback" #: ../../glossary.rst:254 msgid "" "A subroutine function which is passed as an argument to be executed at some " "point in the future." msgstr "(コールバック) 将来のある時点で実行されるために引数として渡される関数" #: ../../glossary.rst:256 msgid "class" msgstr "クラス" #: ../../glossary.rst:258 msgid "" "A template for creating user-defined objects. Class definitions normally " "contain method definitions which operate on instances of the class." msgstr "" "(クラス) ユーザー定義オブジェクトを作成するためのテンプレートです。クラス定義" "は普通、そのクラスのインスタンス上の操作をするメソッドの定義を含みます。" #: ../../glossary.rst:261 msgid "class variable" msgstr "class variable" #: ../../glossary.rst:263 msgid "" "A variable defined in a class and intended to be modified only at class " "level (i.e., not in an instance of the class)." msgstr "" "(クラス変数) クラス上に定義され、クラスレベルで (つまり、クラスのインスタンス" "上ではなしに) 変更されることを目的としている変数です。" #: ../../glossary.rst:265 msgid "closure variable" msgstr "" #: ../../glossary.rst:267 msgid "" "A :term:`free variable` referenced from a :term:`nested scope` that is " "defined in an outer scope rather than being resolved at runtime from the " "globals or builtin namespaces. May be explicitly defined with the :keyword:" "`nonlocal` keyword to allow write access, or implicitly defined if the " "variable is only being read." msgstr "" #: ../../glossary.rst:272 msgid "" "For example, in the ``inner`` function in the following code, both ``x`` and " "``print`` are :term:`free variables `, but only ``x`` is a " "*closure variable*::" msgstr "" #: ../../glossary.rst:275 msgid "" "def outer():\n" " x = 0\n" " def inner():\n" " nonlocal x\n" " x += 1\n" " print(x)\n" " return inner" msgstr "" #: ../../glossary.rst:283 msgid "" "Due to the :attr:`codeobject.co_freevars` attribute (which, despite its " "name, only includes the names of closure variables rather than listing all " "referenced free variables), the more general :term:`free variable` term is " "sometimes used even when the intended meaning is to refer specifically to " "closure variables." msgstr "" #: ../../glossary.rst:287 msgid "complex number" msgstr "complex number" #: ../../glossary.rst:289 msgid "" "An extension of the familiar real number system in which all numbers are " "expressed as a sum of a real part and an imaginary part. Imaginary numbers " "are real multiples of the imaginary unit (the square root of ``-1``), often " "written ``i`` in mathematics or ``j`` in engineering. Python has built-in " "support for complex numbers, which are written with this latter notation; " "the imaginary part is written with a ``j`` suffix, e.g., ``3+1j``. To get " "access to complex equivalents of the :mod:`math` module, use :mod:`cmath`. " "Use of complex numbers is a fairly advanced mathematical feature. If you're " "not aware of a need for them, it's almost certain you can safely ignore them." msgstr "" "(複素数) よく知られている実数系を拡張したもので、すべての数は実部と虚部の和と" "して表されます。虚数は虚数単位 (``-1`` の平方根) に実数を掛けたもので、一般に" "数学では ``i`` と書かれ、工学では ``j`` と書かれます。Python は複素数に組み込" "みで対応し、後者の表記を取っています。虚部は末尾に ``j`` をつけて書きます。例" "えば ``3+1j`` です。 :mod:`math` モジュールの複素数版を利用するには、 :mod:" "`cmath` を使います。複素数の使用はかなり高度な数学の機能です。必要性を感じな" "ければ、ほぼ間違いなく無視してしまってよいでしょう。" #: ../../glossary.rst:299 msgid "concurrency" msgstr "" #: ../../glossary.rst:301 msgid "" "The ability of a computer program to perform multiple tasks at the same " "time. Python provides libraries for writing programs that make use of " "different forms of concurrency. :mod:`asyncio` is a library for dealing " "with asynchronous tasks and coroutines. :mod:`threading` provides access to " "operating system threads and :mod:`multiprocessing` to operating system " "processes. Multi-core processors can execute threads and processes on " "different CPU cores at the same time (see :term:`parallelism`)." msgstr "" #: ../../glossary.rst:309 msgid "concurrent modification" msgstr "" #: ../../glossary.rst:311 msgid "" "When multiple threads modify shared data at the same time. Concurrent " "modification without proper synchronization can cause :term:`race conditions " "`, and might also trigger a :term:`data race `, " "data corruption, or both." msgstr "" #: ../../glossary.rst:315 msgid "context" msgstr "" #: ../../glossary.rst:317 msgid "" "This term has different meanings depending on where and how it is used. Some " "common meanings:" msgstr "" #: ../../glossary.rst:320 msgid "" "The temporary state or environment established by a :term:`context manager` " "via a :keyword:`with` statement." msgstr "" #: ../../glossary.rst:322 msgid "" "The collection of key­value bindings associated with a particular :class:" "`contextvars.Context` object and accessed via :class:`~contextvars." "ContextVar` objects. Also see :term:`context variable`." msgstr "" #: ../../glossary.rst:326 msgid "" "A :class:`contextvars.Context` object. Also see :term:`current context`." msgstr "" #: ../../glossary.rst:328 msgid "context management protocol" msgstr "コンテキスト管理プロトコル" #: ../../glossary.rst:330 msgid "" "The :meth:`~object.__enter__` and :meth:`~object.__exit__` methods called by " "the :keyword:`with` statement. See :pep:`343`." msgstr "" #: ../../glossary.rst:332 msgid "context manager" msgstr "context manager" #: ../../glossary.rst:334 msgid "" "An object which implements the :term:`context management protocol` and " "controls the environment seen in a :keyword:`with` statement. See :pep:" "`343`." msgstr "" #: ../../glossary.rst:337 msgid "context variable" msgstr "context variable" #: ../../glossary.rst:339 msgid "" "A variable whose value depends on which context is the :term:`current " "context`. Values are accessed via :class:`contextvars.ContextVar` objects. " "Context variables are primarily used to isolate state between concurrent " "asynchronous tasks." msgstr "" #: ../../glossary.rst:343 msgid "contiguous" msgstr "contiguous" #: ../../glossary.rst:347 msgid "" "A buffer is considered contiguous exactly if it is either *C-contiguous* or " "*Fortran contiguous*. Zero-dimensional buffers are C and Fortran " "contiguous. In one-dimensional arrays, the items must be laid out in memory " "next to each other, in order of increasing indexes starting from zero. In " "multidimensional C-contiguous arrays, the last index varies the fastest when " "visiting items in order of memory address. However, in Fortran contiguous " "arrays, the first index varies the fastest." msgstr "" "(隣接、連続) バッファが厳密に *C-連続* または *Fortran 連続* である場合に、そ" "のバッファは連続しているとみなせます。\n" "ゼロ次元バッファは C 連続であり Fortran 連続です。\n" "一次元の配列では、その要素は必ずメモリ上で隣接するように配置され、添字がゼロ" "から始まり増えていく順序で並びます。\n" "多次元の C-連続な配列では、メモリアドレス順に要素を巡る際には最後の添え字が最" "初に変わるのに対し、 Fortran 連続な配列では最初の添え字が最初に動きます。" #: ../../glossary.rst:355 msgid "coroutine" msgstr "コルーチン" #: ../../glossary.rst:357 msgid "" "Coroutines are a more generalized form of subroutines. Subroutines are " "entered at one point and exited at another point. Coroutines can be " "entered, exited, and resumed at many different points. They can be " "implemented with the :keyword:`async def` statement. See also :pep:`492`." msgstr "" "(コルーチン) コルーチンはサブルーチンのより一般的な形式です。\n" "サブルーチンには決められた地点から入り、別の決められた地点から出ます。\n" "コルーチンには多くの様々な地点から入る、出る、再開することができます。\n" "コルーチンは :keyword:`async def` 文で実装できます。\n" ":pep:`492` を参照してください。" #: ../../glossary.rst:362 msgid "coroutine function" msgstr "coroutine function" #: ../../glossary.rst:364 msgid "" "A function which returns a :term:`coroutine` object. A coroutine function " "may be defined with the :keyword:`async def` statement, and may contain :" "keyword:`await`, :keyword:`async for`, and :keyword:`async with` keywords. " "These were introduced by :pep:`492`." msgstr "" "(コルーチン関数)\n" ":term:`coroutine` オブジェクトを返す関数です。\n" "コルーチン関数は :keyword:`async def` 文で実装され、:keyword:`await`、:" "keyword:`async for`、 および :keyword:`async with` キーワードを持つことが出来" "ます。\n" "これらは :pep:`492` で導入されました。" #: ../../glossary.rst:369 msgid "CPython" msgstr "CPython" #: ../../glossary.rst:371 msgid "" "The canonical implementation of the Python programming language, as " "distributed on `python.org `_. The term \"CPython\" " "is used when necessary to distinguish this implementation from others such " "as Jython or IronPython." msgstr "" "`python.org `_ で配布されている、Python プログラミン" "グ言語の標準的な実装です。\"CPython\" という単語は、この実装を Jython や " "IronPython といった他の実装と区別する必要が有る場合に利用されます。" #: ../../glossary.rst:375 msgid "current context" msgstr "" #: ../../glossary.rst:377 msgid "" "The :term:`context` (:class:`contextvars.Context` object) that is currently " "used by :class:`~contextvars.ContextVar` objects to access (get or set) the " "values of :term:`context variables `. Each thread has its " "own current context. Frameworks for executing asynchronous tasks (see :mod:" "`asyncio`) associate each task with a context which becomes the current " "context whenever the task starts or resumes execution." msgstr "" #: ../../glossary.rst:383 msgid "cyclic isolate" msgstr "" #: ../../glossary.rst:385 msgid "" "A subgroup of one or more objects that reference each other in a reference " "cycle, but are not referenced by objects outside the group. The goal of " "the :term:`cyclic garbage collector ` is to identify " "these groups and break the reference cycles so that the memory can be " "reclaimed." msgstr "" #: ../../glossary.rst:389 msgid "data race" msgstr "" #: ../../glossary.rst:391 msgid "" "A situation where multiple threads access the same memory location " "concurrently, at least one of the accesses is a write, and the threads do " "not use any synchronization to control their access. Data races lead to :" "term:`non-deterministic` behavior and can cause data corruption. Proper use " "of :term:`locks ` and other :term:`synchronization primitives " "` prevents data races. Note that data races can " "only happen in native code, but that :term:`native code` might be exposed in " "a Python API. See also :term:`race condition` and :term:`thread-safe`." msgstr "" #: ../../glossary.rst:400 msgid "deadlock" msgstr "" #: ../../glossary.rst:402 msgid "" "A situation in which two or more tasks (threads, processes, or coroutines) " "wait indefinitely for each other to release resources or complete actions, " "preventing any from making progress. For example, if thread A holds lock 1 " "and waits for lock 2, while thread B holds lock 2 and waits for lock 1, both " "threads will wait indefinitely. In Python this often arises from acquiring " "multiple locks in conflicting orders or from circular join/await " "dependencies. Deadlocks can be avoided by always acquiring multiple :term:" "`locks ` in a consistent order. See also :term:`lock` and :term:" "`reentrant`." msgstr "" #: ../../glossary.rst:411 msgid "decorator" msgstr "decorator" #: ../../glossary.rst:413 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`." msgstr "" "(デコレータ) 別の関数を返す関数で、通常、 ``@wrapper`` 構文で関数変換として適" "用されます。デコレータの一般的な利用例は、 :func:`classmethod` と :func:" "`staticmethod` です。" #: ../../glossary.rst:417 msgid "" "The decorator syntax is merely syntactic sugar, the following two function " "definitions are semantically equivalent::" msgstr "" "デコレータの文法はシンタックスシュガーです。次の2つの関数定義は意味的に同じも" "のです::" #: ../../glossary.rst:420 msgid "" "def f(arg):\n" " ...\n" "f = staticmethod(f)\n" "\n" "@staticmethod\n" "def f(arg):\n" " ..." msgstr "" #: ../../glossary.rst:428 msgid "" "The same concept exists for classes, but is less commonly used there. See " "the documentation for :ref:`function definitions ` and :ref:`class " "definitions ` for more about decorators." msgstr "" "同じ概念がクラスにも存在しますが、あまり使われません。デコレータについて詳し" "くは、 :ref:`関数定義 ` および :ref:`クラス定義 ` のドキュメ" "ントを参照してください。" #: ../../glossary.rst:431 msgid "descriptor" msgstr "descriptor" #: ../../glossary.rst:433 msgid "" "Any object which defines the methods :meth:`~object.__get__`, :meth:`~object." "__set__`, or :meth:`~object.__delete__`. When a class attribute is a " "descriptor, its special binding behavior is triggered upon attribute " "lookup. Normally, using *a.b* to get, set or delete an attribute looks up " "the object named *b* in the class dictionary for *a*, but if *b* is a " "descriptor, the respective descriptor method gets called. Understanding " "descriptors is a key to a deep understanding of Python because they are the " "basis for many features including functions, methods, properties, class " "methods, static methods, and reference to super classes." msgstr "" #: ../../glossary.rst:444 msgid "" "For more information about descriptors' methods, see :ref:`descriptors` or " "the :ref:`Descriptor How To Guide `." msgstr "" "デスクリプタのメソッドに関しての詳細は、 :ref:`descriptors` や :ref:" "`Descriptor How To Guide ` を参照してください。" #: ../../glossary.rst:446 msgid "dictionary" msgstr "dictionary" #: ../../glossary.rst:448 msgid "" "An associative array, where arbitrary keys are mapped to values. The keys " "can be any object with :meth:`~object.__hash__` and :meth:`~object.__eq__` " "methods. Called a hash in Perl." msgstr "" #: ../../glossary.rst:452 msgid "dictionary comprehension" msgstr "dictionary comprehension" #: ../../glossary.rst:454 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a dictionary with the results. ``results = {n: n ** 2 for n in " "range(10)}`` generates a dictionary containing key ``n`` mapped to value ``n " "** 2``. See :ref:`comprehensions`." msgstr "" "(辞書内包表記) iterable 内の全てあるいは一部の要素を処理して、その結果からな" "る辞書を返すコンパクトな書き方です。 ``results = {n: n ** 2 for n in " "range(10)}`` とすると、キー ``n`` を値 ``n ** 2`` に対応付ける辞書を生成しま" "す。 :ref:`comprehensions` を参照してください。" #: ../../glossary.rst:458 msgid "dictionary view" msgstr "dictionary view" #: ../../glossary.rst:460 msgid "" "The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:" "`dict.items` are called dictionary views. They provide a dynamic view on the " "dictionary’s entries, which means that when the dictionary changes, the view " "reflects these changes. To force the dictionary view to become a full list " "use ``list(dictview)``. See :ref:`dict-views`." msgstr "" "(辞書ビュー)\n" ":meth:`dict.keys`、:meth:`dict.values`、:meth:`dict.items` が返すオブジェクト" "です。\n" "辞書の項目の動的なビューを提供します。\n" "すなわち、辞書が変更されるとビューはそれを反映します。\n" "辞書ビューを強制的に完全なリストにするには ``list(dictview)`` を使用してくだ" "さい。 \n" ":ref:`dict-views` を参照してください。" #: ../../glossary.rst:466 msgid "docstring" msgstr "docstring" #: ../../glossary.rst:468 msgid "" "A string literal which appears as the first expression in a class, function " "or module. While ignored when the suite is executed, it is recognized by " "the compiler and put into the :attr:`~definition.__doc__` attribute of the " "enclosing class, function or module. Since it is available via " "introspection, it is the canonical place for documentation of the object." msgstr "" #: ../../glossary.rst:474 msgid "duck-typing" msgstr "duck-typing" #: ../../glossary.rst:476 msgid "" "A programming style which does not look at an object's type to determine if " "it has the right interface; instead, the method or attribute is simply " "called or used (\"If it looks like a duck and quacks like a duck, it must be " "a duck.\") By emphasizing interfaces rather than specific types, well-" "designed code improves its flexibility by allowing polymorphic " "substitution. Duck-typing avoids tests using :func:`type` or :func:" "`isinstance`. (Note, however, that duck-typing can be complemented with :" "term:`abstract base classes `.) Instead, it typically " "employs :func:`hasattr` tests or :term:`EAFP` programming." msgstr "" "あるオブジェクトが正しいインターフェースを持っているかを決定するのにオブジェ" "クトの型を見ないプログラミングスタイルです。代わりに、単純にオブジェクトのメ" "ソッドや属性が呼ばれたり使われたりします。(「アヒルのように見えて、アヒルの" "ように鳴けば、それはアヒルである。」)インターフェースを型より重視すること" "で、上手くデザインされたコードは、ポリモーフィックな代替を許して柔軟性を向上" "させます。ダックタイピングは :func:`type` や :func:`isinstance` による判定を" "避けます。 (ただし、ダックタイピングを :term:`抽象基底クラス ` で補完することもできます。) その代わり、典型的に :func:`hasattr` 判定" "や :term:`EAFP` プログラミングを利用します。" #: ../../glossary.rst:485 msgid "dunder" msgstr "" #: ../../glossary.rst:487 msgid "" "An informal short-hand for \"double underscore\", used when talking about a :" "term:`special method`. For example, ``__init__`` is often pronounced " "\"dunder init\"." msgstr "" #: ../../glossary.rst:490 msgid "EAFP" msgstr "EAFP" #: ../../glossary.rst:492 msgid "" "Easier to ask for forgiveness than permission. This common Python coding " "style assumes the existence of valid keys or attributes and catches " "exceptions if the assumption proves false. This clean and fast style is " "characterized by the presence of many :keyword:`try` and :keyword:`except` " "statements. The technique contrasts with the :term:`LBYL` style common to " "many other languages such as C." msgstr "" "「認可をとるより許しを請う方が容易 (easier to ask for forgiveness than " "permission、マーフィーの法則)」の略です。この Python で広く使われているコー" "ディングスタイルでは、通常は有効なキーや属性が存在するものと仮定し、その仮定" "が誤っていた場合に例外を捕捉します。この簡潔で手早く書けるコーディングスタイ" "ルには、 :keyword:`try` 文および :keyword:`except` 文がたくさんあるのが特徴で" "す。このテクニックは、C のような言語でよく使われている :term:`LBYL` スタイル" "と対照的なものです。" #: ../../glossary.rst:498 msgid "evaluate function" msgstr "" #: ../../glossary.rst:500 msgid "" "A function that can be called to evaluate a lazily evaluated attribute of an " "object, such as the value of type aliases created with the :keyword:`type` " "statement." msgstr "" #: ../../glossary.rst:503 msgid "expression" msgstr "expression" #: ../../glossary.rst:505 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:512 msgid "extension module" msgstr "extension module" #: ../../glossary.rst:514 msgid "" "A module written in C or C++, using Python's C API to interact with the core " "and with user code." msgstr "" "(拡張モジュール) C や C++ で書かれたモジュールで、Python の C API を利用して " "Python コアやユーザーコードとやりとりします。" #: ../../glossary.rst:516 msgid "f-string" msgstr "f-string" #: ../../glossary.rst:517 msgid "f-strings" msgstr "" #: ../../glossary.rst:519 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:522 msgid "file object" msgstr "file object" #: ../../glossary.rst:524 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 " "created, a file object can mediate access to a real on-disk file or to " "another type of storage or communication device (for example standard input/" "output, in-memory buffers, sockets, pipes, etc.). File objects are also " "called :dfn:`file-like objects` or :dfn:`streams`." msgstr "" #: ../../glossary.rst:532 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " "files `. Their interfaces are defined in the :mod:`io` module. " "The canonical way to create a file object is by using the :func:`open` " "function." msgstr "" "ファイルオブジェクトには実際には 3 種類あります: 生の :term:`バイナリーファイ" "ル `、バッファされた :term:`バイナリーファイル `、" "そして :term:`テキストファイル` です。インターフェイスは :mod:" "`io` モジュールで定義されています。ファイルオブジェクトを作る標準的な方法は :" "func:`open` 関数を使うことです。" #: ../../glossary.rst:537 msgid "file-like object" msgstr "file-like object" #: ../../glossary.rst:539 msgid "A synonym for :term:`file object`." msgstr ":term:`file object` と同義です。" #: ../../glossary.rst:540 msgid "filesystem encoding and error handler" msgstr "" #: ../../glossary.rst:542 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:545 msgid "" "The filesystem encoding must guarantee to successfully decode all bytes " "below 128. If the file system encoding fails to provide this guarantee, API " "functions can raise :exc:`UnicodeError`." msgstr "" "ファイルシステムのエンコーディングでは、すべてが 128 バイト以下に正常にデコー" "ドされることが保証されなくてはなりません。ファイルシステムのエンコーディング" "でこれが保証されなかった場合は、API 関数が :exc:`UnicodeError` を送出すること" "があります。" #: ../../glossary.rst:549 msgid "" "The :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors` functions can be used to get the filesystem " "encoding and error handler." msgstr "" #: ../../glossary.rst:553 msgid "" "The :term:`filesystem encoding and error handler` are configured at Python " "startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." "filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" "c:type:`PyConfig`." msgstr "" "term:`ファイルシステムのエンコーディングとエラーハンドラ ` は、Pythonの開始時に:c:func:`PyConfig_Read` 関数" "により設定されます。 :c:type:`PyConfig` のメンバー :c:member:`~PyConfig." "filesystem_encoding` と :c:member:`~PyConfig.filesystem_errors` を参照してく" "ださい。" #: ../../glossary.rst:558 msgid "See also the :term:`locale encoding`." msgstr "" #: ../../glossary.rst:559 msgid "finder" msgstr "finder" #: ../../glossary.rst:561 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." msgstr "" "(ファインダ)\n" "インポートされているモジュールの :term:`loader` の発見を試行するオブジェクト" "です。" #: ../../glossary.rst:564 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:568 msgid "" "See :ref:`finders-and-loaders` and :mod:`importlib` for much more detail." msgstr "" #: ../../glossary.rst:569 msgid "floor division" msgstr "floor division" #: ../../glossary.rst:571 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " "evaluates to ``2`` in contrast to the ``2.75`` returned by float true " "division. Note that ``(-11) // 4`` is ``-3`` because that is ``-2.75`` " "rounded *downward*. See :pep:`238`." msgstr "" "(切り捨て除算) 一番近い整数に切り捨てる数学的除算。\n" "切り捨て除算演算子は ``//`` です。\n" "例えば、 ``11 // 4`` は ``2`` になり、それとは対称に浮動小数点数の真の除算で" "は ``2.75`` が 返ってきます。\n" "``(-11) // 4`` は ``-2.75`` を *小さい方に* 丸める (訳注: 負の無限大への丸め" "を行う) ので ``-3`` になることに注意してください。\n" ":pep:`238` を参照してください。" #: ../../glossary.rst:576 msgid "free threading" msgstr "" #: ../../glossary.rst:578 msgid "" "A threading model where multiple threads can run Python bytecode " "simultaneously within the same interpreter. This is in contrast to the :" "term:`global interpreter lock` which allows only one thread to execute " "Python bytecode at a time. See :pep:`703`." msgstr "" #: ../../glossary.rst:582 msgid "free variable" msgstr "" #: ../../glossary.rst:584 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 " "variable in that namespace. See :term:`closure variable` for an example. " "Pragmatically, due to the name of the :attr:`codeobject.co_freevars` " "attribute, the term is also sometimes used as a synonym for :term:`closure " "variable`." msgstr "" #: ../../glossary.rst:589 msgid "function" msgstr "関数" #: ../../glossary.rst:591 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 " "execution of the body. See also :term:`parameter`, :term:`method`, and the :" "ref:`function` section." msgstr "" "(関数) 呼び出し側に値を返す一連の文のことです。関数には0以上の :term:`実引数 " "` を渡すことが出来ます。実体の実行時に引数を使用することが出来ま" "す。 :term:`仮引数 `、:term:`メソッド `、:ref:`function` " "を参照してください。" #: ../../glossary.rst:595 msgid "function annotation" msgstr "function annotation" #: ../../glossary.rst:597 msgid "An :term:`annotation` of a function parameter or return value." msgstr "" "(関数アノテーション) 関数のパラメータや返り値の :term:`annotation` です。" #: ../../glossary.rst:599 msgid "" "Function annotations are usually used for :term:`type hints `: " "for example, this function is expected to take two :class:`int` arguments " "and is also expected to have an :class:`int` return value::" msgstr "" "関数アノテーションは、通常は :term:`型ヒント ` のために使われま" "す: 例えば、この関数は 2 つの :class:`int` 型の引数を取ると期待され、また :" "class:`int` 型の返り値を持つと期待されています。" #: ../../glossary.rst:604 msgid "" "def sum_two_numbers(a: int, b: int) -> int:\n" " return a + b" msgstr "" #: ../../glossary.rst:607 msgid "Function annotation syntax is explained in section :ref:`function`." msgstr "関数アノテーションの文法は :ref:`function` の節で解説されています。" #: ../../glossary.rst:609 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality. Also see :ref:`annotations-howto` for best practices on " "working with annotations." msgstr "" "機能の説明がある :term:`variable annotation`, :pep:`484`,を参照してください。" "また、アノテーションを利用するベストプラクティスとして :ref:`annotations-" "howto` も参照してください。" #: ../../glossary.rst:613 msgid "__future__" msgstr "__future__" #: ../../glossary.rst:615 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " "that will become standard in a future release of Python. The :mod:" "`__future__` module documents the possible values of *feature*. By " "importing this module and evaluating its variables, you can see when a new " "feature was first added to the language and when it will (or did) become the " "default::" msgstr "" "``from __future__ import `` という :ref:`future 文 ` は、コ" "ンパイラーに将来の Python リリースで標準となる構文や意味を使用して現在のモ" "ジュールをコンパイルするよう指示します。 :mod:`__future__` モジュールでは、 " "*feature* のとりうる値をドキュメント化しています。このモジュールをインポート" "し、その変数を評価することで、新機能が最初に言語に追加されたのはいつかや、い" "つデフォルトになるか (またはなったか) を見ることができます::" #: ../../glossary.rst:623 msgid "" ">>> import __future__\n" ">>> __future__.division\n" "_Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)" msgstr "" #: ../../glossary.rst:626 msgid "garbage collection" msgstr "garbage collection" #: ../../glossary.rst:628 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " "that is able to detect and break reference cycles. The garbage collector " "can be controlled using the :mod:`gc` module." msgstr "" "(ガベージコレクション) これ以降使われることのないメモリを解放する処理です。\n" "Pythonは、参照カウントと、循環参照を検出し破壊する循環ガベージコレクタを使っ" "てガベージコレクションを行います。\n" "ガベージコレクタは :mod:`gc` モジュールを使って操作できます。" #: ../../glossary.rst:633 ../../glossary.rst:634 msgid "generator" msgstr "ジェネレータ" #: ../../glossary.rst:636 msgid "" "A function which returns a :term:`generator iterator`. It looks like a " "normal function except that it contains :keyword:`yield` expressions for " "producing a series of values usable in a for-loop or that can be retrieved " "one at a time with the :func:`next` function." msgstr "" "(ジェネレータ)\n" ":term:`generator iterator` を返す関数です。\n" "通常の関数に似ていますが、 :keyword:`yield` 式を持つ点で異なります。\n" ":keyword:`yield` 式は、 for ループで使用できたり、:func:`next` 関数で値を 1 " "つずつ取り出したりできる、値の並びを生成するのに使用されます。" #: ../../glossary.rst:641 msgid "" "Usually refers to a generator function, but may refer to a *generator " "iterator* in some contexts. In cases where the intended meaning isn't " "clear, using the full terms avoids ambiguity." msgstr "" "通常はジェネレータ関数を指しますが、文脈によっては *ジェネレータイテレータ* " "を指す場合があります。\n" "意図された意味が明らかでない場合、 明瞭化のために完全な単語を使用します。" #: ../../glossary.rst:644 msgid "generator iterator" msgstr "generator iterator" #: ../../glossary.rst:646 msgid "An object created by a :term:`generator` function." msgstr "" "(ジェネレータイテレータ)\n" ":term:`generator` 関数で生成されるオブジェクトです。" #: ../../glossary.rst:648 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "execution state (including local variables and pending try-statements). " "When the *generator iterator* resumes, it picks up where it left off (in " "contrast to functions which start fresh on every invocation)." msgstr "" #: ../../glossary.rst:654 ../../glossary.rst:655 msgid "generator expression" msgstr "generator expression" #: ../../glossary.rst:657 msgid "" "An :term:`expression` that returns an :term:`iterator`. It looks like a " "normal expression followed by a :keyword:`!for` clause defining a loop " "variable, range, and an optional :keyword:`!if` clause. The combined " "expression generates values for an enclosing function::" msgstr "" #: ../../glossary.rst:662 msgid "" ">>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81\n" "285" msgstr "" #: ../../glossary.rst:664 msgid "generic function" msgstr "generic function" #: ../../glossary.rst:666 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " "determined by the dispatch algorithm." msgstr "" "(ジェネリック関数) 異なる型に対し同じ操作をする関数群から構成される関数です。" "呼び出し時にどの実装を用いるかはディスパッチアルゴリズムにより決定されます。" #: ../../glossary.rst:670 msgid "" "See also the :term:`single dispatch` glossary entry, the :func:`functools." "singledispatch` decorator, and :pep:`443`." msgstr "" ":term:`single dispatch`、:func:`functools.singledispatch` デコレータ、:pep:" "`443` を参照してください。" #: ../../glossary.rst:672 msgid "generic type" msgstr "" #: ../../glossary.rst:674 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:679 msgid "" "For more details, see :ref:`generic alias types`, :pep:" "`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." msgstr "" #: ../../glossary.rst:681 msgid "GIL" msgstr "GIL" #: ../../glossary.rst:683 msgid "See :term:`global interpreter lock`." msgstr ":term:`global interpreter lock` を参照してください。" #: ../../glossary.rst:684 msgid "global interpreter lock" msgstr "global interpreter lock" #: ../../glossary.rst:686 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 " "CPython implementation by making the object model (including critical built-" "in types such as :class:`dict`) implicitly safe against concurrent access. " "Locking the entire interpreter makes it easier for the interpreter to be " "multi-threaded, at the expense of much of the parallelism afforded by multi-" "processor machines." msgstr "" "(グローバルインタプリタロック) :term:`CPython` インタプリタが利用している、一" "度に Python の :term:`バイトコード ` を実行するスレッドは一つだけで" "あることを保証する仕組みです。これにより (:class:`dict` などの重要な組み込み" "型を含む) オブジェクトモデルが同時アクセスに対して暗黙的に安全になるので、 " "CPython の実装がシンプルになります。インタプリタ全体をロックすることで、マル" "チプロセッサマシンが生じる並列化のコストと引き換えに、インタプリタを簡単にマ" "ルチスレッド化できるようになります。" #: ../../glossary.rst:695 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally intensive tasks " "such as compression or hashing. Also, the GIL is always released when doing " "I/O." msgstr "" "ただし、標準あるいは外部のいくつかの拡張モジュールは、圧縮やハッシュ計算など" "の計算の重い処理をするときに GIL を解除するように設計されています。また、I/O " "処理をする場合 GIL は常に解除されます。" #: ../../glossary.rst:700 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 " "run with :option:`-X gil=0 <-X>` or after setting the :envvar:`PYTHON_GIL=0 " "` environment variable. This feature enables improved " "performance for multi-threaded applications and makes it easier to use multi-" "core CPUs efficiently. For more details, see :pep:`703`." msgstr "" #: ../../glossary.rst:707 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:710 msgid "global state" msgstr "" #: ../../glossary.rst:712 msgid "" "Data that is accessible throughout a program, such as module-level " "variables, class variables, or C static variables in :term:`extension " "modules `. In multi-threaded programs, global state " "shared between threads typically requires synchronization to avoid :term:" "`race conditions ` and :term:`data races `." msgstr "" #: ../../glossary.rst:718 msgid "hash-based pyc" msgstr "hash-based pyc" #: ../../glossary.rst:720 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-" "invalidation`." msgstr "" "(ハッシュベース pyc ファイル) 正当性を判別するために、対応するソースファイル" "の最終更新時刻ではなくハッシュ値を使用するバイトコードのキャッシュファイルで" "す。:ref:`pyc-invalidation` を参照してください。" #: ../../glossary.rst:723 msgid "hashable" msgstr "hashable" #: ../../glossary.rst:725 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 " "compared to other objects (it needs an :meth:`~object.__eq__` method). " "Hashable objects which compare equal must have the same hash value." msgstr "" #: ../../glossary.rst:731 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." msgstr "" "ハッシュ可能なオブジェクトは辞書のキーや集合のメンバーとして使えます。辞書や" "集合のデータ構造は内部でハッシュ値を使っているからです。" #: ../../glossary.rst:734 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " "tuples and frozensets) are only hashable if their elements are hashable. " "Objects which are instances of user-defined classes are hashable by " "default. They all compare unequal (except with themselves), and their hash " "value is derived from their :func:`id`." msgstr "" "Python のイミュータブルな組み込みオブジェクトは、ほとんどがハッシュ可能です。" "(リストや辞書のような) ミュータブルなコンテナはハッシュ不可能です。(タプルや " "frozenset のような) イミュータブルなコンテナは、要素がハッシュ可能であるとき" "のみハッシュ可能です。\n" "ユーザー定義のクラスのインスタンスであるようなオブジェクトはデフォルトでハッ" "シュ可能です。\n" "それらは全て (自身を除いて) 比較結果は非等価であり、ハッシュ値は :func:`id` " "より得られます。" #: ../../glossary.rst:741 msgid "IDLE" msgstr "IDLE" #: ../../glossary.rst:743 msgid "" "An Integrated Development and Learning Environment for Python. :ref:`idle` " "is a basic editor and interpreter environment which ships with the standard " "distribution of Python." msgstr "" "Python の統合開発環境 (Integrated DeveLopment Environment)及び学習環境 " "(Learning Environment) です。:ref:`idle` は Python の標準的な配布に同梱されて" "いる基本的な機能のエディタとインタプリタ環境です。" #: ../../glossary.rst:746 msgid "immortal" msgstr "永続オブジェクト (immortal)" #: ../../glossary.rst:748 msgid "" "*Immortal objects* are a CPython implementation detail introduced in :pep:" "`683`." msgstr "" #: ../../glossary.rst:751 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:755 msgid "" "Immortal objects can be identified via :func:`sys._is_immortal`, or via :c:" "func:`PyUnstable_IsImmortal` in the C API." msgstr "" #: ../../glossary.rst:757 msgid "immutable" msgstr "immutable" #: ../../glossary.rst:759 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 " "created if a different value has to be stored. They play an important role " "in places where a constant hash value is needed, for example as a key in a " "dictionary. Immutable objects are inherently :term:`thread-safe` because " "their state cannot be modified after creation, eliminating concerns about " "improperly synchronized :term:`concurrent modification`." msgstr "" #: ../../glossary.rst:766 msgid "import path" msgstr "import path" #: ../../glossary.rst:768 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 " "list of locations usually comes from :data:`sys.path`, but for subpackages " "it may also come from the parent package's ``__path__`` attribute." msgstr "" ":term:`path based finder` が import するモジュールを検索する場所 (または :" "term:`path entry`) のリスト。 import 中、このリストは通常 :data:`sys.path` か" "ら来ますが、サブパッケージの場合は親パッケージの ``__path__`` 属性からも来ま" "す。" #: ../../glossary.rst:773 msgid "importing" msgstr "importing" #: ../../glossary.rst:775 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." msgstr "" "あるモジュールの Python コードが別のモジュールの Python コードで使えるように" "する処理です。" #: ../../glossary.rst:777 msgid "importer" msgstr "importer" #: ../../glossary.rst:779 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." msgstr "" "モジュールを探してロードするオブジェクト。 :term:`finder` と :term:`loader` " "のどちらでもあるオブジェクト。" #: ../../glossary.rst:781 msgid "interactive" msgstr "interactive" #: ../../glossary.rst:783 msgid "" "Python has an interactive interpreter which means you can enter statements " "and expressions at the interpreter prompt, immediately execute them and see " "their results. Just launch ``python`` with no arguments (possibly by " "selecting it from your computer's main menu). It is a very powerful way to " "test out new ideas or inspect modules and packages (remember ``help(x)``). " "For more on interactive mode, see :ref:`tut-interac`." msgstr "" #: ../../glossary.rst:790 msgid "interpreted" msgstr "interpreted" #: ../../glossary.rst:792 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. " "This means that source files can be run directly without explicitly creating " "an executable which is then run. Interpreted languages typically have a " "shorter development/debug cycle than compiled ones, though their programs " "generally also run more slowly. See also :term:`interactive`." msgstr "" "Python はインタプリタ形式の言語であり、コンパイラ言語の対極に位置します。 (バ" "イトコードコンパイラがあるために、この区別は曖昧ですが。) ここでのインタプリ" "タ言語とは、ソースコードのファイルを、まず実行可能形式にしてから実行させると" "いった操作なしに、直接実行できることを意味します。インタプリタ形式の言語は通" "常、コンパイラ形式の言語よりも開発/デバッグのサイクルは短いものの、プログラ" "ムの実行は一般に遅いです。 :term:`対話的 ` も参照してください。" #: ../../glossary.rst:799 msgid "interpreter shutdown" msgstr "interpreter shutdown" #: ../../glossary.rst:801 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 " "critical internal structures. It also makes several calls to the :term:" "`garbage collector `. This can trigger the execution of " "code in user-defined destructors or weakref callbacks. Code executed during " "the shutdown phase can encounter various exceptions as the resources it " "relies on may not function anymore (common examples are library modules or " "the warnings machinery)." msgstr "" "Python インタープリターはシャットダウンを要請された時に、モジュールやすべての" "クリティカルな内部構造をなどの、すべての確保したリソースを段階的に開放する、" "特別なフェーズに入ります。\n" "このフェーズは :term:`ガベージコレクタ ` を複数回呼び出し" "ます。\n" "これによりユーザー定義のデストラクターや weakref コールバックが呼び出されるこ" "とがあります。\n" "シャットダウンフェーズ中に実行されるコードは、それが依存するリソースがすでに" "機能しない(よくある例はライブラリーモジュールや warning 機構です) ために様々" "な例外に直面します。" #: ../../glossary.rst:810 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." msgstr "" "インタープリタがシャットダウンする主な理由は ``__main__`` モジュールや実行さ" "れていたスクリプトの実行が終了したことです。" #: ../../glossary.rst:812 msgid "iterable" msgstr "iterable" #: ../../glossary.rst:814 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`, " "and :class:`tuple`) and some non-sequence types like :class:`dict`, :term:" "`file objects `, and objects of any classes you define with an :" "meth:`~object.__iter__` method or with a :meth:`~object.__getitem__` method " "that implements :term:`sequence` semantics." msgstr "" #: ../../glossary.rst:822 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 " "iterable object is passed as an argument to the built-in function :func:" "`iter`, it returns an iterator for the object. This iterator is good for " "one pass over the set of values. When using iterables, it is usually not " "necessary to call :func:`iter` or deal with iterator objects yourself. The :" "keyword:`for` statement does that automatically for you, creating a " "temporary unnamed variable to hold the iterator for the duration of the " "loop. See also :term:`iterator`, :term:`sequence`, and :term:`generator`." msgstr "" #: ../../glossary.rst:832 msgid "iterator" msgstr "iterator" #: ../../glossary.rst:834 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:849 msgid "More information can be found in :ref:`typeiter`." msgstr "詳細な情報は :ref:`typeiter` にあります。" #: ../../glossary.rst:853 msgid "" "CPython does not consistently apply the requirement that an iterator define :" "meth:`~iterator.__iter__`. And also please note that :term:`free-threaded " "` CPython does not guarantee :term:`thread-safe` behavior of " "iterator operations." msgstr "" #: ../../glossary.rst:859 msgid "key function" msgstr "key function" #: ../../glossary.rst:861 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 " "produce a sort key that is aware of locale specific sort conventions." msgstr "" "(キー関数) キー関数、あるいは照合関数とは、ソートや順序比較のための値を返す呼" "び出し可能オブジェクト(callable)です。例えば、 :func:`locale.strxfrm` をキー" "関数に使えば、ロケール依存のソートの慣習にのっとったソートキーを返します。" #: ../../glossary.rst:866 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`, :" "meth:`list.sort`, :func:`heapq.merge`, :func:`heapq.nsmallest`, :func:`heapq." "nlargest`, and :func:`itertools.groupby`." msgstr "" "Python の多くのツールはキー関数を受け取り要素の並び順やグループ化を管理しま" "す。\n" ":func:`min`, :func:`max`, :func:`sorted`, :meth:`list.sort`, :func:`heapq." "merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest`, :func:`itertools." "groupby` 等があります。" #: ../../glossary.rst:872 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 " "sorts. Alternatively, a key function can be built from a :keyword:`lambda` " "expression such as ``lambda r: (r[0], r[2])``. Also, :func:`operator." "attrgetter`, :func:`operator.itemgetter`, and :func:`operator.methodcaller` " "are three key function constructors. See the :ref:`Sorting HOW TO " "` for examples of how to create and use key functions." msgstr "" #: ../../glossary.rst:879 msgid "keyword argument" msgstr "keyword argument" #: ../../glossary.rst:881 ../../glossary.rst:1248 msgid "See :term:`argument`." msgstr ":term:`実引数 ` を参照してください。" #: ../../glossary.rst:882 msgid "lambda" msgstr "lambda" #: ../../glossary.rst:884 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 " "function is ``lambda [parameters]: expression``" msgstr "" "(ラムダ) 無名のインライン関数で、関数が呼び出されたときに評価される 1 つの :" "term:`式 ` を含みます。ラムダ関数を作る構文は ``lambda " "[parameters]: expression`` です。" #: ../../glossary.rst:887 msgid "LBYL" msgstr "LBYL" #: ../../glossary.rst:889 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` " "approach and is characterized by the presence of many :keyword:`if` " "statements." msgstr "" "「ころばぬ先の杖 (look before you leap)」 の略です。このコーディングスタイル" "では、呼び出しや検索を行う前に、明示的に前提条件 (pre-condition) 判定を行いま" "す。 :term:`EAFP` アプローチと対照的で、 :keyword:`if` 文がたくさん使われるの" "が特徴的です。" #: ../../glossary.rst:894 msgid "" "In a multi-threaded environment, the LBYL approach can risk introducing a :" "term:`race condition` between \"the looking\" and \"the leaping\". For " "example, the code, ``if key in mapping: return mapping[key]`` can fail if " "another thread removes *key* from *mapping* after the test, but before the " "lookup. This issue can be solved with :term:`locks ` or by using the :" "term:`EAFP` approach. See also :term:`thread-safe`." msgstr "" #: ../../glossary.rst:900 msgid "lexical analyzer" msgstr "" #: ../../glossary.rst:903 msgid "Formal name for the *tokenizer*; see :term:`token`." msgstr "" #: ../../glossary.rst:904 msgid "list" msgstr "list" #: ../../glossary.rst:906 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)." msgstr "" #: ../../glossary.rst:909 msgid "list comprehension" msgstr "list comprehension" #: ../../glossary.rst:911 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 " "range(256) if x % 2 == 0]`` generates a list of strings containing even hex " "numbers (0x..) in the range from 0 to 255. The :keyword:`if` clause is " "optional. If omitted, all elements in ``range(256)`` are processed." msgstr "" "(リスト内包表記) シーケンス中の全てあるいは一部の要素を処理して、その結果から" "なるリストを返す、コンパクトな方法です。 ``result = ['{:#04x}'.format(x) for " "x in range(256) if x % 2 == 0]`` とすると、 0 から 255 までの偶数を 16進数表" "記 (0x..) した文字列からなるリストを生成します。 :keyword:`if` 節はオプション" "です。 :keyword:`if` 節がない場合、 ``range(256)`` の全ての要素が処理されま" "す。" #: ../../glossary.rst:917 msgid "lock" msgstr "" #: ../../glossary.rst:919 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 " "protected resource and release it afterward. If a thread attempts to " "acquire a lock that is already held by another thread, it will block until " "the lock becomes available. Python's :mod:`threading` module provides :" "class:`~threading.Lock` (a basic lock) and :class:`~threading.RLock` (a :" "term:`reentrant` lock). Locks are used to prevent :term:`race conditions " "` and ensure :term:`thread-safe` access to shared data. " "Alternative design patterns to locks exist such as queues, producer/consumer " "patterns, and thread-local state. See also :term:`deadlock`, and :term:" "`reentrant`." msgstr "" #: ../../glossary.rst:930 msgid "loader" msgstr "loader" #: ../../glossary.rst:932 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." "Loader` interface. A loader is typically returned by a :term:`finder`. See " "also:" msgstr "" #: ../../glossary.rst:938 msgid ":ref:`finders-and-loaders`" msgstr "" #: ../../glossary.rst:939 msgid ":class:`importlib.abc.Loader`" msgstr "" #: ../../glossary.rst:940 msgid ":pep:`302`" msgstr ":pep:`302`" #: ../../glossary.rst:941 msgid "locale encoding" msgstr "ロケールエンコーディング" #: ../../glossary.rst:943 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:946 msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." msgstr "" #: ../../glossary.rst:948 msgid "" "On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." msgstr "" #: ../../glossary.rst:950 msgid ":func:`locale.getencoding` can be used to get the locale encoding." msgstr "" #: ../../glossary.rst:952 msgid "See also the :term:`filesystem encoding and error handler`." msgstr "" #: ../../glossary.rst:953 msgid "magic method" msgstr "magic method" #: ../../glossary.rst:957 msgid "An informal synonym for :term:`special method`." msgstr ":term:`special method` のくだけた同義語です。" #: ../../glossary.rst:958 msgid "mapping" msgstr "mapping" #: ../../glossary.rst:960 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`collections.abc.Mapping` or :class:" "`collections.abc.MutableMapping` :ref:`abstract base classes `. Examples include :class:`dict`, :class:" "`collections.defaultdict`, :class:`collections.OrderedDict` and :class:" "`collections.Counter`." msgstr "" "(マッピング) 任意のキー探索をサポートしていて、 :class:`collections.abc." "Mapping` か :class:`collections.abc.MutableMapping` の :ref:`抽象基底クラス " "` で指定されたメソッドを実装しているコンテ" "ナオブジェクトです。例えば、 :class:`dict`, :class:`collections." "defaultdict`, :class:`collections.OrderedDict`, :class:`collections.Counter` " "などです。" #: ../../glossary.rst:966 msgid "meta path finder" msgstr "meta path finder" #: ../../glossary.rst:968 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 `." msgstr "" ":data:`sys.meta_path` を検索して得られた :term:`finder`.\n" "meta path finder は :term:`path entry finder` と関係はありますが、別物です。" #: ../../glossary.rst:972 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." msgstr "" "meta path finder が実装するメソッドについては :class:`importlib.abc." "MetaPathFinder` を参照してください。" #: ../../glossary.rst:974 msgid "metaclass" msgstr "metaclass" #: ../../glossary.rst:976 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " "taking those three arguments and creating the class. Most object oriented " "programming languages provide a default implementation. What makes Python " "special is that it is possible to create custom metaclasses. Most users " "never need this tool, but when the need arises, metaclasses can provide " "powerful, elegant solutions. They have been used for logging attribute " "access, adding thread-safety, tracking object creation, implementing " "singletons, and many other tasks." msgstr "" "(メタクラス) クラスのクラスです。クラス定義は、クラス名、クラスの辞書と、基底" "クラスのリストを作ります。メタクラスは、それら 3 つを引数として受け取り、クラ" "スを作る責任を負います。ほとんどのオブジェクト指向言語は(訳注:メタクラスの)デ" "フォルトの実装を提供しています。Python が特別なのはカスタムのメタクラスを作成" "できる点です。ほとんどのユーザーに取って、メタクラスは全く必要のないもので" "す。しかし、一部の場面では、メタクラスは強力でエレガントな方法を提供します。" "たとえば属性アクセスのログを取ったり、スレッドセーフ性を追加したり、オブジェ" "クトの生成を追跡したり、シングルトンを実装するなど、多くの場面で利用されま" "す。" #: ../../glossary.rst:986 msgid "More information can be found in :ref:`metaclasses`." msgstr "詳細は :ref:`metaclasses` を参照してください。" #: ../../glossary.rst:955 ../../glossary.rst:987 ../../glossary.rst:1430 msgid "method" msgstr "メソッド" #: ../../glossary.rst:989 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " "first :term:`argument` (which is usually called ``self``). See :term:" "`function` and :term:`nested scope`." msgstr "" "(メソッド) クラス本体の中で定義された関数。そのクラスのインスタンスの属性とし" "て呼び出された場合、メソッドはインスタンスオブジェクトを第一 :term:`引数 " "` として受け取ります (この第一引数は通常 ``self`` と呼ばれます)。 :" "term:`関数 ` と :term:`ネストされたスコープ ` も参照" "してください。" #: ../../glossary.rst:993 msgid "method resolution order" msgstr "method resolution order" #: ../../glossary.rst:995 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:998 msgid "module" msgstr "module" #: ../../glossary.rst:1000 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " "into Python by the process of :term:`importing`." msgstr "" "(モジュール) Python コードの組織単位としてはたらくオブジェクトです。モジュー" "ルは任意の Python オブジェクトを含む名前空間を持ちます。モジュールは :term:" "`importing` の処理によって Python に読み込まれます。" #: ../../glossary.rst:1004 msgid "See also :term:`package`." msgstr ":term:`パッケージ ` を参照してください。" #: ../../glossary.rst:1005 msgid "module spec" msgstr "module spec" #: ../../glossary.rst:1007 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." msgstr "" "モジュールをロードするのに使われるインポート関連の情報を含む名前空間です。\n" ":class:`importlib.machinery.ModuleSpec` のインスタンスです。" #: ../../glossary.rst:1010 msgid "See also :ref:`module-specs`." msgstr "" #: ../../glossary.rst:1011 msgid "MRO" msgstr "MRO" #: ../../glossary.rst:1013 msgid "See :term:`method resolution order`." msgstr ":term:`method resolution order` を参照してください。" #: ../../glossary.rst:1014 msgid "mutable" msgstr "mutable" #: ../../glossary.rst:1016 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 " "between threads require careful synchronization to avoid :term:`race " "conditions `. See also :term:`immutable`, :term:`thread-" "safe`, and :term:`concurrent modification`." msgstr "" #: ../../glossary.rst:1021 msgid "named tuple" msgstr "named tuple" #: ../../glossary.rst:1023 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " "attributes. The type or class may have other features as well." msgstr "" "\"名前付きタプル\" という用語は、タプルを継承していて、インデックスが付く要素" "に対し属性を使ってのアクセスもできる任意の型やクラスに応用されています。\n" "その型やクラスは他の機能も持っていることもあります。" #: ../../glossary.rst:1027 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." "float_info`::" msgstr "" ":func:`time.localtime` や :func:`os.stat` の返り値を含むいくつかの組み込み型" "は名前付きタプルです。\n" "他の例は :data:`sys.float_info` です::" #: ../../glossary.rst:1031 msgid "" ">>> sys.float_info[1] # indexed access\n" "1024\n" ">>> sys.float_info.max_exp # named field access\n" "1024\n" ">>> isinstance(sys.float_info, tuple) # kind of tuple\n" "True" msgstr "" #: ../../glossary.rst:1038 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 " "that inherits from :class:`tuple` and that defines named fields. Such a " "class can be written by hand, or it can be created by inheriting :class:" "`typing.NamedTuple`, or with the factory function :func:`collections." "namedtuple`. The latter techniques also add some extra methods that may not " "be found in hand-written or built-in named tuples." msgstr "" #: ../../glossary.rst:1046 msgid "namespace" msgstr "namespace" #: ../../glossary.rst:1048 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " "as nested namespaces in objects (in methods). Namespaces support modularity " "by preventing naming conflicts. For instance, the functions :func:`builtins." "open <.open>` and :func:`os.open` are distinguished by their namespaces. " "Namespaces also aid readability and maintainability by making it clear which " "module implements a function. For instance, writing :func:`random.seed` or :" "func:`itertools.islice` makes it clear that those functions are implemented " "by the :mod:`random` and :mod:`itertools` modules, respectively." msgstr "" "(名前空間) 変数が格納される場所です。名前空間は辞書として実装されます。名前空" "間にはオブジェクトの (メソッドの) 入れ子になったものだけでなく、局所的なも" "の、大域的なもの、そして組み込みのものがあります。名前空間は名前の衝突を防ぐ" "ことによってモジュール性をサポートする。例えば関数 :func:`builtins.open <." "open>` と :func:`os.open` は名前空間で区別されています。また、どのモジュール" "が関数を実装しているか明示することによって名前空間は可読性と保守性を支援しま" "す。例えば、:func:`random.seed` や :func:`itertools.islice` と書くと、それぞ" "れモジュール :mod:`random` や :mod:`itertools` で実装されていることが明らかで" "す。" #: ../../glossary.rst:1058 msgid "namespace package" msgstr "namespace package" #: ../../glossary.rst:1060 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:1065 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:1068 msgid "" "For more information, see :pep:`420` and :ref:`reference-namespace-package`." msgstr "" #: ../../glossary.rst:1070 msgid "See also :term:`module`." msgstr ":term:`module` を参照してください。" #: ../../glossary.rst:1071 msgid "native code" msgstr "" #: ../../glossary.rst:1073 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 " "machine. In the context of Python, native code typically refers to C, C++, " "Rust or Fortran code in :term:`extension modules ` that " "can be called from Python. See also :term:`extension module`." msgstr "" #: ../../glossary.rst:1078 msgid "nested scope" msgstr "nested scope" #: ../../glossary.rst:1080 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " "in the outer function. Note that nested scopes by default work only for " "reference and not for assignment. Local variables both read and write in " "the innermost scope. Likewise, global variables read and write to the " "global namespace. The :keyword:`nonlocal` allows writing to outer scopes." msgstr "" "(ネストされたスコープ) 外側で定義されている変数を参照する機能です。例えば、あ" "る関数が別の関数の中で定義されている場合、内側の関数は外側の関数中の変数を参" "照できます。ネストされたスコープはデフォルトでは変数の参照だけができ、変数の" "代入はできないので注意してください。ローカル変数は、最も内側のスコープで変数" "を読み書きします。同様に、グローバル変数を使うとグローバル名前空間の値を読み" "書きします。 :keyword:`nonlocal` で外側の変数に書き込めます。" #: ../../glossary.rst:1087 msgid "new-style class" msgstr "new-style class" #: ../../glossary.rst:1089 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, " "versatile features like :attr:`~object.__slots__`, descriptors, properties, :" "meth:`~object.__getattribute__`, class methods, and static methods." msgstr "" #: ../../glossary.rst:1094 msgid "non-deterministic" msgstr "" #: ../../glossary.rst:1096 msgid "" "Behavior where the outcome of a program can vary between executions with the " "same inputs. In multi-threaded programs, non-deterministic behavior often " "results from :term:`race conditions ` where the relative " "timing or interleaving of threads affects the result. Proper synchronization " "using :term:`locks ` and other :term:`synchronization primitives " "` helps ensure deterministic behavior." msgstr "" #: ../../glossary.rst:1103 msgid "object" msgstr "object" #: ../../glossary.rst:1105 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." msgstr "" "(オブジェクト) 状態 (属性や値) と定義された振る舞い (メソッド) をもつ全ての" "データ。もしくは、全ての :term:`新スタイルクラス ` の究極の" "基底クラスのこと。" #: ../../glossary.rst:1108 msgid "optimized scope" msgstr "" #: ../../glossary.rst:1110 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 " "these names. The local namespaces for functions, generators, coroutines, " "comprehensions, and generator expressions are optimized in this fashion. " "Note: most interpreter optimizations are applied to all scopes, only those " "relying on a known set of local and nonlocal variable names are restricted " "to optimized scopes." msgstr "" #: ../../glossary.rst:1117 msgid "optional module" msgstr "" #: ../../glossary.rst:1119 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 " "third-party libraries or because the module is not available for a given " "platform." msgstr "" #: ../../glossary.rst:1124 msgid "" "See :ref:`optional-module-requirements` for a list of optional modules that " "require third-party libraries." msgstr "" #: ../../glossary.rst:1126 msgid "package" msgstr "package" #: ../../glossary.rst:1128 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with a ``__path__`` " "attribute." msgstr "" "(パッケージ) サブモジュールや再帰的にサブパッケージを含むことの出来る :term:" "`module` のことです。専門的には、パッケージは ``__path__`` 属性を持つ Python " "オブジェクトです。" #: ../../glossary.rst:1132 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "" ":term:`regular package` と :term:`namespace package` を参照してください。" #: ../../glossary.rst:1133 msgid "parallelism" msgstr "" #: ../../glossary.rst:1135 msgid "" "Executing multiple operations at the same time (e.g. on multiple CPU " "cores). In Python builds with the :term:`global interpreter lock (GIL) " "`, only one thread runs Python bytecode at a time, " "so taking advantage of multiple CPU cores typically involves multiple " "processes (e.g. :mod:`multiprocessing`) or native extensions that release " "the GIL. In :term:`free-threaded ` Python, multiple Python " "threads can run Python code simultaneously on different cores." msgstr "" #: ../../glossary.rst:1143 msgid "parameter" msgstr "parameter" #: ../../glossary.rst:1145 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 " "accept. There are five kinds of parameter:" msgstr "" "(仮引数) 名前付の実体で :term:`関数 ` (や :term:`メソッド " "` ) の定義において関数が受ける :term:`実引数 ` を指定しま" "す。仮引数には5種類あります:" #: ../../glossary.rst:1149 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " "`. This is the default kind of parameter, for example *foo* and " "*bar* in the following::" msgstr "" ":dfn:`位置またはキーワード`: :term:`位置 ` であるいは :term:`キー" "ワード引数 ` として渡すことができる引数を指定します。\n" "これはたとえば以下の *foo* や *bar* のように、デフォルトの仮引数の種類です::" #: ../../glossary.rst:1154 msgid "def func(foo, bar=None): ..." msgstr "def func(foo, bar=None): ..." #: ../../glossary.rst:1158 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " "character in the parameter list of the function definition after them, for " "example *posonly1* and *posonly2* in the following::" msgstr "" ":dfn:`位置専用`: 位置によってのみ与えられる引数を指定します。位置専用の引数は" "関数定義の引数のリストの中でそれらの後ろに ``/`` を含めることで定義できます。" "例えば下記の *posonly1* と *posonly2* は位置専用引数になります:: " #: ../../glossary.rst:1163 msgid "def func(posonly1, posonly2, /, positional_or_keyword): ..." msgstr "def func(posonly1, posonly2, /, positional_or_keyword): ..." #: ../../glossary.rst:1167 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-" "positional parameter or bare ``*`` in the parameter list of the function " "definition before them, for example *kw_only1* and *kw_only2* in the " "following::" msgstr "" ":dfn:`キーワード専用`: キーワードによってのみ与えられる引数を指定します。キー" "ワード専用の引数を定義できる場所は、例えば以下の *kw_only1* や *kw_only2* の" "ように、関数定義の仮引数リストに含めた可変長位置引数または裸の ``*`` の後で" "す::" #: ../../glossary.rst:1173 msgid "def func(arg, *, kw_only1, kw_only2): ..." msgstr "" #: ../../glossary.rst:1175 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " "accepted by other parameters). Such a parameter can be defined by " "prepending the parameter name with ``*``, for example *args* in the " "following::" msgstr "" ":dfn:`可変長位置`: (他の仮引数で既に受けられた任意の位置引数に加えて) 任意の" "個数の位置引数が与えられることを指定します。このような仮引数は、以下の " "*args* のように仮引数名の前に ``*`` をつけることで定義できます::" #: ../../glossary.rst:1181 msgid "def func(*args, **kwargs): ..." msgstr "" #: ../../glossary.rst:1183 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " "parameters). Such a parameter can be defined by prepending the parameter " "name with ``**``, for example *kwargs* in the example above." msgstr "" ":dfn:`可変長キーワード`: (他の仮引数で既に受けられた任意のキーワード引数に加" "えて) 任意の個数のキーワード引数が与えられることを指定します。このような仮引" "数は、上の例の *kwargs* のように仮引数名の前に ``**`` をつけることで定義でき" "ます。" #: ../../glossary.rst:1189 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." msgstr "" "仮引数はオプションと必須の引数のどちらも指定でき、オプションの引数にはデフォ" "ルト値も指定できます。" #: ../../glossary.rst:1192 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " "the :class:`inspect.Parameter` class, the :ref:`function` section, and :pep:" "`362`." msgstr "" ":term:`仮引数 ` 、FAQ の :ref:`実引数と仮引数の違いは何ですか? " "` 、:class:`inspect.Parameter` クラス、 :ref:" "`function` セクション、:pep:`362` を参照してください。" #: ../../glossary.rst:1196 msgid "path entry" msgstr "path entry" #: ../../glossary.rst:1198 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." msgstr "" ":term:`path based finder` が import するモジュールを探す :term:`import path` " "上の1つの場所です。" #: ../../glossary.rst:1200 msgid "path entry finder" msgstr "path entry finder" #: ../../glossary.rst:1202 msgid "" "A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" "term:`path entry hook`) which knows how to locate modules given a :term:" "`path entry`." msgstr "" ":data:`sys.path_hooks` にある callable (つまり :term:`path entry hook`) が返" "した :term:`finder` です。与えられた :term:`path entry` にあるモジュールを見" "つける方法を知っています。" #: ../../glossary.rst:1206 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." msgstr "" "パスエントリーファインダが実装するメソッドについては :class:`importlib.abc." "PathEntryFinder` を参照してください。" #: ../../glossary.rst:1208 msgid "path entry hook" msgstr "path entry hook" #: ../../glossary.rst:1210 msgid "" "A callable on the :data:`sys.path_hooks` list which returns a :term:`path " "entry finder` if it knows how to find modules on a specific :term:`path " "entry`." msgstr "" #: ../../glossary.rst:1213 msgid "path based finder" msgstr "path based finder" #: ../../glossary.rst:1215 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." msgstr "" "デフォルトの :term:`meta path finder` の1つは、モジュールの :term:`import " "path` を検索します。" #: ../../glossary.rst:1217 msgid "path-like object" msgstr "path-like object" #: ../../glossary.rst:1219 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 " "implementing the :class:`os.PathLike` protocol. An object that supports the :" "class:`os.PathLike` protocol can be converted to a :class:`str` or :class:" "`bytes` file system path by calling the :func:`os.fspath` function; :func:" "`os.fsdecode` and :func:`os.fsencode` can be used to guarantee a :class:" "`str` or :class:`bytes` result instead, respectively. Introduced by :pep:" "`519`." msgstr "" "(path-like オブジェクト) ファイルシステムパスを表します。\n" "path-like オブジェクトは、パスを表す :class:`str` オブジェクトや :class:" "`bytes` オブジェクト、または :class:`os.PathLike` プロトコルを実装したオブ" "ジェクトのどれかです。\n" ":class:`os.PathLike` プロトコルをサポートしているオブジェクトは :func:`os." "fspath` を呼び出すことで :class:`str` または :class:`bytes` のファイルシステ" "ムパスに変換できます。 :func:`os.fsdecode` と :func:`os.fsencode` はそれぞ" "れ :class:`str` あるいは :class:`bytes` になるのを保証するのに使えます。\n" ":pep:`519` で導入されました。" #: ../../glossary.rst:1227 msgid "PEP" msgstr "PEP" #: ../../glossary.rst:1229 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " "or its processes or environment. PEPs should provide a concise technical " "specification and a rationale for proposed features." msgstr "" "Python Enhancement Proposal。PEP は、Python コミュニティに対して情報を提供す" "る、あるいは Python の新機能やその過程や環境について記述する設計文書です。\n" "PEP は、機能についての簡潔な技術的仕様と提案する機能の論拠 (理論) を伝えるべ" "きです。" #: ../../glossary.rst:1235 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " "the design decisions that have gone into Python. The PEP author is " "responsible for building consensus within the community and documenting " "dissenting opinions." msgstr "" "PEP は、新機能の提案にかかる、コミュニティによる問題提起の集積と Python にな" "される設計決断の文書化のための最上位の機構となることを意図しています。PEP の" "著者にはコミュニティ内の合意形成を行うこと、反対意見を文書化することの責務が" "あります。" #: ../../glossary.rst:1241 msgid "See :pep:`1`." msgstr ":pep:`1` を参照してください。" #: ../../glossary.rst:1242 msgid "portion" msgstr "portion" #: ../../glossary.rst:1244 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`." msgstr "" ":pep:`420` で定義されている、namespace package に属する、複数のファイルが " "(zipファイルに格納されている場合もある) 1つのディレクトリに格納されたもの。" #: ../../glossary.rst:1246 msgid "positional argument" msgstr "位置引数 (positional argument)" #: ../../glossary.rst:1249 msgid "provisional API" msgstr "provisional API" #: ../../glossary.rst:1251 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " "to such interfaces are not expected, as long as they are marked provisional, " "backwards incompatible changes (up to and including removal of the " "interface) may occur if deemed necessary by core developers. Such changes " "will not be made gratuitously -- they will occur only if serious fundamental " "flaws are uncovered that were missed prior to the inclusion of the API." msgstr "" "(暫定 API) 標準ライブラリの後方互換性保証から計画的に除外されたものです。その" "ようなインターフェースへの大きな変更は、暫定であるとされている間は期待されて" "いませんが、コア開発者によって必要とみなされれば、後方非互換な変更 (インター" "フェースの削除まで含まれる) が行われえます。このような変更はむやみに行われる" "ものではありません -- これは API を組み込む前には見落とされていた重大な欠陥が" "露呈したときにのみ行われます。" #: ../../glossary.rst:1260 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 " "backwards compatible resolution to any identified problems." msgstr "" "暫定 API についても、後方互換性のない変更は「最終手段」とみなされています。問" "題点が判明した場合でも後方互換な解決策を探すべきです。" #: ../../glossary.rst:1264 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " "See :pep:`411` for more details." msgstr "" "このプロセスにより、標準ライブラリは問題となるデザインエラーに長い間閉じ込め" "られることなく、時代を超えて進化を続けられます。詳細は :pep:`411` を参照して" "ください。" #: ../../glossary.rst:1267 msgid "provisional package" msgstr "provisional package" #: ../../glossary.rst:1269 msgid "See :term:`provisional API`." msgstr ":term:`provisional API` を参照してください。" #: ../../glossary.rst:1270 msgid "Python 3000" msgstr "Python 3000" #: ../../glossary.rst:1272 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 " "\"Py3k\"." msgstr "" "Python 3.x リリースラインのニックネームです。(Python 3 が遠い将来の話だった頃" "に作られた言葉です。) \"Py3k\" と略されることもあります。" #: ../../glossary.rst:1275 msgid "Pythonic" msgstr "Pythonic" #: ../../glossary.rst:1277 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 " "other languages. For example, a common idiom in Python is to loop over all " "elements of an iterable using a :keyword:`for` statement. Many other " "languages don't have this type of construct, so people unfamiliar with " "Python sometimes use a numerical counter instead::" msgstr "" "他の言語で一般的な考え方で書かれたコードではなく、Python の特に一般的なイディ" "オムに従った考え方やコード片。例えば、Python の一般的なイディオムでは :" "keyword:`for` 文を使ってイテラブルのすべての要素に渡ってループします。他の多" "くの言語にはこの仕組みはないので、Python に慣れていない人は代わりに数値のカウ" "ンターを使うかもしれません::" #: ../../glossary.rst:1284 msgid "" "for i in range(len(food)):\n" " print(food[i])" msgstr "" #: ../../glossary.rst:1287 msgid "As opposed to the cleaner, Pythonic method::" msgstr "これに対し、きれいな Pythonic な方法は::" #: ../../glossary.rst:1289 msgid "" "for piece in food:\n" " print(piece)" msgstr "" #: ../../glossary.rst:1291 msgid "qualified name" msgstr "qualified name" #: ../../glossary.rst:1293 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 " "top-level functions and classes, the qualified name is the same as the " "object's name::" msgstr "" "(修飾名) モジュールのグローバルスコープから、そのモジュールで定義されたクラ" "ス、関数、メソッドへの、 \"パス\" を表すドット名表記です。 :pep:`3155` で定義" "されています。トップレベルの関数やクラスでは、修飾名はオブジェクトの名前と同" "じです::" #: ../../glossary.rst:1298 msgid "" ">>> class C:\n" "... class D:\n" "... def meth(self):\n" "... pass\n" "...\n" ">>> C.__qualname__\n" "'C'\n" ">>> C.D.__qualname__\n" "'C.D'\n" ">>> C.D.meth.__qualname__\n" "'C.D.meth'" msgstr "" #: ../../glossary.rst:1310 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." "text``::" msgstr "" "モジュールへの参照で使われると、*完全修飾名 (fully qualified name)* はすべて" "の親パッケージを含む全体のドット名表記、例えば ``email.mime.text`` を意味しま" "す::" #: ../../glossary.rst:1314 msgid "" ">>> import email.mime.text\n" ">>> email.mime.text.__name__\n" "'email.mime.text'" msgstr "" #: ../../glossary.rst:1317 msgid "race condition" msgstr "" #: ../../glossary.rst:1319 msgid "" "A condition of a program where the its behavior depends on the relative " "timing or ordering of events, particularly in multi-threaded programs. Race " "conditions can lead to :term:`non-deterministic` behavior and bugs that are " "difficult to reproduce. A :term:`data race` is a specific type of race " "condition involving unsynchronized access to shared memory. The :term:" "`LBYL` coding style is particularly susceptible to race conditions in multi-" "threaded code. Using :term:`locks ` and other :term:`synchronization " "primitives ` helps prevent race conditions." msgstr "" #: ../../glossary.rst:1329 msgid "reference count" msgstr "reference count" #: ../../glossary.rst:1331 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` " "and have reference counts that are never modified, and therefore the objects " "are never deallocated. Reference counting is generally not visible to " "Python code, but it is a key element of the :term:`CPython` implementation. " "Programmers can call the :func:`sys.getrefcount` function to return the " "reference count for a particular object." msgstr "" "(参照カウント) あるオブジェクトに対する参照の数。参照カウントが0になったと" "き、そのオブジェクトは破棄されます。 :term:`永続 ` であり、参照カウ" "ントが決して変更されないために割り当てが解除されないオブジェクトもあります。" "参照カウントは通常は Python のコード上には現れませんが、 :term:`CPython` 実装" "の重要な要素です。プログラマーは、 任意のオブジェクトの参照カウントを知るため" "に :func:`sys.getrefcount` 関数を呼び出すことが出来ます。" #: ../../glossary.rst:1340 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:1344 msgid "regular package" msgstr "regular package" #: ../../glossary.rst:1346 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." msgstr "" "伝統的な、 ``__init__.py`` ファイルを含むディレクトリとしての :term:" "`package`。" #: ../../glossary.rst:1349 msgid "See also :term:`namespace package`." msgstr ":term:`namespace package` を参照してください。" #: ../../glossary.rst:1350 msgid "reentrant" msgstr "" #: ../../glossary.rst:1352 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:1356 msgid "" "For functions, reentrancy means the function can be safely called again " "before a previous invocation has completed, which is important when " "functions may be called recursively or from signal handlers. Thread-unsafe " "functions may be :term:`non-deterministic` if they're called reentrantly in " "a multithreaded program." msgstr "" #: ../../glossary.rst:1362 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 " "blocking. In contrast, :class:`threading.Lock` is not reentrant - " "attempting to acquire it twice from the same thread will cause a deadlock." msgstr "" #: ../../glossary.rst:1368 msgid "See also :term:`lock` and :term:`deadlock`." msgstr "" #: ../../glossary.rst:1369 msgid "REPL" msgstr "REPL" #: ../../glossary.rst:1371 msgid "" "An acronym for the \"read–eval–print loop\", another name for the :term:" "`interactive` interpreter shell." msgstr "" "\"read–eval–print loop\" の頭字語で、 :term:`対話型 ` インタープ" "リターシェルの別名。" #: ../../glossary.rst:1373 msgid "__slots__" msgstr "__slots__" #: ../../glossary.rst:1375 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " "the technique is somewhat tricky to get right and is best reserved for rare " "cases where there are large numbers of instances in a memory-critical " "application." msgstr "" "クラス内での宣言で、インスタンス属性の領域をあらかじめ定義しておき、インスタ" "ンス辞書を排除することで、メモリを節約します。これはよく使われるテクニックで" "すが、正しく扱うには少しトリッキーなので、稀なケース、例えばメモリが死活問題" "となるアプリケーションでインスタンスが大量に存在する、といったときを除き、使" "わないのがベストです。" #: ../../glossary.rst:1380 msgid "sequence" msgstr "sequence" #: ../../glossary.rst:1382 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`~object.__getitem__` special method and defines a :" "meth:`~object.__len__` method that returns the length of the sequence. Some " "built-in sequence types are :class:`list`, :class:`str`, :class:`tuple`, " "and :class:`bytes`. Note that :class:`dict` also supports :meth:`~object." "__getitem__` and :meth:`!__len__`, but is considered a mapping rather than a " "sequence because the lookups use arbitrary :term:`hashable` keys rather than " "integers." msgstr "" #: ../../glossary.rst:1391 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" "`~object.__len__`, adding :meth:`~sequence.count`, :meth:`~sequence.index`, :" "meth:`~object.__contains__`, and :meth:`~object.__reversed__`. Types that " "implement this expanded interface can be registered explicitly using :func:" "`~abc.ABCMeta.register`. For more documentation on sequence methods " "generally, see :ref:`Common Sequence Operations `." msgstr "" #: ../../glossary.rst:1401 msgid "set comprehension" msgstr "" #: ../../glossary.rst:1403 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 " "not in 'abc'}`` generates the set of strings ``{'r', 'd'}``. See :ref:" "`comprehensions`." msgstr "" "(集合内包表記) iterable 内の全てあるいは一部の要素を処理して、その結果からな" "る集合を返すコンパクトな書き方です。 ``results = {c for c in 'abracadabra' " "if c not in 'abc'}`` とすると、``{'r', 'd'}`` という文字列の辞書を生成しま" "す。 :ref:`comprehensions` を参照してください。" #: ../../glossary.rst:1407 msgid "single dispatch" msgstr "single dispatch" #: ../../glossary.rst:1409 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:1411 msgid "slice" msgstr "slice" #: ../../glossary.rst:1413 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " "when several are given, such as in ``variable_name[1:3:5]``. The bracket " "(subscript) notation uses :class:`slice` objects internally." msgstr "" "(スライス) 一般に :term:`シーケンス ` の一部を含むオブジェクト。ス" "ライスは、添字表記 ``[]`` で与えられた複数の数の間にコロンを書くことで作られ" "ます。例えば、 ``variable_name[1:3:5]`` です。角括弧 (添字) 記号は :class:" "`slice` オブジェクトを内部で利用しています。" #: ../../glossary.rst:1417 msgid "soft deprecated" msgstr "" #: ../../glossary.rst:1419 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:1423 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." msgstr "" #: ../../glossary.rst:1426 msgid "" "See `PEP 387: Soft Deprecation `_." msgstr "" #: ../../glossary.rst:1428 msgid "special method" msgstr "special method" #: ../../glossary.rst:1432 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 " "with double underscores. Special methods are documented in :ref:" "`specialnames`." msgstr "" "(特殊メソッド) ある型に特定の操作、例えば加算をするために Python から暗黙に呼" "び出されるメソッド。この種類のメソッドは、メソッド名の最初と最後にアンダース" "コア 2 つがついています。特殊メソッドについては :ref:`specialnames` で解説さ" "れています。" #: ../../glossary.rst:1436 msgid "standard library" msgstr "" #: ../../glossary.rst:1438 msgid "" "The collection of :term:`packages `, :term:`modules ` and :" "term:`extension modules ` distributed as a part of the " "official Python interpreter package. The exact membership of the collection " "may vary based on platform, available system libraries, or other criteria. " "Documentation can be found at :ref:`library-index`." msgstr "" #: ../../glossary.rst:1444 msgid "" "See also :data:`sys.stdlib_module_names` for a list of all possible standard " "library module names." msgstr "" #: ../../glossary.rst:1446 msgid "statement" msgstr "statement" #: ../../glossary.rst:1448 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 :" "keyword:`if`, :keyword:`while` or :keyword:`for`." msgstr "" "(文) 文はスイート (コードの\"ブロック\") に不可欠な要素です。文は :term:`式 " "` かキーワードから構成されるもののどちらかです。後者には :" "keyword:`if`、:keyword:`while`、:keyword:`for` があります。" #: ../../glossary.rst:1451 msgid "static type checker" msgstr "" #: ../../glossary.rst:1453 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:1456 msgid "stdlib" msgstr "" #: ../../glossary.rst:1458 msgid "An abbreviation of :term:`standard library`." msgstr "" #: ../../glossary.rst:1459 msgid "strong reference" msgstr "" #: ../../glossary.rst:1461 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 " "calling :c:func:`Py_INCREF` when the reference is created and released with :" "c:func:`Py_DECREF` when the reference is deleted." msgstr "" #: ../../glossary.rst:1467 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 " "strong reference before exiting the scope of the strong reference, to avoid " "leaking one reference." msgstr "" #: ../../glossary.rst:1472 msgid "See also :term:`borrowed reference`." msgstr "" #: ../../glossary.rst:1473 msgid "synchronization primitive" msgstr "" #: ../../glossary.rst:1475 msgid "" "A basic building block for coordinating (synchronizing) the execution of " "multiple threads to ensure :term:`thread-safe` access to shared resources. " "Python's :mod:`threading` module provides several synchronization primitives " "including :class:`~threading.Lock`, :class:`~threading.RLock`, :class:" "`~threading.Semaphore`, :class:`~threading.Condition`, :class:`~threading." "Event`, and :class:`~threading.Barrier`. Additionally, the :mod:`queue` " "module provides multi-producer, multi-consumer queues that are especially " "useful in multithreaded programs. These primitives help prevent :term:`race " "conditions ` and coordinate thread execution. See also :" "term:`lock`." msgstr "" #: ../../glossary.rst:1485 msgid "t-string" msgstr "" #: ../../glossary.rst:1486 msgid "t-strings" msgstr "" #: ../../glossary.rst:1488 msgid "" "String literals prefixed with ``t`` or ``T`` are commonly called \"t-" "strings\" which is short for :ref:`template string literals `." msgstr "" #: ../../glossary.rst:1491 msgid "text encoding" msgstr "text encoding" #: ../../glossary.rst:1493 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:1497 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:1500 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." msgstr "" #: ../../glossary.rst:1503 msgid "text file" msgstr "text file" #: ../../glossary.rst:1505 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:" "`text encoding` automatically. Examples of text files are files opened in " "text mode (``'r'`` or ``'w'``), :data:`sys.stdin`, :data:`sys.stdout`, and " "instances of :class:`io.StringIO`." msgstr "" "(テキストファイル) :class:`str` オブジェクトを読み書きできる :term:`file " "object` です。\n" "しばしば、テキストファイルは実際にバイト指向のデータストリームにアクセス" "し、 :term:`テキストエンコーディング ` を自動的に行います。\n" "テキストファイルの例は、 :data:`sys.stdin`, :data:`sys.stdout`, :class:`io." "StringIO` インスタンスなどをテキストモード (``'r'`` or ``'w'``) で開いたファ" "イルです。" #: ../../glossary.rst:1512 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." msgstr "" ":term:`bytes-like オブジェクト ` を読み書きできるファイル" "オブジェクトについては、 :term:`バイナリファイル ` も参照してく" "ださい。" #: ../../glossary.rst:1514 msgid "thread state" msgstr "" #: ../../glossary.rst:1517 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:1521 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:1525 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:1529 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 " "states from multiple interpreters may be bound to the same thread, but only " "one can be :term:`attached ` in that thread at any " "given moment." msgstr "" #: ../../glossary.rst:1535 msgid "" "See :ref:`Thread State and the Global Interpreter Lock ` for more " "information." msgstr "" #: ../../glossary.rst:1537 msgid "thread-safe" msgstr "" #: ../../glossary.rst:1539 msgid "" "A module, function, or class that behaves correctly when used by multiple " "threads concurrently. Thread-safe code uses appropriate :term:" "`synchronization primitives ` like :term:`locks " "` to protect shared mutable state, or is designed to avoid shared " "mutable state entirely. In the :term:`free-threaded ` " "build, built-in types like :class:`dict`, :class:`list`, and :class:`set` " "use internal locking to make many operations thread-safe, although thread " "safety is not necessarily guaranteed. Code that is not thread-safe may " "experience :term:`race conditions ` and :term:`data races " "` when used in multi-threaded programs." msgstr "" #: ../../glossary.rst:1550 msgid "token" msgstr "トークン" #: ../../glossary.rst:1553 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:1558 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:1561 msgid "triple-quoted string" msgstr "triple-quoted string" #: ../../glossary.rst:1563 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 " "available with single-quoted strings, they are useful for a number of " "reasons. They allow you to include unescaped single and double quotes " "within a string and they can span multiple lines without the use of the " "continuation character, making them especially useful when writing " "docstrings." msgstr "" "(三重クォート文字列) 3つの連続したクォート記号(\")かアポストロフィー(')で囲ま" "れた文字列。通常の(一重)クォート文字列に比べて表現できる文字列に違いはありま" "せんが、幾つかの理由で有用です。1つか2つの連続したクォート記号をエスケープ無" "しに書くことができますし、行継続文字(\\\\)を使わなくても複数行にまたがること" "ができるので、ドキュメンテーション文字列を書く時に特に便利です。" #: ../../glossary.rst:1570 msgid "type" msgstr "type" #: ../../glossary.rst:1572 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:1576 msgid "type alias" msgstr "type alias" #: ../../glossary.rst:1578 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "(型エイリアス) 型の別名で、型を識別子に代入して作成します。" #: ../../glossary.rst:1580 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" msgstr "" "型エイリアスは :term:`型ヒント ` を単純化するのに有用です。例え" "ば::" #: ../../glossary.rst:1583 msgid "" "def remove_gray_shades(\n" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" " pass" msgstr "" #: ../../glossary.rst:1587 msgid "could be made more readable like this::" msgstr "これは次のようにより読みやすくできます::" #: ../../glossary.rst:1589 msgid "" "Color = tuple[int, int, int]\n" "\n" "def remove_gray_shades(colors: list[Color]) -> list[Color]:\n" " pass" msgstr "" #: ../../glossary.rst:1594 ../../glossary.rst:1608 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "機能の説明がある :mod:`typing` と :pep:`484` を参照してください。" #: ../../glossary.rst:1595 msgid "type hint" msgstr "type hint" #: ../../glossary.rst:1597 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." msgstr "" "(型ヒント) 変数、クラス属性、関数のパラメータや返り値の期待される型を指定す" "る :term:`annotation` です。" #: ../../glossary.rst:1600 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:1604 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." msgstr "" "グローバル変数、クラス属性、関数で、ローカル変数でないものの型ヒントは :func:" "`typing.get_type_hints` で取得できます。" #: ../../glossary.rst:1609 msgid "universal newlines" msgstr "universal newlines" #: ../../glossary.rst:1611 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 " "Windows convention ``'\\r\\n'``, and the old Macintosh convention " "``'\\r'``. See :pep:`278` and :pep:`3116`, as well as :func:`bytes." "splitlines` for an additional use." msgstr "" "テキストストリームの解釈法の一つで、以下のすべてを行末と認識します: Unix の行" "末規定 ``'\\n'``、Windows の規定 ``'\\r\\n'``、古い Macintosh の規定 " "``'\\r'``。利用法について詳しくは、 :pep:`278` と :pep:`3116` 、さらに :func:" "`bytes.splitlines` も参照してください。" #: ../../glossary.rst:1616 msgid "variable annotation" msgstr "variable annotation" #: ../../glossary.rst:1618 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "(変数アノテーション) 変数あるいはクラス属性の :term:`annotation` 。" #: ../../glossary.rst:1620 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "変数あるいはクラス属性に注釈を付けたときは、代入部分は任意です::" #: ../../glossary.rst:1622 msgid "" "class C:\n" " field: 'annotation'" msgstr "" #: ../../glossary.rst:1625 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" msgstr "" "変数アノテーションは通常は :term:`型ヒント` のために使われます: 例" "えば、この変数は :class:`int` の値を取ることを期待されています::" #: ../../glossary.rst:1629 msgid "count: int = 0" msgstr "" #: ../../glossary.rst:1631 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" "変数アノテーションの構文については :ref:`annassign` 節で解説しています。" #: ../../glossary.rst:1633 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " "working with annotations." msgstr "" "機能の説明がある :term:`function annotation`, :pep:`484` , :pep:`526` を参照" "してください。また、アノテーションを利用するベストプラクティスとして :ref:" "`annotations-howto` も参照してください。" #: ../../glossary.rst:1637 msgid "virtual environment" msgstr "virtual environment" #: ../../glossary.rst:1639 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " "interfering with the behaviour of other Python applications running on the " "same system." msgstr "" "(仮想環境) 協調的に切り離された実行環境です。これにより Python ユーザとアプリ" "ケーションは同じシステム上で動いている他の Python アプリケーションの挙動に干" "渉することなく Python パッケージのインストールと更新を行うことができます。" #: ../../glossary.rst:1644 msgid "See also :mod:`venv`." msgstr ":mod:`venv` を参照してください。" #: ../../glossary.rst:1645 msgid "virtual machine" msgstr "virtual machine" #: ../../glossary.rst:1647 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." msgstr "" "(仮想マシン) 完全にソフトウェアにより定義されたコンピュータ。 Python の仮想マ" "シンは、バイトコードコンパイラが出力した :term:`バイトコード ` を実" "行します。" #: ../../glossary.rst:1649 msgid "walrus operator" msgstr "" #: ../../glossary.rst:1651 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:1654 msgid "Zen of Python" msgstr "Zen of Python" #: ../../glossary.rst:1656 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " "\"``import this``\" at the interactive prompt." msgstr "" "(Pythonの悟り) Python を理解し利用する上での導きとなる、Python の設計原則と哲" "学をリストにしたものです。対話プロンプトで \"``import this``\" とするとこのリ" "ストを読めます。" #: ../../glossary.rst:24 msgid "..." msgstr "..." #: ../../glossary.rst:24 msgid "ellipsis literal" msgstr "ellipsisリテラル" #: ../../glossary.rst:345 msgid "C-contiguous" msgstr "" #: ../../glossary.rst:345 msgid "Fortran contiguous" msgstr "" #: ../../glossary.rst:955 msgid "magic" msgstr "" #: ../../glossary.rst:1430 msgid "special" msgstr "特殊"