# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2020, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # tomo, 2019 # Atsuo Ishimoto , 2019 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-10 22:51+0000\n" "PO-Revision-Date: 2019-09-01 02:41+0000\n" "Last-Translator: Atsuo Ishimoto , 2019\n" "Language-Team: Japanese (https://www.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 "" "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:24 msgid "Some examples::" msgstr "いくつかの例です::" #: ../../tutorial/introduction.rst:35 msgid "Using Python as a Calculator" msgstr "Python を電卓として使う" #: ../../tutorial/introduction.rst:37 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:44 msgid "Numbers" msgstr "数" #: ../../tutorial/introduction.rst:46 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 ``/`` work just like in most other " "languages (for example, Pascal or C); parentheses (``()``) can be used for " "grouping. For example::" msgstr "" "インタプリタは、簡単な電卓のように動作します: 式を入力すると、その結果が表示されます。式の文法は素直なものです: 演算子 ``+``, ``-``, " "``*``, ``/`` は (Pascal や C といった) 他のほとんどの言語と同じように動作します; 丸括弧 (``()``) " "をグループ化に使うこともできます。例えば::" #: ../../tutorial/introduction.rst:61 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:65 msgid "" "Division (``/``) always returns a float. To do :term:`floor division` and " "get an integer result (discarding any fractional result) you can use the " "``//`` operator; to calculate the remainder you can use ``%``::" msgstr "" "除算 (``/``) は常に浮動小数点数を返します。 ``//`` 演算子は :term:`整数除算` を行い、(小数部を切り捨てた) " "整数値を返します; 剰余は、``%`` で求めます。::" #: ../../tutorial/introduction.rst:79 msgid "" "With Python, it is possible to use the ``**`` operator to calculate powers " "[#]_::" msgstr "Python では、冪乗を計算するのに ``**`` 演算子が使えます [#]_::" #: ../../tutorial/introduction.rst:86 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:94 msgid "" "If a variable is not \"defined\" (assigned a value), trying to use it will " "give you an error::" msgstr "\"定義\" されていない (つまり値が代入されていない) 変数を使おうとすると、エラーが発生します::" #: ../../tutorial/introduction.rst:102 msgid "" "There is full support for floating point; operators with mixed type operands" " convert the integer operand to floating point::" msgstr "" "浮動小数点を完全にサポートしています。演算対象の値(オペランド)に複数の型が入り混じっている場合、演算子は整数のオペランドを浮動小数点型に変換します::" #: ../../tutorial/introduction.rst:108 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:121 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:125 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:135 msgid "Strings" msgstr "文字列型 (string)" #: ../../tutorial/introduction.rst:137 msgid "" "Besides numbers, Python can also manipulate strings, which can be expressed " "in several ways. They can be enclosed in single quotes (``'...'``) or " "double quotes (``\"...\"``) with the same result [#]_. ``\\`` can be used " "to escape quotes::" msgstr "" "Python は、数だけではなく、文字列も操作できます。文字列を記述する方法は複数あり、単引用符 (``'...'``) で囲むか、もしくは二重引用符 " "(``\"...\"``) で囲みます。結果はどちらも同じ文字列になります。[#]_ 引用符は、``\\`` でエスケープできます。::" #: ../../tutorial/introduction.rst:155 msgid "" "In the interactive interpreter, the output string is enclosed in quotes and " "special characters are escaped with backslashes. While this might sometimes" " look different from the input (the enclosing quotes could change), the two " "strings are equivalent. The string is enclosed in double quotes if the " "string contains a single quote and no double quotes, otherwise it is " "enclosed in single quotes. The :func:`print` function produces a more " "readable output, by omitting the enclosing quotes and by printing escaped " "and special characters::" msgstr "" "対話的インタプリタが文字列を出力するとき、出力文字列は引用符に囲まれ、特殊文字はバックスラッシュでエスケープされます。出力文字が入力とは違って見える (囲っている引用符が変わる) こともありますが、その 2 つの文字列は同じ文字列です。文字列が単引用符を含み二重引用符を含まない場合、二重引用符で囲われ、それ以外の場合は単引用符で囲われます。 \n" "\n" ":func:`print` 関数は、より読みやすく文字列を出力します。:func:`print` 関数は文字列の引用符を取り除き、エスケープされた特殊文字を出力します。::" #: ../../tutorial/introduction.rst:175 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:185 msgid "" "String literals can span multiple lines. One way is using triple-quotes: " "``\"\"\"...\"\"\"`` or ``'''...'''``. End of lines are automatically " "included in the string, but it's possible to prevent this by adding a ``\\``" " at the end of the line. The following example::" msgstr "" "文字列リテラルは複数行にまたがって書けます。1 つの方法は三連引用符 (``\"\"\"...\"\"\"`` や ``'''...'''``) " "を使うことです。改行文字は自動的に文字列に含まれますが、行末に ``\\`` を付けることで含めないようにすることもできます。次の例::" #: ../../tutorial/introduction.rst:196 msgid "" "produces the following output (note that the initial newline is not " "included):" msgstr "は次のような出力になります (最初の改行文字は含まれていないことに注意してください):" #: ../../tutorial/introduction.rst:204 msgid "" "Strings can be concatenated (glued together) with the ``+`` operator, and " "repeated with ``*``::" msgstr "文字列は ``+`` 演算子で連結させる (くっつけて一つにする) ことができ、``*`` 演算子で反復させることができます::" #: ../../tutorial/introduction.rst:211 msgid "" "Two or more *string literals* (i.e. the ones enclosed between quotes) next " "to each other are automatically concatenated. ::" msgstr "連続して並んでいる複数の *文字列リテラル* (つまり、引用符に囲われた文字列) は、自動的に連結されます。 ::" #: ../../tutorial/introduction.rst:217 msgid "" "This feature is particularly useful when you want to break long strings::" msgstr "この機能は、長い文字列を改行したいときにとても役に立ちます::" #: ../../tutorial/introduction.rst:224 msgid "" "This only works with two literals though, not with variables or " "expressions::" msgstr "これは 2 つのリテラルどうしに対してのみ働き、変数や式には働きません::" #: ../../tutorial/introduction.rst:238 msgid "" "If you want to concatenate variables or a variable and a literal, use " "``+``::" msgstr "変数どうしや変数とリテラルを連結したい場合は、``+`` を使ってください::" #: ../../tutorial/introduction.rst:243 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:253 msgid "" "Indices may also be negative numbers, to start counting from the right::" msgstr "インデックスには、負の値も指定できまます。この場合、右から数えていきます::" #: ../../tutorial/introduction.rst:262 msgid "Note that since -0 is the same as 0, negative indices start from -1." msgstr "-0 は 0 と区別できないので、負のインデックスは -1 から始まります。" #: ../../tutorial/introduction.rst:264 msgid "" "In addition to indexing, *slicing* is also supported. While indexing is " "used to obtain individual characters, *slicing* allows you to obtain " "substring::" msgstr "" "インデックスに加え、*スライス* もサポートされています。インデックスは一文字づつ取得するのに使いますが、*スライス* は部分文字列を取得します::" #: ../../tutorial/introduction.rst:272 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:280 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:290 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:301 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:306 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:310 msgid "Attempting to use an index that is too large will result in an error::" msgstr "大き過ぎるインデックスを使おうとするとエラーが発生します::" #: ../../tutorial/introduction.rst:317 msgid "" "However, out of range slice indexes are handled gracefully when used for " "slicing::" msgstr "しかし、スライスで範囲外のインデックスを使ったときは、上手く対応して扱ってくれます::" #: ../../tutorial/introduction.rst:325 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:337 msgid "If you need a different string, you should create a new one::" msgstr "元の文字列と別の文字列が必要な場合は、新しく文字列を作成してください::" #: ../../tutorial/introduction.rst:344 msgid "The built-in function :func:`len` returns the length of a string::" msgstr "組込み関数 :func:`len` は文字列の長さ (length) を返します::" #: ../../tutorial/introduction.rst:355 msgid ":ref:`textseq`" msgstr ":ref:`textseq`" #: ../../tutorial/introduction.rst:354 msgid "" "Strings are examples of *sequence types*, and support the common operations " "supported by such types." msgstr "文字列は代表的な *シーケンス型* で、シーケンス型でサポートされている共通の操作をサポートしています。" #: ../../tutorial/introduction.rst:359 msgid ":ref:`string-methods`" msgstr ":ref:`string-methods`" #: ../../tutorial/introduction.rst:358 msgid "" "Strings support a large number of methods for basic transformations and " "searching." msgstr "文字列は、基本的な変換や検索を行うための数多くのメソッドをサポートしています。" #: ../../tutorial/introduction.rst:362 msgid ":ref:`f-strings`" msgstr ":ref:`f-strings`" #: ../../tutorial/introduction.rst:362 msgid "String literals that have embedded expressions." msgstr "式の埋め込みをサポートした文字列リテラル" #: ../../tutorial/introduction.rst:365 msgid ":ref:`formatstrings`" msgstr ":ref:`formatstrings`" #: ../../tutorial/introduction.rst:365 msgid "Information about string formatting with :meth:`str.format`." msgstr ":meth:`str.format` を使った文字列のフォーマットについての情報があります。" #: ../../tutorial/introduction.rst:368 msgid ":ref:`old-string-formatting`" msgstr ":ref:`old-string-formatting`" #: ../../tutorial/introduction.rst:368 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:375 msgid "Lists" msgstr "リスト型 (list)" #: ../../tutorial/introduction.rst:377 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:386 msgid "" "Like strings (and all other built-in :term:`sequence` types), lists can be " "indexed and sliced::" msgstr "" "文字列 (や他の全ての組み込みの :term:` シーケンス ` 型) のように、リストはインデックスやスライスができます::" #: ../../tutorial/introduction.rst:396 msgid "" "All slice operations return a new list containing the requested elements. " "This means that the following slice returns a new (shallow) copy of the " "list::" msgstr "全てのスライス操作は、指定された要素を含む新しいリストを返します。例えば、次のスライスは、リストの新しい (浅い) コピーを返します。::" #: ../../tutorial/introduction.rst:402 msgid "Lists also support operations like concatenation::" msgstr "リストは、リストの連結などもサポートしています::" #: ../../tutorial/introduction.rst:407 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:417 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:425 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:444 msgid "The built-in function :func:`len` also applies to lists::" msgstr "組込み関数 :func:`len` はリストにも使えます::" #: ../../tutorial/introduction.rst:450 msgid "" "It is possible to nest lists (create lists containing other lists), for " "example::" msgstr "リストを入れ子 (ほかのリストを含むリストを造る) にできます。例えば::" #: ../../tutorial/introduction.rst:466 msgid "First Steps Towards Programming" msgstr "プログラミングへの第一歩" #: ../../tutorial/introduction.rst:468 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 数列 `_ の先頭の部分列は次のように書けます::" #: ../../tutorial/introduction.rst:488 msgid "This example introduces several new features." msgstr "上の例では、いくつか新しい機能を使用しています。" #: ../../tutorial/introduction.rst:490 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:496 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:505 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:514 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:525 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:537 msgid "Footnotes" msgstr "脚注" #: ../../tutorial/introduction.rst:538 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:542 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`` のような特殊文字は、単引用符 (``'...'``) と二重引用符 (``\"...\"``) " "で同じ意味を持ちます。両者の唯一の違いは、単引用符で囲われた箇所では ``\"`` をエスケープする必要がない (ただし ``\\'`` " "はエスケープする必要がある) ことで、逆もまた同様です。"