# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # tomo, 2021 # mollinaca, 2021 # Arihiro TAKASE, 2023 # Nozomu Kaneko , 2023 # 秘湯 , 2023 # righteous, 2023 # TENMYO Masakazu, 2023 # Takanori Suzuki , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-03-28 14:18+0000\n" "PO-Revision-Date: 2021-06-28 01:50+0000\n" "Last-Translator: Takanori Suzuki , 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" #: ../../tutorial/introduction.rst:5 msgid "An Informal Introduction to Python" msgstr "形式ばらない Python の紹介" #: ../../tutorial/introduction.rst:7 msgid "" "In the following examples, input and output are distinguished by the " "presence or absence of prompts (:term:`>>>` and :term:`...`): to repeat the " "example, you must type everything after the prompt, when the prompt appears; " "lines that do not begin with a prompt are output from the interpreter. Note " "that a secondary prompt on a line by itself in an example means you must " "type a blank line; this is used to end a multi-line command." msgstr "" "以下のサンプルでは、入力と出力はプロンプト (:term:`>>>` や :term:`...`) の有" "無で区別します: 例を実際に試す場合は、プロンプトが表示されているときに、サン" "プル中のプロンプトから後ろの内容全てを入力します。 \n" "\n" "プロンプトが先頭にない行は、インタプリタからの出力です。サンプル中には二次プ" "ロンプト (:term:`...`) だけが表示されている行がありますが、これは空行を入力し" "なければならないことを意味しています\n" "\n" " 空行の入力は、複数の行からなる命令の終わりを、インタプリタに教えるために使わ" "れます。" #: ../../tutorial/introduction.rst:16 msgid "" "You can toggle the display of prompts and output by clicking on ``>>>`` in " "the upper-right corner of an example box. If you hide the prompts and " "output for an example, then you can easily copy and paste the input lines " "into your interpreter." msgstr "" "コード例の枠の右上にある ``>>>`` をクリックすると、プロンプトと出力の表示をト" "グルできます。コード例のプロンプトと出力を非表示にすると、簡単にインタープリ" "タの入力にコピー&ペーストができます。" #: ../../tutorial/introduction.rst:23 msgid "" "Many of the examples in this manual, even those entered at the interactive " "prompt, include comments. Comments in Python start with the hash character, " "``#``, and extend to the end of the physical line. A comment may appear at " "the start of a line or following whitespace or code, but not within a string " "literal. A hash character within a string literal is just a hash character. " "Since comments are to clarify code and are not interpreted by Python, they " "may be omitted when typing in examples." msgstr "" "このマニュアルにあるサンプルの多くは、対話プロンプトで入力されるものでもコメ" "ントを含んでいます。 Python におけるコメント文は、ハッシュ文字 ``#`` で始ま" "り、物理行の終わりまで続きます。コメントは行の先頭にも、空白やコードの後にも" "書くことができますが、文字列リテラルの内部に置くことはできません。文字列リテ" "ラル中のハッシュ文字はただのハッシュ文字です。コメントはコードを明快にするた" "めのものであり、Pythonはコメントを解釈しません。なので、サンプルコードを実際" "に入力して試して見るときは、コメントを省いても大丈夫です。" #: ../../tutorial/introduction.rst:31 msgid "Some examples::" msgstr "いくつかの例です::" #: ../../tutorial/introduction.rst:33 msgid "" "# this is the first comment\n" "spam = 1 # and this is the second comment\n" " # ... and now a third!\n" "text = \"# This is not a comment because it's inside quotes.\"" msgstr "" "# これは最初のコメント\n" "spam = 1 # そしてこれは2つめのコメント\n" " # ...そして3つめ!\n" "text = \"# これはクォーテーションの間なのでコメントではない。\"" #: ../../tutorial/introduction.rst:42 msgid "Using Python as a Calculator" msgstr "Python を電卓として使う" #: ../../tutorial/introduction.rst:44 msgid "" "Let's try some simple Python commands. Start the interpreter and wait for " "the primary prompt, ``>>>``. (It shouldn't take long.)" msgstr "" "それでは、簡単な Python コマンドをいくつか試してみましょう。インタプリタを起" "動して、一次プロンプト、 ``>>>`` が現れるのを待ちます。 (そう長くはかからない" "はずです)" #: ../../tutorial/introduction.rst:51 msgid "Numbers" msgstr "数" #: ../../tutorial/introduction.rst:53 msgid "" "The interpreter acts as a simple calculator: you can type an expression at " "it and it will write the value. Expression syntax is straightforward: the " "operators ``+``, ``-``, ``*`` and ``/`` can be used to perform arithmetic; " "parentheses (``()``) can be used for grouping. For example::" msgstr "" "インタプリタは、簡単な電卓のように動作します: 式を入力すると、その結果が表示" "されます。\n" "式の文法は素直なものです: 演算子 ``+`` 、 ``-`` 、 ``*`` 、 ``/`` によって算" "術演算を行うことができ、丸括弧 (``()``) をグループ化に使うことができます。\n" "例えば::" #: ../../tutorial/introduction.rst:59 msgid "" ">>> 2 + 2\n" "4\n" ">>> 50 - 5*6\n" "20\n" ">>> (50 - 5*6) / 4\n" "5.0\n" ">>> 8 / 5 # division always returns a floating-point number\n" "1.6" msgstr "" ">>> 2 + 2\n" "4\n" ">>> 50 - 5*6\n" "20\n" ">>> (50 - 5*6) / 4\n" "5.0\n" ">>> 8 / 5 # 除算は常に浮動小数点数(float)を返す\n" "1.6" #: ../../tutorial/introduction.rst:68 msgid "" "The integer numbers (e.g. ``2``, ``4``, ``20``) have type :class:`int`, the " "ones with a fractional part (e.g. ``5.0``, ``1.6``) have type :class:" "`float`. We will see more about numeric types later in the tutorial." msgstr "" "整数 (例えば、 ``2`` 、 ``4`` 、 ``20``) は :class:`int` 型であり、小数部を持" "つ数 (例えば、 ``5.0`` 、 ``1.6``) は :class:`float` 型です。数値型については" "後のチュートリアルでさらに見ていきます。" #: ../../tutorial/introduction.rst:72 msgid "" "Division (``/``) always returns a float. To do :term:`floor division` and " "get an integer result you can use the ``//`` operator; to calculate the " "remainder you can use ``%``::" msgstr "" "除算 (``/``) は常に浮動小数点数を返します。 ``//`` 演算子は :term:`整数除算 " "` を行い、整数値を返します; 剰余は、``%`` で求めます。::" #: ../../tutorial/introduction.rst:76 msgid "" ">>> 17 / 3 # classic division returns a float\n" "5.666666666666667\n" ">>>\n" ">>> 17 // 3 # floor division discards the fractional part\n" "5\n" ">>> 17 % 3 # the % operator returns the remainder of the division\n" "2\n" ">>> 5 * 3 + 2 # floored quotient * divisor + remainder\n" "17" msgstr "" ">>> 17 / 3 # 除算は浮動小数点数を返す\n" "5.666666666666667\n" ">>>\n" ">>> 17 // 3 # 整数除算は小数部を破棄する\n" "5\n" ">>> 17 % 3 # % 演算子は剰余を返す\n" "2\n" ">>> 5 * 3 + 2 # 切り捨てられた商 * 除数 + 剰余\n" "17" #: ../../tutorial/introduction.rst:86 msgid "" "With Python, it is possible to use the ``**`` operator to calculate powers " "[#]_::" msgstr "Python では、冪乗を計算するのに ``**`` 演算子が使えます [#]_::" #: ../../tutorial/introduction.rst:88 msgid "" ">>> 5 ** 2 # 5 squared\n" "25\n" ">>> 2 ** 7 # 2 to the power of 7\n" "128" msgstr "" ">>> 5 ** 2 # 5の2乗\n" "25\n" ">>> 2 ** 7 # 2の7乗\n" "128" #: ../../tutorial/introduction.rst:93 msgid "" "The equal sign (``=``) is used to assign a value to a variable. Afterwards, " "no result is displayed before the next interactive prompt::" msgstr "" "等号 (``=``) は変数に値を代入するときに使います。代入を行っても、結果は出力さ" "れず、次の入力プロンプトが表示されます。::" #: ../../tutorial/introduction.rst:96 msgid "" ">>> width = 20\n" ">>> height = 5 * 9\n" ">>> width * height\n" "900" msgstr "" ">>> width = 20\n" ">>> height = 5 * 9\n" ">>> width * height\n" "900" #: ../../tutorial/introduction.rst:101 msgid "" "If a variable is not \"defined\" (assigned a value), trying to use it will " "give you an error::" msgstr "" "変数が \"定義\" されていない (つまり値が代入されていない) 場合、その変数を使" "おうとするとエラーが発生します::" #: ../../tutorial/introduction.rst:104 msgid "" ">>> n # try to access an undefined variable\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" "NameError: name 'n' is not defined" msgstr "" ">>> n # 未定義の変数にアクセスする\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" "NameError: name 'n' is not defined" #: ../../tutorial/introduction.rst:109 msgid "" "There is full support for floating point; operators with mixed type operands " "convert the integer operand to floating point::" msgstr "" "浮動小数点を完全にサポートしています。演算対象の値(オペランド)に複数の型が入" "り混じっている場合、演算子は整数のオペランドを浮動小数点型に変換します::" #: ../../tutorial/introduction.rst:112 msgid "" ">>> 4 * 3.75 - 1\n" "14.0" msgstr "" ">>> 4 * 3.75 - 1\n" "14.0" #: ../../tutorial/introduction.rst:115 msgid "" "In interactive mode, the last printed expression is assigned to the variable " "``_``. This means that when you are using Python as a desk calculator, it " "is somewhat easier to continue calculations, for example::" msgstr "" "対話モードでは、最後に表示された結果は変数 ``_`` に代入されます。このことを利" "用すると、Python を電卓として使うときに、計算を連続して行う作業が多少楽になり" "ます。以下に例を示します::" #: ../../tutorial/introduction.rst:119 msgid "" ">>> tax = 12.5 / 100\n" ">>> price = 100.50\n" ">>> price * tax\n" "12.5625\n" ">>> price + _\n" "113.0625\n" ">>> round(_, 2)\n" "113.06" msgstr "" ">>> tax = 12.5 / 100\n" ">>> price = 100.50\n" ">>> price * tax\n" "12.5625\n" ">>> price + _\n" "113.0625\n" ">>> round(_, 2)\n" "113.06" #: ../../tutorial/introduction.rst:128 msgid "" "This variable should be treated as read-only by the user. Don't explicitly " "assign a value to it --- you would create an independent local variable with " "the same name masking the built-in variable with its magic behavior." msgstr "" "この変数には読取りだけを行い、明示的な代入を行ってはいけません --- そんなこと" "をすれば、同じ名前で別のローカル変数が生成され、元の特別な動作をする組み込み" "変数を覆い隠してしておかしなことになってしまうかもしれません。" #: ../../tutorial/introduction.rst:132 msgid "" "In addition to :class:`int` and :class:`float`, Python supports other types " "of numbers, such as :class:`~decimal.Decimal` and :class:`~fractions." "Fraction`. Python also has built-in support for :ref:`complex numbers " "`, and uses the ``j`` or ``J`` suffix to indicate the " "imaginary part (e.g. ``3+5j``)." msgstr "" ":class:`int` と :class:`float` に加え、 Python は :class:`~decimal.Decimal` " "や :class:`~fractions.Fraction` などの他の数値型もサポートしています。 :ref:`" "複素数 ` も組み込み型としてサポートしており、 ``j`` もしくは " "``J`` 接尾辞を使って虚部を示します (例: ``3+5j``)。" #: ../../tutorial/introduction.rst:142 msgid "Text" msgstr "テキスト" #: ../../tutorial/introduction.rst:144 msgid "" "Python can manipulate text (represented by type :class:`str`, so-called " "\"strings\") as well as numbers. This includes characters \"``!``\", words " "\"``rabbit``\", names \"``Paris``\", sentences \"``Got your back.``\", etc. " "\"``Yay! :)``\". They can be enclosed in single quotes (``'...'``) or double " "quotes (``\"...\"``) with the same result [#]_." msgstr "" "Python は数値だけでなくテキスト (いわゆる「文字列」である :class:`str` 型に" "よって表現されます) を扱うことができます。\n" "``!`` のような文字や ``rabbit`` のような単語、 ``Paris`` のような名前、 " "``Got your back.`` ような文もすべて文字列です。\n" "文字列はシングルクォート (``'...'``) またはダブルクォート (``\"...\"``) で囲" "み、どちらを使っても違いはありません [#]_ 。" #: ../../tutorial/introduction.rst:157 msgid "" "To quote a quote, we need to \"escape\" it, by preceding it with ``\\``. " "Alternatively, we can use the other type of quotation marks::" msgstr "" "クォートの中でクォートを使いたい場合、 ``\\`` を前に付け加えることで「エス" "ケープ」をする必要があります。\n" "もしくは、文字列で使用したいクォートとは別の方のクォートで囲むこともできま" "す。" #: ../../tutorial/introduction.rst:160 msgid "" ">>> 'doesn\\'t' # use \\' to escape the single quote...\n" "\"doesn't\"\n" ">>> \"doesn't\" # ...or use double quotes instead\n" "\"doesn't\"\n" ">>> '\"Yes,\" they said.'\n" "'\"Yes,\" they said.'\n" ">>> \"\\\"Yes,\\\" they said.\"\n" "'\"Yes,\" they said.'\n" ">>> '\"Isn\\'t,\" they said.'\n" "'\"Isn\\'t,\" they said.'" msgstr "" ">>> 'doesn\\'t' # \\' を使用してシングルクォートをエスケープする\n" "\"doesn't\"\n" ">>> \"doesn't\" # または代わりにダブルクォートを使用する\n" "\"doesn't\"\n" ">>> '\"Yes,\" they said.'\n" "'\"Yes,\" they said.'\n" ">>> \"\\\"Yes,\\\" they said.\"\n" "'\"Yes,\" they said.'\n" ">>> '\"Isn\\'t,\" they said.'\n" "'\"Isn\\'t,\" they said.'" #: ../../tutorial/introduction.rst:171 msgid "" "In the Python shell, the string definition and output string can look " "different. The :func:`print` function produces a more readable output, by " "omitting the enclosing quotes and by printing escaped and special " "characters::" msgstr "" "Python シェルでは、文字列を定義するときと文字列が出力されるときでは見え方が異" "なることがあります。\n" ":func:`print` 関数を使うと、両端のクォートがなくなり、エスケープされた文字や" "特殊文字が表示されるため、より読みやすい形で出力できます。" #: ../../tutorial/introduction.rst:175 msgid "" ">>> s = 'First line.\\nSecond line.' # \\n means newline\n" ">>> s # without print(), special characters are included in the string\n" "'First line.\\nSecond line.'\n" ">>> print(s) # with print(), special characters are interpreted, so \\n " "produces new line\n" "First line.\n" "Second line." msgstr "" ">>> s = 'First line.\\nSecond line.' # \\n は改行を意味する\n" ">>> s # print() を使用しない場合、特殊文字が文字列に含まれる\n" "'First line.\\nSecond line.'\n" ">>> print(s) # print() では特殊文字は解釈されるため、\\n は改行となる\n" "First line.\n" "Second line." #: ../../tutorial/introduction.rst:182 msgid "" "If you don't want characters prefaced by ``\\`` to be interpreted as special " "characters, you can use *raw strings* by adding an ``r`` before the first " "quote::" msgstr "" "``\\`` に続く文字を特殊文字として解釈されたくない場合は、最初の引用符の前に " "``r`` を付けた *raw strings* が使えます::" #: ../../tutorial/introduction.rst:186 msgid "" ">>> print('C:\\some\\name') # here \\n means newline!\n" "C:\\some\n" "ame\n" ">>> print(r'C:\\some\\name') # note the r before the quote\n" "C:\\some\\name" msgstr "" ">>> print('C:\\some\\name') # ここでは \\n は改行を意味する!\n" "C:\\some\n" "ame\n" ">>> print(r'C:\\some\\name') # 引用符の前 r に注目\n" "C:\\some\\name" #: ../../tutorial/introduction.rst:192 msgid "" "There is one subtle aspect to raw strings: a raw string may not end in an " "odd number of ``\\`` characters; see :ref:`the FAQ entry ` for more information and workarounds." msgstr "" "raw文字列には微妙な面があります: raw文字列は奇数個の``\\`` 文字では終了できま" "せん。詳細と解決方法については :ref:`the FAQ entry ` を参照してください。 " #: ../../tutorial/introduction.rst:197 msgid "" "String literals can span multiple lines. One way is using triple-quotes: " "``\"\"\"...\"\"\"`` or ``'''...'''``. End-of-line characters are " "automatically included in the string, but it's possible to prevent this by " "adding a ``\\`` at the end of the line. In the following example, the " "initial newline is not included::" msgstr "" "文字列リテラルは複数行にまたがって書けます。1 つの方法は三連引用符 " "(``\"\"\"...\"\"\"`` や ``'''...'''``) を使うことです。改行文字は自動的に文字" "列に含まれますが、行末に ``\\`` を付けることで含めないようにすることもできま" "す。次の例では最初の改行は含まれません::" #: ../../tutorial/introduction.rst:203 msgid "" ">>> print(\"\"\"\\\n" "... Usage: thingy [OPTIONS]\n" "... -h Display this usage message\n" "... -H hostname Hostname to connect to\n" "... \"\"\")\n" "Usage: thingy [OPTIONS]\n" " -h Display this usage message\n" " -H hostname Hostname to connect to\n" "\n" ">>>" msgstr "" ">>> print(\"\"\"\\\n" "... Usage: thingy [OPTIONS]\n" "... -h Display this usage message\n" "... -H hostname Hostname to connect to\n" "... \"\"\")\n" "Usage: thingy [OPTIONS]\n" " -h Display this usage message\n" " -H hostname Hostname to connect to\n" "\n" ">>>" #: ../../tutorial/introduction.rst:214 msgid "" "Strings can be concatenated (glued together) with the ``+`` operator, and " "repeated with ``*``::" msgstr "" "文字列は ``+`` 演算子で連結させる (くっつけて一つにする) ことができ、``*`` 演" "算子で反復させることができます::" #: ../../tutorial/introduction.rst:217 msgid "" ">>> # 3 times 'un', followed by 'ium'\n" ">>> 3 * 'un' + 'ium'\n" "'unununium'" msgstr "" ">>> # 'un' を3回繰り返し、その後に 'ium'\n" ">>> 3 * 'un' + 'ium'\n" "'unununium'" #: ../../tutorial/introduction.rst:221 msgid "" "Two or more *string literals* (i.e. the ones enclosed between quotes) next " "to each other are automatically concatenated. ::" msgstr "" "連続して並んでいる複数の *文字列リテラル* (つまり、引用符に囲われた文字列) " "は、自動的に連結されます。 ::" #: ../../tutorial/introduction.rst:224 msgid "" ">>> 'Py' 'thon'\n" "'Python'" msgstr "" ">>> 'Py' 'thon'\n" "'Python'" #: ../../tutorial/introduction.rst:227 msgid "" "This feature is particularly useful when you want to break long strings::" msgstr "この機能は、長い文字列を改行したいときにとても役に立ちます::" #: ../../tutorial/introduction.rst:229 msgid "" ">>> text = ('Put several strings within parentheses '\n" "... 'to have them joined together.')\n" ">>> text\n" "'Put several strings within parentheses to have them joined together.'" msgstr "" ">>> text = ('複数の文字列を丸括弧で囲むと'\n" "... '連結される。')\n" ">>> text\n" "'複数の文字列を丸括弧で囲むと連結される。'" #: ../../tutorial/introduction.rst:234 msgid "" "This only works with two literals though, not with variables or expressions::" msgstr "これは 2 つのリテラルどうしに対してのみ働き、変数や式には働きません::" #: ../../tutorial/introduction.rst:236 msgid "" ">>> prefix = 'Py'\n" ">>> prefix 'thon' # can't concatenate a variable and a string literal\n" " File \"\", line 1\n" " prefix 'thon'\n" " ^^^^^^\n" "SyntaxError: invalid syntax\n" ">>> ('un' * 3) 'ium'\n" " File \"\", line 1\n" " ('un' * 3) 'ium'\n" " ^^^^^\n" "SyntaxError: invalid syntax" msgstr "" ">>> prefix = 'Py'\n" ">>> prefix 'thon' # 変数と文字列リテラルは連結できない\n" " File \"\", line 1\n" " prefix 'thon'\n" " ^^^^^^\n" "SyntaxError: invalid syntax\n" ">>> ('un' * 3) 'ium'\n" " File \"\", line 1\n" " ('un' * 3) 'ium'\n" " ^^^^^\n" "SyntaxError: invalid syntax" #: ../../tutorial/introduction.rst:248 msgid "" "If you want to concatenate variables or a variable and a literal, use ``+``::" msgstr "変数どうしや変数とリテラルを連結したい場合は、``+`` を使ってください::" #: ../../tutorial/introduction.rst:250 msgid "" ">>> prefix + 'thon'\n" "'Python'" msgstr "" ">>> prefix + 'thon'\n" "'Python'" #: ../../tutorial/introduction.rst:253 msgid "" "Strings can be *indexed* (subscripted), with the first character having " "index 0. There is no separate character type; a character is simply a string " "of size one::" msgstr "" "文字列は *インデックス* (添字) を指定して文字を取得できます。最初の文字のイン" "デックスは 0 になります。文字を表す、専用のデータ型は用意されていません; 文字" "とは、単に長さが 1 の文字列です::" #: ../../tutorial/introduction.rst:257 msgid "" ">>> word = 'Python'\n" ">>> word[0] # character in position 0\n" "'P'\n" ">>> word[5] # character in position 5\n" "'n'" msgstr "" ">>> word = 'Python'\n" ">>> word[0] # 0番目の文字\n" "'P'\n" ">>> word[5] # 5番目の文字\n" "'n'" #: ../../tutorial/introduction.rst:263 msgid "" "Indices may also be negative numbers, to start counting from the right::" msgstr "" "インデックスには、負の値も指定できまます。この場合、右から数えていきます::" #: ../../tutorial/introduction.rst:265 msgid "" ">>> word[-1] # last character\n" "'n'\n" ">>> word[-2] # second-last character\n" "'o'\n" ">>> word[-6]\n" "'P'" msgstr "" ">>> word[-1] # 最後の文字\n" "'n'\n" ">>> word[-2] # 後ろから2番目の文字\n" "'o'\n" ">>> word[-6]\n" "'P'" #: ../../tutorial/introduction.rst:272 msgid "Note that since -0 is the same as 0, negative indices start from -1." msgstr "-0 は 0 と区別できないので、負のインデックスは -1 から始まります。" #: ../../tutorial/introduction.rst:274 msgid "" "In addition to indexing, *slicing* is also supported. While indexing is " "used to obtain individual characters, *slicing* allows you to obtain a " "substring::" msgstr "" "インデクス表記に加え、 *スライス* もサポートされています。インデクス表記は" "個々の文字を取得するのに使いますが、 *スライス* を使うと部分文字列を取得する" "ことができます::" #: ../../tutorial/introduction.rst:277 msgid "" ">>> word[0:2] # characters from position 0 (included) to 2 (excluded)\n" "'Py'\n" ">>> word[2:5] # characters from position 2 (included) to 5 (excluded)\n" "'tho'" msgstr "" ">>> word[0:2] # 0番目(含む)から2番目(含めない)までの文字\n" "'Py'\n" ">>> word[2:5] # 2番目(含む)から5番目(含めない)までの文字\n" "'tho'" #: ../../tutorial/introduction.rst:282 msgid "" "Slice indices have useful defaults; an omitted first index defaults to zero, " "an omitted second index defaults to the size of the string being sliced. ::" msgstr "" "スライスのインデックスには、便利なデフォルト値があります; 最初のインデックス" "を省略すると、0 と見なされます。二番め のインデックスを省略すると、スライスす" "る文字列のサイズとみなされます。 ::" #: ../../tutorial/introduction.rst:285 msgid "" ">>> word[:2] # character from the beginning to position 2 (excluded)\n" "'Py'\n" ">>> word[4:] # characters from position 4 (included) to the end\n" "'on'\n" ">>> word[-2:] # characters from the second-last (included) to the end\n" "'on'" msgstr "" ">>> word[:2] # 最初から2番目(含めない)までの文字\n" "'Py'\n" ">>> word[4:] # 4番目(含む)から最後までの文字\n" "'on'\n" ">>> word[-2:] # 後ろから2番目(含む)から最後までの文字\n" "'on'" #: ../../tutorial/introduction.rst:292 msgid "" "Note how the start is always included, and the end always excluded. This " "makes sure that ``s[:i] + s[i:]`` is always equal to ``s``::" msgstr "" "開始値は常に含まれ、終了値は常に含まれないことに注意してください。なので " "``s[:i] + s[i:]`` は常に ``s`` と等しくなります::" #: ../../tutorial/introduction.rst:295 msgid "" ">>> word[:2] + word[2:]\n" "'Python'\n" ">>> word[:4] + word[4:]\n" "'Python'" msgstr "" ">>> word[:2] + word[2:]\n" "'Python'\n" ">>> word[:4] + word[4:]\n" "'Python'" #: ../../tutorial/introduction.rst:300 msgid "" "One way to remember how slices work is to think of the indices as pointing " "*between* characters, with the left edge of the first character numbered 0. " "Then the right edge of the last character of a string of *n* characters has " "index *n*, for example::" msgstr "" "スライスの使い方をおぼえる良い方法は、インデックスが文字と文字の *あいだ " "(between)* を指しており、最初の文字の左端が 0 になっていると考えることです。" "そうすると、 *n* 文字からなる文字列中の最後の文字の右端はインデックス *n* と" "なります。例えばこうです::" #: ../../tutorial/introduction.rst:305 msgid "" " +---+---+---+---+---+---+\n" " | P | y | t | h | o | n |\n" " +---+---+---+---+---+---+\n" " 0 1 2 3 4 5 6\n" "-6 -5 -4 -3 -2 -1" msgstr "" " +---+---+---+---+---+---+\n" " | P | y | t | h | o | n |\n" " +---+---+---+---+---+---+\n" " 0 1 2 3 4 5 6\n" "-6 -5 -4 -3 -2 -1" #: ../../tutorial/introduction.rst:311 msgid "" "The first row of numbers gives the position of the indices 0...6 in the " "string; the second row gives the corresponding negative indices. The slice " "from *i* to *j* consists of all characters between the edges labeled *i* and " "*j*, respectively." msgstr "" "1行目の数字は文字列の 0 から 6 までのインデックスの位置を示しています; 2行目" "は対応する負のインデックスを示しています。*i* から *j* までのスライスは、それ" "ぞれ *i* と付いた境界から *j* と付いた境界までの全ての文字から成っています。" #: ../../tutorial/introduction.rst:316 msgid "" "For non-negative indices, the length of a slice is the difference of the " "indices, if both are within bounds. For example, the length of " "``word[1:3]`` is 2." msgstr "" "正のインデックスの場合、スライスされたシーケンスの長さは、スライスの両端のイ" "ンデックスが範囲内にあるかぎり、インデックス間の差になります。例えば、 " "``word[1:3]`` の長さは 2 になります。" #: ../../tutorial/introduction.rst:320 msgid "Attempting to use an index that is too large will result in an error::" msgstr "大き過ぎるインデックスを使おうとするとエラーが発生します::" #: ../../tutorial/introduction.rst:322 msgid "" ">>> word[42] # the word only has 6 characters\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" "IndexError: string index out of range" msgstr "" ">>> word[42] # the word only has 6 characters\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" "IndexError: string index out of range" #: ../../tutorial/introduction.rst:327 msgid "" "However, out of range slice indexes are handled gracefully when used for " "slicing::" msgstr "" "しかし、スライスで範囲外のインデックスを使ったときは、上手く対応して扱ってく" "れます::" #: ../../tutorial/introduction.rst:330 msgid "" ">>> word[4:42]\n" "'on'\n" ">>> word[42:]\n" "''" msgstr "" ">>> word[4:42]\n" "'on'\n" ">>> word[42:]\n" "''" #: ../../tutorial/introduction.rst:335 msgid "" "Python strings cannot be changed --- they are :term:`immutable`. Therefore, " "assigning to an indexed position in the string results in an error::" msgstr "" "Python の文字列は変更できません -- つまり :term:`不変 ` です。従っ" "て、文字列のインデックスで指定したある場所に代入を行うとエラーが発生します::" #: ../../tutorial/introduction.rst:338 msgid "" ">>> word[0] = 'J'\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" "TypeError: 'str' object does not support item assignment\n" ">>> word[2:] = 'py'\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" "TypeError: 'str' object does not support item assignment" msgstr "" ">>> word[0] = 'J'\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" "TypeError: 'str' object does not support item assignment\n" ">>> word[2:] = 'py'\n" "Traceback (most recent call last):\n" " File \"\", line 1, in \n" "TypeError: 'str' object does not support item assignment" #: ../../tutorial/introduction.rst:347 msgid "If you need a different string, you should create a new one::" msgstr "元の文字列と別の文字列が必要な場合は、新しく文字列を作成してください::" #: ../../tutorial/introduction.rst:349 msgid "" ">>> 'J' + word[1:]\n" "'Jython'\n" ">>> word[:2] + 'py'\n" "'Pypy'" msgstr "" ">>> 'J' + word[1:]\n" "'Jython'\n" ">>> word[:2] + 'py'\n" "'Pypy'" #: ../../tutorial/introduction.rst:354 msgid "The built-in function :func:`len` returns the length of a string::" msgstr "組込み関数 :func:`len` は文字列の長さ (length) を返します::" #: ../../tutorial/introduction.rst:356 msgid "" ">>> s = 'supercalifragilisticexpialidocious'\n" ">>> len(s)\n" "34" msgstr "" ">>> s = 'supercalifragilisticexpialidocious'\n" ">>> len(s)\n" "34" #: ../../tutorial/introduction.rst:363 msgid ":ref:`textseq`" msgstr ":ref:`textseq`" #: ../../tutorial/introduction.rst:364 msgid "" "Strings are examples of *sequence types*, and support the common operations " "supported by such types." msgstr "" "文字列は代表的な *シーケンス型* で、シーケンス型でサポートされている共通の操" "作をサポートしています。" #: ../../tutorial/introduction.rst:367 msgid ":ref:`string-methods`" msgstr ":ref:`string-methods`" #: ../../tutorial/introduction.rst:368 msgid "" "Strings support a large number of methods for basic transformations and " "searching." msgstr "" "文字列は、基本的な変換や検索を行うための数多くのメソッドをサポートしていま" "す。" #: ../../tutorial/introduction.rst:371 msgid ":ref:`f-strings`" msgstr ":ref:`f-strings`" #: ../../tutorial/introduction.rst:372 msgid "String literals that have embedded expressions." msgstr "式の埋め込みをサポートした文字列リテラル" #: ../../tutorial/introduction.rst:374 msgid ":ref:`formatstrings`" msgstr ":ref:`formatstrings`" #: ../../tutorial/introduction.rst:375 msgid "Information about string formatting with :meth:`str.format`." msgstr "" ":meth:`str.format` を使った文字列のフォーマットについての情報があります。" #: ../../tutorial/introduction.rst:377 msgid ":ref:`old-string-formatting`" msgstr ":ref:`old-string-formatting`" #: ../../tutorial/introduction.rst:378 msgid "" "The old formatting operations invoked when strings are the left operand of " "the ``%`` operator are described in more detail here." msgstr "" "文字列が ``%`` 演算子の左オペランドである場合に呼び出される古いフォーマット操" "作について、詳しく記述されています。" #: ../../tutorial/introduction.rst:385 msgid "Lists" msgstr "リスト型 (list)" #: ../../tutorial/introduction.rst:387 msgid "" "Python knows a number of *compound* data types, used to group together other " "values. The most versatile is the *list*, which can be written as a list of " "comma-separated values (items) between square brackets. Lists might contain " "items of different types, but usually the items all have the same type. ::" msgstr "" "Pythonは多くの *複合 (compound)* データ型を備えており、複数の値をまとめるのに" "使われます。最も汎用性が高いのは *リスト (list)* で、コンマ区切りの値 (要素) " "の並びを角括弧で囲んだものとして書き表されます。リストは異なる型の要素を含む" "こともありますが、通常は同じ型の要素のみを持ちます。 ::" #: ../../tutorial/introduction.rst:392 msgid "" ">>> squares = [1, 4, 9, 16, 25]\n" ">>> squares\n" "[1, 4, 9, 16, 25]" msgstr "" ">>> squares = [1, 4, 9, 16, 25]\n" ">>> squares\n" "[1, 4, 9, 16, 25]" #: ../../tutorial/introduction.rst:396 msgid "" "Like strings (and all other built-in :term:`sequence` types), lists can be " "indexed and sliced::" msgstr "" "文字列 (や他の全ての組み込みの :term:`シーケンス ` 型) のように、リ" "ストはインデックスやスライスができます::" #: ../../tutorial/introduction.rst:399 msgid "" ">>> squares[0] # indexing returns the item\n" "1\n" ">>> squares[-1]\n" "25\n" ">>> squares[-3:] # slicing returns a new list\n" "[9, 16, 25]" msgstr "" ">>> squares[0] # インデックス指定は要素を返す\n" "1\n" ">>> squares[-1]\n" "25\n" ">>> squares[-3:] # スライスは新しいリストを返す\n" "[9, 16, 25]" #: ../../tutorial/introduction.rst:406 msgid "Lists also support operations like concatenation::" msgstr "リストは、リストの連結などもサポートしています::" #: ../../tutorial/introduction.rst:408 msgid "" ">>> squares + [36, 49, 64, 81, 100]\n" "[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]" msgstr "" ">>> squares + [36, 49, 64, 81, 100]\n" "[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]" #: ../../tutorial/introduction.rst:411 msgid "" "Unlike strings, which are :term:`immutable`, lists are a :term:`mutable` " "type, i.e. it is possible to change their content::" msgstr "" ":term:`不変 ` な文字列とは違って、リストは :term:`可変 ` " "型ですので、要素を入れ替えられます::" #: ../../tutorial/introduction.rst:414 msgid "" ">>> cubes = [1, 8, 27, 65, 125] # something's wrong here\n" ">>> 4 ** 3 # the cube of 4 is 64, not 65!\n" "64\n" ">>> cubes[3] = 64 # replace the wrong value\n" ">>> cubes\n" "[1, 8, 27, 64, 125]" msgstr "" ">>> cubes = [1, 8, 27, 65, 125] # 何かがおかしい\n" ">>> 4 ** 3 # 4の3乗は65ではなく64!\n" "64\n" ">>> cubes[3] = 64 # 誤った値を置き換える\n" ">>> cubes\n" "[1, 8, 27, 64, 125]" #: ../../tutorial/introduction.rst:421 msgid "" "You can also add new items at the end of the list, by using the :meth:`!list." "append` *method* (we will see more about methods later)::" msgstr "" ":meth:`!list.append` を使って、リストの末尾に新しい要素を追加できます (このメ" "ソッドについては後で詳しく見ていきます)::" #: ../../tutorial/introduction.rst:424 msgid "" ">>> cubes.append(216) # add the cube of 6\n" ">>> cubes.append(7 ** 3) # and the cube of 7\n" ">>> cubes\n" "[1, 8, 27, 64, 125, 216, 343]" msgstr "" ">>> cubes.append(216) # 6の3乗を追加\n" ">>> cubes.append(7 ** 3) # 7の3乗を追加\n" ">>> cubes\n" "[1, 8, 27, 64, 125, 216, 343]" #: ../../tutorial/introduction.rst:429 msgid "" "Simple assignment in Python never copies data. When you assign a list to a " "variable, the variable refers to the *existing list*. Any changes you make " "to the list through one variable will be seen through all other variables " "that refer to it.::" msgstr "" "単純な代入ではPythonは決してデータをコピーしません。リストを変数に代入する" "と、その変数は *既存のリスト* を参照します。ある変数を通してリストに任意の変" "更を行うと、そのリストを参照したすべての他の変数を通して確認できます。::" #: ../../tutorial/introduction.rst:434 msgid "" ">>> rgb = [\"Red\", \"Green\", \"Blue\"]\n" ">>> rgba = rgb\n" ">>> id(rgb) == id(rgba) # they reference the same object\n" "True\n" ">>> rgba.append(\"Alph\")\n" ">>> rgb\n" "[\"Red\", \"Green\", \"Blue\", \"Alph\"]" msgstr "" ">>> rgb = [\"Red\", \"Green\", \"Blue\"]\n" ">>> rgba = rgb\n" ">>> id(rgb) == id(rgba) # 同じオブジェクトを参照している\n" "True\n" ">>> rgba.append(\"Alph\")\n" ">>> rgb\n" "[\"Red\", \"Green\", \"Blue\", \"Alph\"]" #: ../../tutorial/introduction.rst:442 msgid "" "All slice operations return a new list containing the requested elements. " "This means that the following slice returns a :ref:`shallow copy " "` of the list::" msgstr "" "全てのスライス操作は、指定された要素を含む新しいリストを返します。例えば、次" "のスライスは、リストの :ref:`浅いコピー ` を返しま" "す。::" #: ../../tutorial/introduction.rst:446 msgid "" ">>> correct_rgba = rgba[:]\n" ">>> correct_rgba[-1] = \"Alpha\"\n" ">>> correct_rgba\n" "[\"Red\", \"Green\", \"Blue\", \"Alpha\"]\n" ">>> rgba\n" "[\"Red\", \"Green\", \"Blue\", \"Alph\"]" msgstr "" ">>> correct_rgba = rgba[:]\n" ">>> correct_rgba[-1] = \"Alpha\"\n" ">>> correct_rgba\n" "[\"Red\", \"Green\", \"Blue\", \"Alpha\"]\n" ">>> rgba\n" "[\"Red\", \"Green\", \"Blue\", \"Alph\"]" #: ../../tutorial/introduction.rst:453 msgid "" "Assignment to slices is also possible, and this can even change the size of " "the list or clear it entirely::" msgstr "" "スライスには、代入もできます。スライスの代入で、リストのサイズを変更したり、" "全てを削除したりもできます::" #: ../../tutorial/introduction.rst:456 msgid "" ">>> letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g']\n" ">>> letters\n" "['a', 'b', 'c', 'd', 'e', 'f', 'g']\n" ">>> # replace some values\n" ">>> letters[2:5] = ['C', 'D', 'E']\n" ">>> letters\n" "['a', 'b', 'C', 'D', 'E', 'f', 'g']\n" ">>> # now remove them\n" ">>> letters[2:5] = []\n" ">>> letters\n" "['a', 'b', 'f', 'g']\n" ">>> # clear the list by replacing all the elements with an empty list\n" ">>> letters[:] = []\n" ">>> letters\n" "[]" msgstr "" ">>> letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g']\n" ">>> letters\n" "['a', 'b', 'c', 'd', 'e', 'f', 'g']\n" ">>> # 一部の値を置き換える\n" ">>> letters[2:5] = ['C', 'D', 'E']\n" ">>> letters\n" "['a', 'b', 'C', 'D', 'E', 'f', 'g']\n" ">>> # 一部の値を削除する\n" ">>> letters[2:5] = []\n" ">>> letters\n" "['a', 'b', 'f', 'g']\n" ">>> # 要素全体を空のリストに置き換えてリストをクリアする\n" ">>> letters[:] = []\n" ">>> letters\n" "[]" #: ../../tutorial/introduction.rst:472 msgid "The built-in function :func:`len` also applies to lists::" msgstr "組込み関数 :func:`len` はリストにも使えます::" #: ../../tutorial/introduction.rst:474 msgid "" ">>> letters = ['a', 'b', 'c', 'd']\n" ">>> len(letters)\n" "4" msgstr "" ">>> letters = ['a', 'b', 'c', 'd']\n" ">>> len(letters)\n" "4" #: ../../tutorial/introduction.rst:478 msgid "" "It is possible to nest lists (create lists containing other lists), for " "example::" msgstr "リストを入れ子 (ほかのリストを含むリストを造る) にできます。例えば::" #: ../../tutorial/introduction.rst:481 msgid "" ">>> a = ['a', 'b', 'c']\n" ">>> n = [1, 2, 3]\n" ">>> x = [a, n]\n" ">>> x\n" "[['a', 'b', 'c'], [1, 2, 3]]\n" ">>> x[0]\n" "['a', 'b', 'c']\n" ">>> x[0][1]\n" "'b'" msgstr "" ">>> a = ['a', 'b', 'c']\n" ">>> n = [1, 2, 3]\n" ">>> x = [a, n]\n" ">>> x\n" "[['a', 'b', 'c'], [1, 2, 3]]\n" ">>> x[0]\n" "['a', 'b', 'c']\n" ">>> x[0][1]\n" "'b'" #: ../../tutorial/introduction.rst:494 msgid "First Steps Towards Programming" msgstr "プログラミングへの第一歩" #: ../../tutorial/introduction.rst:496 msgid "" "Of course, we can use Python for more complicated tasks than adding two and " "two together. For instance, we can write an initial sub-sequence of the " "`Fibonacci series `_ as " "follows::" msgstr "" "もちろん、2 たす 2 よりももっと複雑な課題にも Python を使えます。\n" "例えば、`Fibonacci series `_ の先頭の部分列は次のように書けます::" #: ../../tutorial/introduction.rst:501 msgid "" ">>> # Fibonacci series:\n" ">>> # the sum of two elements defines the next\n" ">>> a, b = 0, 1\n" ">>> while a < 10:\n" "... print(a)\n" "... a, b = b, a+b\n" "...\n" "0\n" "1\n" "1\n" "2\n" "3\n" "5\n" "8" msgstr "" ">>> # フィボナッチ数列:\n" ">>> # 2つの要素の和で次の値を定義する\n" ">>> a, b = 0, 1\n" ">>> while a < 10:\n" "... print(a)\n" "... a, b = b, a+b\n" "...\n" "0\n" "1\n" "1\n" "2\n" "3\n" "5\n" "8" #: ../../tutorial/introduction.rst:516 msgid "This example introduces several new features." msgstr "上の例では、いくつか新しい機能を使用しています。" #: ../../tutorial/introduction.rst:518 msgid "" "The first line contains a *multiple assignment*: the variables ``a`` and " "``b`` simultaneously get the new values 0 and 1. On the last line this is " "used again, demonstrating that the expressions on the right-hand side are " "all evaluated first before any of the assignments take place. The right-" "hand side expressions are evaluated from the left to the right." msgstr "" "最初の行には *複数同時の代入 (multiple assignment)* が入っています: 変数 " "``a`` と ``b`` は、それぞれ同時に新しい値 0 と 1 になっています。この代入は、" "最後の行でも使われています。代入文では、まず右辺の式がすべて評価され、次に代" "入が行われます。右辺の式は、左から右へと順番に評価されます。" #: ../../tutorial/introduction.rst:524 msgid "" "The :keyword:`while` loop executes as long as the condition (here: ``a < " "10``) remains true. In Python, like in C, any non-zero integer value is " "true; zero is false. The condition may also be a string or list value, in " "fact any sequence; anything with a non-zero length is true, empty sequences " "are false. The test used in the example is a simple comparison. The " "standard comparison operators are written the same as in C: ``<`` (less " "than), ``>`` (greater than), ``==`` (equal to), ``<=`` (less than or equal " "to), ``>=`` (greater than or equal to) and ``!=`` (not equal to)." msgstr "" ":keyword:`while` は、条件 (ここでは `` a < 10``) が真である限り実行を繰り返" "し (ループし) ます。Python では、C 言語と同様に、ゼロでない整数値は真となり、" "ゼロは偽です。条件式には、文字列値やリスト値なども使えます。それ以外のシーケ" "ンスも、条件式として使用できます。長さが 1 以上のシーケンスは真で、空のシーケ" "ンスは偽になります。サンプルで使われている条件テストはシンプルな比較です。標" "準的な比較演算子は C 言語と同様です: すなわち、 ``<`` (より小さい)、 ``>`` " "(より大きい)、 ``==`` (等しい)、 ``<=`` (より小さいか等しい)、 ``>=`` (より大" "きいか等しい)、および ``!=`` (等しくない)、です。" #: ../../tutorial/introduction.rst:533 msgid "" "The *body* of the loop is *indented*: indentation is Python's way of " "grouping statements. At the interactive prompt, you have to type a tab or " "space(s) for each indented line. In practice you will prepare more " "complicated input for Python with a text editor; all decent text editors " "have an auto-indent facility. When a compound statement is entered " "interactively, it must be followed by a blank line to indicate completion " "(since the parser cannot guess when you have typed the last line). Note " "that each line within a basic block must be indented by the same amount." msgstr "" "ループの *本体 (body)* は、 *インデント (indent, 字下げ)* されています: イン" "デントは Python において、実行文をグループにまとめる方法です。対話的プロンプ" "トでは、インデントされた各行を入力するにはタブや (複数個の) スペースを使わな" "ければなりません。実用的には、もっと複雑な処理を入力する場合はテキストエディ" "タを使うことになるでしょう。 ほとんどのテキストエディタは、自動インデント機能" "を持っています。複合文を対話的に入力するときには、入力完了のしるしとして最後" "に空行を入力します。これは、パーザはどれが最後の行を入力なのか、判断できない" "ためです。基本的なブロック内では、全ての行は同じだけインデントされていなけれ" "ばならないので注意してください。" #: ../../tutorial/introduction.rst:542 msgid "" "The :func:`print` function writes the value of the argument(s) it is given. " "It differs from just writing the expression you want to write (as we did " "earlier in the calculator examples) in the way it handles multiple " "arguments, floating-point quantities, and strings. Strings are printed " "without quotes, and a space is inserted between items, so you can format " "things nicely, like this::" msgstr "" ":func:`print` 関数は、与えられた引数の値を書き出します。これは (前に電卓の例" "でやったような) 単に出力したい式を書くのとは、複数の引数や浮動小数点量や文字" "列に対する扱い方が違います。:func:`print` 関数では、文字列は引用符無しで出力" "され、要素の間に空白が挿入されて、このように出力の書式が整えられます::" #: ../../tutorial/introduction.rst:549 msgid "" ">>> i = 256*256\n" ">>> print('The value of i is', i)\n" "The value of i is 65536" msgstr "" ">>> i = 256*256\n" ">>> print('The value of i is', i)\n" "The value of i is 65536" #: ../../tutorial/introduction.rst:553 msgid "" "The keyword argument *end* can be used to avoid the newline after the " "output, or end the output with a different string::" msgstr "" "キーワード引数 *end* を使うと、出力の末尾に改行文字を出力しないようにしたり、" "別の文字列を末尾に出力したりできます::" #: ../../tutorial/introduction.rst:556 msgid "" ">>> a, b = 0, 1\n" ">>> while a < 1000:\n" "... print(a, end=',')\n" "... a, b = b, a+b\n" "...\n" "0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987," msgstr "" ">>> a, b = 0, 1\n" ">>> while a < 1000:\n" "... print(a, end=',')\n" "... a, b = b, a+b\n" "...\n" "0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987," #: ../../tutorial/introduction.rst:565 msgid "Footnotes" msgstr "脚注" #: ../../tutorial/introduction.rst:566 msgid "" "Since ``**`` has higher precedence than ``-``, ``-3**2`` will be interpreted " "as ``-(3**2)`` and thus result in ``-9``. To avoid this and get ``9``, you " "can use ``(-3)**2``." msgstr "" "``**`` は ``-`` より優先順位が高いので、``-3**2`` は ``-(3**2)`` と解釈され、" "計算結果は ``-9`` になります。これを避けて ``9`` を得たければ、``(-3)**2`` と" "書きます。" #: ../../tutorial/introduction.rst:570 msgid "" "Unlike other languages, special characters such as ``\\n`` have the same " "meaning with both single (``'...'``) and double (``\"...\"``) quotes. The " "only difference between the two is that within single quotes you don't need " "to escape ``\"`` (but you have to escape ``\\'``) and vice versa." msgstr "" "他の言語と違って、``\\n`` のような特殊文字は、単引用符 (``'...'``) と二重引用" "符 (``\"...\"``) で同じ意味を持ちます。両者の唯一の違いは、単引用符で囲われた" "箇所では ``\"`` をエスケープする必要がない (ただし ``\\'`` はエスケープする必" "要がある) ことで、逆もまた同様です。" #: ../../tutorial/introduction.rst:21 msgid "# (hash)" msgstr "# (hash)" #: ../../tutorial/introduction.rst:21 msgid "comment" msgstr "コメント"