-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathintroduction.po
553 lines (480 loc) · 31 KB
/
introduction.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2018, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-30 05:56+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Osamu NAKAMURA, 2017\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:14
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:22
msgid "Some examples::"
msgstr "いくつかの例です::"
#: ../../tutorial/introduction.rst:33
msgid "Using Python as a Calculator"
msgstr "Python を電卓として使う"
#: ../../tutorial/introduction.rst:35
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:42
msgid "Numbers"
msgstr "数"
#: ../../tutorial/introduction.rst:44
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:59
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:63
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:77
msgid ""
"With Python, it is possible to use the ``**`` operator to calculate powers "
"[#]_::"
msgstr "Python では、冪乗を計算するのに ``**`` 演算子が使えます [#]_::"
#: ../../tutorial/introduction.rst:84
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:92
msgid ""
"If a variable is not \"defined\" (assigned a value), trying to use it will "
"give you an error::"
msgstr "変数が \"定義\" されていない (つまり値が代入されていない) 場合、その変数を使おうとするとエラーが発生します::"
#: ../../tutorial/introduction.rst:100
msgid ""
"There is full support for floating point; operators with mixed type operands"
" convert the integer operand to floating point::"
msgstr ""
"浮動小数点を完全にサポートしています。演算対象の値(オペランド)に複数の型が入り混じっている場合、演算子は整数のオペランドを浮動小数点型に変換します::"
#: ../../tutorial/introduction.rst:106
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 ""
"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:123
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 <typesnumeric>`, 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:`複素数 <typesnumeric>` "
"も組み込み型としてサポートしており、 ``j`` もしくは ``J`` 接尾辞を使って虚部を示します (例: ``3+5j``)。"
#: ../../tutorial/introduction.rst:133
msgid "Strings"
msgstr "文字列型 (string)"
#: ../../tutorial/introduction.rst:135
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:153
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:173
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:183
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:194
msgid ""
"produces the following output (note that the initial newline is not "
"included):"
msgstr "は次のような出力になります (最初の改行文字は含まれていないことに注意してください):"
#: ../../tutorial/introduction.rst:202
msgid ""
"Strings can be concatenated (glued together) with the ``+`` operator, and "
"repeated with ``*``::"
msgstr "文字列は ``+`` 演算子で連結させる (くっつけて一つにする) ことができ、``*`` 演算子で反復させることができます::"
#: ../../tutorial/introduction.rst:209
msgid ""
"Two or more *string literals* (i.e. the ones enclosed between quotes) next "
"to each other are automatically concatenated. ::"
msgstr "連続して並んでいる複数の *文字列リテラル* (つまり、引用符に囲われた文字列) は、自動的に連結されます。 ::"
#: ../../tutorial/introduction.rst:215
msgid ""
"This feature is particularly useful when you want to break long strings::"
msgstr "この機能は、長い文字列を改行したいときにとても役に立ちます::"
#: ../../tutorial/introduction.rst:222
msgid ""
"This only works with two literals though, not with variables or "
"expressions::"
msgstr "これは 2 つのリテラルどうしに対してのみ働き、変数や式には働きません::"
#: ../../tutorial/introduction.rst:232
msgid ""
"If you want to concatenate variables or a variable and a literal, use "
"``+``::"
msgstr "変数どうしや変数とリテラルを連結したい場合は、``+`` を使ってください::"
#: ../../tutorial/introduction.rst:237
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:247
msgid ""
"Indices may also be negative numbers, to start counting from the right::"
msgstr "インデックスには、負の値も指定できまます。この場合、右から数えていきます::"
#: ../../tutorial/introduction.rst:256
msgid "Note that since -0 is the same as 0, negative indices start from -1."
msgstr "-0 は 0 と区別できないので、負のインデックスは -1 から始まります。"
#: ../../tutorial/introduction.rst:258
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:266
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:274
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:284
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:295
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:300
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:304
msgid "Attempting to use an index that is too large will result in an error::"
msgstr "大き過ぎるインデックスを使おうとするとエラーが発生します::"
#: ../../tutorial/introduction.rst:311
msgid ""
"However, out of range slice indexes are handled gracefully when used for "
"slicing::"
msgstr "しかし、スライスで範囲外のインデックスを使ったときは、上手く対応して扱ってくれます::"
#: ../../tutorial/introduction.rst:319
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:`immutable`) "
"です。従って、文字列のインデックスで指定したある場所に代入を行うとエラーが発生します::"
#: ../../tutorial/introduction.rst:329
msgid "If you need a different string, you should create a new one::"
msgstr "元の文字列と別の文字列が必要な場合は、新しく文字列を作成してください::"
#: ../../tutorial/introduction.rst:336
msgid "The built-in function :func:`len` returns the length of a string::"
msgstr "組込み関数 :func:`len` は文字列の長さ (length) を返します::"
#: ../../tutorial/introduction.rst:347
msgid ":ref:`textseq`"
msgstr ":ref:`textseq`"
#: ../../tutorial/introduction.rst:346
msgid ""
"Strings are examples of *sequence types*, and support the common operations "
"supported by such types."
msgstr "文字列は代表的な *シーケンス型* で、シーケンス型でサポートされている共通の操作をサポートしています。"
#: ../../tutorial/introduction.rst:351
msgid ":ref:`string-methods`"
msgstr ":ref:`string-methods`"
#: ../../tutorial/introduction.rst:350
msgid ""
"Strings support a large number of methods for basic transformations and "
"searching."
msgstr "文字列は、基本的な変換や検索を行うための数多くのメソッドをサポートしています。"
#: ../../tutorial/introduction.rst:354
msgid ":ref:`f-strings`"
msgstr ":ref:`f-strings`"
#: ../../tutorial/introduction.rst:354
msgid "String literals that have embedded expressions."
msgstr "式の埋め込みをサポートした文字列リテラル"
#: ../../tutorial/introduction.rst:357
msgid ":ref:`formatstrings`"
msgstr ":ref:`formatstrings`"
#: ../../tutorial/introduction.rst:357
msgid "Information about string formatting with :meth:`str.format`."
msgstr ":meth:`str.format` を使った文字列のフォーマットについての情報があります。"
#: ../../tutorial/introduction.rst:360
msgid ":ref:`old-string-formatting`"
msgstr ":ref:`old-string-formatting`"
#: ../../tutorial/introduction.rst:360
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:367
msgid "Lists"
msgstr "リスト型 (list)"
#: ../../tutorial/introduction.rst:369
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:378
msgid ""
"Like strings (and all other built-in :term:`sequence` type), lists can be "
"indexed and sliced::"
msgstr ""
"文字列 (や他の全ての組み込みのシーケンス (:term:`sequence`) 型) のように、リストはインデックスやスライスができます::"
#: ../../tutorial/introduction.rst:388
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:394
msgid "Lists also support operations like concatenation::"
msgstr "リストは、リストの連結などもサポートしています::"
#: ../../tutorial/introduction.rst:399
msgid ""
"Unlike strings, which are :term:`immutable`, lists are a :term:`mutable` "
"type, i.e. it is possible to change their content::"
msgstr ""
"不変 (:term:`immutable`) な文字列とは違って、リストは可変 (:term:`mutable`) "
"型ですので、要素を入れ替えられます。::"
#: ../../tutorial/introduction.rst:409
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:417
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:436
msgid "The built-in function :func:`len` also applies to lists::"
msgstr "組込み関数 :func:`len` はリストにも使えます::"
#: ../../tutorial/introduction.rst:442
msgid ""
"It is possible to nest lists (create lists containing other lists), for "
"example::"
msgstr "リストを入れ子 (ほかのリストを含むリストを造る) にできます。例えば::"
#: ../../tutorial/introduction.rst:458
msgid "First Steps Towards Programming"
msgstr "プログラミングへの第一歩"
#: ../../tutorial/introduction.rst:460
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 <https://en.wikipedia.org/wiki/Fibonacci_number>`_ as "
"follows::"
msgstr ""
"もちろん、2 たす 2 よりももっと複雑な課題にも Python を使えます。\n"
"例えば、`Fibonacci 数列 <https://en.wikipedia.org/wiki/Fibonacci_number>`_ の先頭の部分列は次のように書けます::"
#: ../../tutorial/introduction.rst:480
msgid "This example introduces several new features."
msgstr "上の例では、いくつか新しい機能を使用しています。"
#: ../../tutorial/introduction.rst:482
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:488
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:497
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:506
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:517
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:529
msgid "Footnotes"
msgstr "脚注"
#: ../../tutorial/introduction.rst:530
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:534
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`` のような特殊文字は、単引用符 (``'...'``) と二重引用符 (``\"...\"``) "
"で同じ意味を持ちます。両者の唯一の違いは、単引用符で囲われた箇所では ``\"`` をエスケープする必要がない (ただし ``\\'`` "
"はエスケープする必要がある) ことで、逆もまた同様です。"