-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathintroduction.po
629 lines (556 loc) · 31.2 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
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2020, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# tomo, 2018
# Atsuo Ishimoto <[email protected]>, 2018
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-09 18:48+0900\n"
"PO-Revision-Date: 2018-06-29 17:18+0000\n"
"Last-Translator: Atsuo Ishimoto <[email protected]>, 2018\n"
"Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/"
"ja/)\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\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 "
"<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` などの他の数値型もサポートしています。 "
"Python はビルトインで :ref:`複素数 <typesnumeric>` もサポートし、 ``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:234
msgid ""
"If you want to concatenate variables or a variable and a literal, use ``+``::"
msgstr "変数どうしや変数とリテラルを連結したい場合は、``+`` を使ってください::"
#: ../../tutorial/introduction.rst:239
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:249
msgid ""
"Indices may also be negative numbers, to start counting from the right::"
msgstr ""
"インデックスには、負の値も指定できまます。この場合、右から数えていきます::"
#: ../../tutorial/introduction.rst:258
msgid "Note that since -0 is the same as 0, negative indices start from -1."
msgstr "-0 は 0 と区別できないので、負のインデックスは -1 から始まります。"
#: ../../tutorial/introduction.rst:260
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:268
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:276
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:286
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:297
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:302
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:306
msgid "Attempting to use an index that is too large will result in an error::"
msgstr "大き過ぎるインデックスを使おうとするとエラーが発生します::"
#: ../../tutorial/introduction.rst:313
msgid ""
"However, out of range slice indexes are handled gracefully when used for "
"slicing::"
msgstr ""
"しかし、スライスで範囲外のインデックスを使ったときは、上手く対応して扱ってく"
"れます::"
#: ../../tutorial/introduction.rst:321
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:331
msgid "If you need a different string, you should create a new one::"
msgstr "元の文字列と別の文字列が必要な場合は、新しく文字列を作成してください::"
#: ../../tutorial/introduction.rst:338
msgid "The built-in function :func:`len` returns the length of a string::"
msgstr "組込み関数 :func:`len` は文字列の長さ (length) を返します::"
#: ../../tutorial/introduction.rst:349
msgid ":ref:`textseq`"
msgstr ":ref:`textseq`"
#: ../../tutorial/introduction.rst:348
msgid ""
"Strings are examples of *sequence types*, and support the common operations "
"supported by such types."
msgstr ""
"文字列は代表的な *シーケンス型* で、シーケンス型でサポートされている共通の操"
"作をサポートしています。"
#: ../../tutorial/introduction.rst:353
msgid ":ref:`string-methods`"
msgstr ":ref:`string-methods`"
#: ../../tutorial/introduction.rst:352
msgid ""
"Strings support a large number of methods for basic transformations and "
"searching."
msgstr ""
"文字列は、基本的な変換や検索を行うための数多くのメソッドをサポートしていま"
"す。"
#: ../../tutorial/introduction.rst:356
msgid ":ref:`f-strings`"
msgstr ":ref:`f-strings`"
#: ../../tutorial/introduction.rst:356
msgid "String literals that have embedded expressions."
msgstr "式の埋め込みをサポートした文字列リテラル"
#: ../../tutorial/introduction.rst:359
msgid ":ref:`formatstrings`"
msgstr ":ref:`formatstrings`"
#: ../../tutorial/introduction.rst:359
msgid "Information about string formatting with :meth:`str.format`."
msgstr ""
":meth:`str.format` を使った文字列のフォーマットについての情報があります。"
#: ../../tutorial/introduction.rst:362
msgid ":ref:`old-string-formatting`"
msgstr ":ref:`old-string-formatting`"
#: ../../tutorial/introduction.rst:362
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:369
msgid "Lists"
msgstr "リスト型 (list)"
#: ../../tutorial/introduction.rst:371
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:380
msgid ""
"Like strings (and all other built-in :term:`sequence` type), lists can be "
"indexed and sliced::"
msgstr ""
"文字列 (や他の全ての組み込みのシーケンス (:term:`sequence`) 型) のように、リ"
"ストはインデックスやスライスができます::"
#: ../../tutorial/introduction.rst:390
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:396
msgid "Lists also support operations like concatenation::"
msgstr "リストは、リストの連結などもサポートしています::"
#: ../../tutorial/introduction.rst:401
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:411
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:419
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:438
msgid "The built-in function :func:`len` also applies to lists::"
msgstr "組込み関数 :func:`len` はリストにも使えます::"
#: ../../tutorial/introduction.rst:444
msgid ""
"It is possible to nest lists (create lists containing other lists), for "
"example::"
msgstr "リストを入れ子 (ほかのリストを含むリストを造る) にできます。例えば::"
#: ../../tutorial/introduction.rst:460
msgid "First Steps Towards Programming"
msgstr "プログラミングへの第一歩"
#: ../../tutorial/introduction.rst:462
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 を使うことができます。"
"*Fibonacci* 級数列の先頭の部分列は次のように書けます::"
#: ../../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: ``b < "
"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` は、条件 (ここでは ``b < 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`` のような特殊文字は単引用符 (``'...'``) と二重引用"
"符 (``\"...\"``) で同じ意味を持ちます。両者の唯一の違いは、単引用符で囲われた"
"箇所では ``\"`` をエスケープする必要がない (ただし ``\\'`` はエスケープする必"
"要がある) ことで、逆もまた同様です。"