-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy path2.0.po
2258 lines (2051 loc) · 118 KB
/
2.0.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
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# tomo, 2021
# Mikami Akiko, 2021
# Taichi Haradaguchi, 2024
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-07 14:17+0000\n"
"PO-Revision-Date: 2021-06-28 01:51+0000\n"
"Last-Translator: Taichi Haradaguchi, 2024\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"
#: ../../whatsnew/2.0.rst:3
msgid "What's New in Python 2.0"
msgstr "What's New in Python 2.0"
#: ../../whatsnew/2.0.rst:0
msgid "Author"
msgstr "著者"
#: ../../whatsnew/2.0.rst:5
msgid "A.M. Kuchling and Moshe Zadka"
msgstr "A.M. Kuchling and Moshe Zadka"
#: ../../whatsnew/2.0.rst:13
msgid "Introduction"
msgstr "はじめに"
#: ../../whatsnew/2.0.rst:15
msgid ""
"A new release of Python, version 2.0, was released on October 16, 2000. This "
"article covers the exciting new features in 2.0, highlights some other "
"useful changes, and points out a few incompatible changes that may require "
"rewriting code."
msgstr ""
"新 Python リリース、バージョン 2.0 は、2000 年 10 月 16 日にリリースされまし"
"た。この記事では 2.0 のエキサイティングな新機能をカバーし、いくつかの有用な変"
"更点をハイライトし、少しの、コードの書き換えを要する互換性のない変更点につい"
"て指摘します。"
#: ../../whatsnew/2.0.rst:20
msgid ""
"Python's development never completely stops between releases, and a steady "
"flow of bug fixes and improvements are always being submitted. A host of "
"minor fixes, a few optimizations, additional docstrings, and better error "
"messages went into 2.0; to list them all would be impossible, but they're "
"certainly significant. Consult the publicly available CVS logs if you want "
"to see the full list. This progress is due to the five developers working "
"for PythonLabs are now getting paid to spend their days fixing bugs, and "
"also due to the improved communication resulting from moving to SourceForge."
msgstr ""
"Python の開発は、リリースとリリースの間で止まることはなく、バグフィックスと改"
"善はとめどなく、日夜提出されます。多くのマイナーフィックス、少しの最適化、ド"
"キュメンテーション文字列の追加、より良いエラーメッセージが 2.0 に仲間入りしま"
"した。これら全てを列挙するのは不可能ですが、それは確かに大事でしょう、全ての"
"リストを見たければ、公に入手可能な CVS ログを調べてください。この前進は、今や"
"バグ修正に日々を費やすことで報酬を受け取って PythonLabs のために働く 5 人の開"
"発者、それと SourceForge に移行した結果改善されたコミュニケーションのおかげで"
"す。"
#: ../../whatsnew/2.0.rst:33
msgid "What About Python 1.6?"
msgstr "Python 1.6 はいかがですか?"
#: ../../whatsnew/2.0.rst:35
msgid ""
"Python 1.6 can be thought of as the Contractual Obligations Python release. "
"After the core development team left CNRI in May 2000, CNRI requested that a "
"1.6 release be created, containing all the work on Python that had been "
"performed at CNRI. Python 1.6 therefore represents the state of the CVS "
"tree as of May 2000, with the most significant new feature being Unicode "
"support. Development continued after May, of course, so the 1.6 tree "
"received a few fixes to ensure that it's forward-compatible with Python "
"2.0. 1.6 is therefore part of Python's evolution, and not a side branch."
msgstr ""
"Python 1.6 は「推定的義務」の Python リリースと考えることが出来ます。2000 年 "
"5 月にコア開発チームが CNRI を離れたあと、CNRI は Python にかかる作業全てが "
"CNRI で実施されることを含む 1.6 リリースが作成されることをリクエストしまし"
"た。それゆえ Python 1.6 は、最も重要な新機能としての Unicode サポートを含む、"
"2000 年 5 月の CVS ツリーの状態と同等です。開発はもちろん 5 月以降も継続され"
"ましたので、1.6 ツリーは Python 2.0 との前方互換を保障するために少しの修正を"
"受け取りました。1.6 はですから、Python の進化の一部であり、側枝ではありませ"
"ん。"
#: ../../whatsnew/2.0.rst:44
msgid ""
"So, should you take much interest in Python 1.6? Probably not. The "
"1.6final and 2.0beta1 releases were made on the same day (September 5, "
"2000), the plan being to finalize Python 2.0 within a month or so. If you "
"have applications to maintain, there seems little point in breaking things "
"by moving to 1.6, fixing them, and then having another round of breakage "
"within a month by moving to 2.0; you're better off just going straight to "
"2.0. Most of the really interesting features described in this document are "
"only in 2.0, because a lot of work was done between May and September."
msgstr ""
"では、あなたは Python 1.6 に興味を示すべきでしょうか? おそらく答えはノーで"
"す。1.6final と 2.0beta1 のリリースは同じ日に行われ (2000 年 9 月 5 日)、"
"Python 2.0 のファイナライズはその一ヶ月かそこらで行われるよう計画されました。"
"もしあなたが保守すべきアプリケーションを持っているならば、1.6 への移行には少"
"しばかりコードの破壊を伴うようです。つまりその修正を行い、一ヶ月の間に 2.0 へ"
"の移行による別の破壊ラウンドがやってきます。直接 2.0 に移行したほうが良いで"
"しょう。このドキュメントに記載する、ほとんどの面白い機能は 2.0 のみのものであ"
"り、なぜならほとんどの作業は、5 月から 9 月の間に行われたからなのです。"
#: ../../whatsnew/2.0.rst:57
msgid "New Development Process"
msgstr "新しい開発プロセス"
#: ../../whatsnew/2.0.rst:59
msgid ""
"The most important change in Python 2.0 may not be to the code at all, but "
"to how Python is developed: in May 2000 the Python developers began using "
"the tools made available by SourceForge for storing source code, tracking "
"bug reports, and managing the queue of patch submissions. To report bugs or "
"submit patches for Python 2.0, use the bug tracking and patch manager tools "
"available from Python's project page, located at https://sourceforge.net/"
"projects/python/."
msgstr ""
"Python 2.0 における最も重要な変化はコードに対するものではまったくなくて、"
"Python がどのように開発されるのかについてでしょう: 2000 年 5 月に Python 開発"
"者たちは、ソースコード格納、バグ報告の追跡、パッチ提出の待ち行列管理のための "
"SourceForge によって利用出来るようになったツールの使用を始めました。Python "
"2.0 ではバグ報告やパッチの提出には、Python プロジェクトページで利用可能なバグ"
"トラッキングとパッチ管理ツールを使ってください。 https://sourceforge.net/"
"projects/python/ にあります(訳注: 2015 年現在の状況は What's New in Python "
"2.6 参照)。"
#: ../../whatsnew/2.0.rst:66
msgid ""
"The most important of the services now hosted at SourceForge is the Python "
"CVS tree, the version-controlled repository containing the source code for "
"Python. Previously, there were roughly 7 or so people who had write access "
"to the CVS tree, and all patches had to be inspected and checked in by one "
"of the people on this short list. Obviously, this wasn't very scalable. By "
"moving the CVS tree to SourceForge, it became possible to grant write access "
"to more people; as of September 2000 there were 27 people able to check in "
"changes, a fourfold increase. This makes possible large-scale changes that "
"wouldn't be attempted if they'd have to be filtered through the small group "
"of core developers. For example, one day Peter Schneider-Kamp took it into "
"his head to drop K&R C compatibility and convert the C source for Python to "
"ANSI C. After getting approval on the python-dev mailing list, he launched "
"into a flurry of checkins that lasted about a week, other developers joined "
"in to help, and the job was done. If there were only 5 people with write "
"access, probably that task would have been viewed as \"nice, but not worth "
"the time and effort needed\" and it would never have gotten done."
msgstr ""
"SourceForge で現在ホストされているサービスの中で最も重要なのは Python CVS ツ"
"リーで、Python のソースコードを含む、バージョンコントロールされたレポジトリで"
"す。以前までは、CVS ツリーへの書き込み許可を持つ人々が 7 人ほどいて、全ての"
"パッチはその中の一人が精査とチェックをする必要がありました。明らかにこれはス"
"ケーラブルではありませんでした。CVS ツリーを SourceForge に移動することで、よ"
"り多くの人々に書き込み許可を与えることが可能になりました; 2000 年 9 月時点"
"で、27 人の人々が変更をチェックイン出来るようになっていました。これは 4 倍の"
"増加です。これは大規模な変更、これまでであれば小さなコア開発グループによる"
"フィルタを経由しなければならないために試みられなかったような、大規模な変更を"
"可能にしています。例えばある日 Peter Schneider-Kamp は K&R C 互換を落としてし"
"まうことを思い立ち、Python の C ソースを ANSI C に変換しました。python-dev "
"メーリングリストでの承認を得たのち、彼は立て続けにチェックインを開始しておよ"
"そ一週間ほどで終わらせ、ほかの開発者たちも手助けに参加し、そして作業は完了し"
"ました。書き込み許可が 5 人だけだったならば、おそらくそのタスクはこう見做され"
"たでしょう:「素晴らしい。けれども時間と労力に見合わない」。そして決して実現す"
"ることはなかったことでしょう。"
#: ../../whatsnew/2.0.rst:83
msgid ""
"The shift to using SourceForge's services has resulted in a remarkable "
"increase in the speed of development. Patches now get submitted, commented "
"on, revised by people other than the original submitter, and bounced back "
"and forth between people until the patch is deemed worth checking in. Bugs "
"are tracked in one central location and can be assigned to a specific person "
"for fixing, and we can count the number of open bugs to measure progress. "
"This didn't come without a cost: developers now have more e-mail to deal "
"with, more mailing lists to follow, and special tools had to be written for "
"the new environment. For example, SourceForge sends default patch and bug "
"notification e-mail messages that are completely unhelpful, so Ka-Ping Yee "
"wrote an HTML screen-scraper that sends more useful messages."
msgstr ""
"SourceForge のサービスを使うことへのシフトは、開発の目覚しいスピードアップを"
"もたらしました。パッチはいまや、提出され、コメントされ、提出者以外の別人に"
"よって改定されて戻ってきて、などなどが、パッチがチェックインの価値があると判"
"断されるまで行われています。バグは唯一つの中央保管庫で追跡され、修正には特定"
"の誰かを割り当てることが出来、そして私たちはオープンバグを進捗の指標として考"
"えることが出来ます。これは代償なしでは達成しませんでした; 開発者には今や以前"
"よりもたくさんの処理すべき電子メールがあり、より多くメーリングリストに追従し"
"なければならず、そして新しい環境のための特別なツールを要しました。例えば、"
"SourceForge はデフォルトでパッチ提出とバグ報告を電子メールで通知しますが、こ"
"れは全く助けにならないもので、Ka-Ping Yee はもっと有用なメッセージを送信する"
"ための HTML スクリーンスクレイパを書きました。"
#: ../../whatsnew/2.0.rst:95
msgid ""
"The ease of adding code caused a few initial growing pains, such as code was "
"checked in before it was ready or without getting clear agreement from the "
"developer group. The approval process that has emerged is somewhat similar "
"to that used by the Apache group. Developers can vote +1, +0, -0, or -1 on a "
"patch; +1 and -1 denote acceptance or rejection, while +0 and -0 mean the "
"developer is mostly indifferent to the change, though with a slight positive "
"or negative slant. The most significant change from the Apache model is "
"that the voting is essentially advisory, letting Guido van Rossum, who has "
"Benevolent Dictator For Life status, know what the general opinion is. He "
"can still ignore the result of a vote, and approve or reject a change even "
"if the community disagrees with him."
msgstr ""
"簡単にコードを追加出来るようになったことは、当初少し苦痛を大きくしました。例"
"えばコードが不十分なままだったり、開発グループからのはっきりとした承諾のない"
"ままチェックインされたりするといったことです。浮上してきた承認プロセスは、"
"Apache グループが使っているようなものにいくらか似たものです。開発者たちは "
"+1, +0, -0, -1 というふうにパッチに投票できます; +1 と -1 は承諾、却下を表"
"し、+0 と -0 は、開発者は変更にほとんど興味がないけれどもやや肯定、否定の傾向"
"であることを意味します。Apache モデルからの最も大きな違いは、投票行為は本質的"
"に助言であって、優しい終身独裁者 Guido van Rossum 侯に大衆の民意を伝えるもの"
"であることです。彼は投票結果をそれでも無視出来ますし、コミュニティが異論を唱"
"えようが変更を承認したり却下したり出来ます。"
#: ../../whatsnew/2.0.rst:106
msgid ""
"Producing an actual patch is the last step in adding a new feature, and is "
"usually easy compared to the earlier task of coming up with a good design. "
"Discussions of new features can often explode into lengthy mailing list "
"threads, making the discussion hard to follow, and no one can read every "
"posting to python-dev. Therefore, a relatively formal process has been set "
"up to write Python Enhancement Proposals (PEPs), modelled on the internet "
"RFC process. PEPs are draft documents that describe a proposed new feature, "
"and are continually revised until the community reaches a consensus, either "
"accepting or rejecting the proposal. Quoting from the introduction to :pep:"
"`1`, \"PEP Purpose and Guidelines\":"
msgstr ""
"実際のパッチの作成は新機能の追加での最後のステップであり、通常、良いデザイン"
"を工面する前のタスクと容易に比較出来ます。一方で新機能についての議論はしばし"
"ばメーリングリストでの長大なスレッドを巻き起こし、議論に追いつくのが大変にな"
"り、そして誰も python-dev の投稿全てを読めません。それゆえに、Python 拡張提"
"案 (Python Enhancement Proposals: PEPs)を書く、相対的に形式ばったプロセスが、"
"始動しました。インターネットの RFC をモデルにしたものです。PEPs は新機能提案"
"を記述した草案文書であり、コミュニティの合意として提案が承認されるか却下され"
"るまで継続的に改定されます。 :pep:`1` の導入部、\"PEP の目的とガイドライン\" "
"から引用します:"
#: ../../whatsnew/2.0.rst:120
msgid ""
"PEP stands for Python Enhancement Proposal. A PEP is a design document "
"providing information to the Python community, or describing a new feature "
"for Python. The PEP should provide a concise technical specification of the "
"feature and a rationale for the feature."
msgstr ""
"PEP は Python Enhancement Proposal を意味します。PEP は、Python コミュニティ"
"に対して情報を提供する、あるいは Python の新機能について記述する設計文書で"
"す。PEP は、機能についての技術的な仕様とその機能の論拠(理論)を簡潔に伝えるべ"
"きです。"
#: ../../whatsnew/2.0.rst:125
msgid ""
"We intend PEPs to be the primary mechanisms for proposing new features, for "
"collecting community input on an issue, and for documenting the design "
"decisions that have gone into Python. The PEP author is responsible for "
"building consensus within the community and documenting dissenting opinions."
msgstr ""
"私たちは PEP が新機能提案にかかる、コミュニティによる問題提起の集積と Python "
"になされる設計決断の文書化のための最上位の機構となることを意図しています。"
"PEP の著者にはコミュニティ内の合意形成を行うこと、反対意見を文書化することの"
"責務があります。"
#: ../../whatsnew/2.0.rst:130
msgid ""
"Read the rest of :pep:`1` for the details of the PEP editorial process, "
"style, and format. PEPs are kept in the Python CVS tree on SourceForge, "
"though they're not part of the Python 2.0 distribution, and are also "
"available in HTML form from https://peps.python.org/. As of September 2000, "
"there are 25 PEPs, ranging from :pep:`201`, \"Lockstep Iteration\", to PEP "
"225, \"Elementwise/Objectwise Operators\"."
msgstr ""
"PEP の編集に関するプロセス、様式、体裁についての詳細が :pep:`1` の残りの部分"
"に書かれています。PEPs は SourceForge 上の Python CVS ツリーで営まれますが "
"Python 2.0 配布物の一部ではなく、 https://peps.python.org/ で HTML 形式で利用"
"可能です。2000 年 9 月時点で :pep:`201` の \"Lockstep Iteration\" から PEP "
"225 の \"Elementwise/Objectwise Operators\" までの 25 の PEP があります。"
#: ../../whatsnew/2.0.rst:141
msgid "Unicode"
msgstr "Unicode 文字列型"
#: ../../whatsnew/2.0.rst:143
msgid ""
"The largest new feature in Python 2.0 is a new fundamental data type: "
"Unicode strings. Unicode uses 16-bit numbers to represent characters "
"instead of the 8-bit number used by ASCII, meaning that 65,536 distinct "
"characters can be supported."
msgstr ""
"Python 2.0 での最大の新機能は新しい基礎データ型、Unicode 文字列です。Unicode "
"は文字を表現するのに ASCII で使用される 8 ビット数の代わりに 16 ビットを使い"
"ます。これによって 65,536 の個別の文字がサポート出来ます。(---訳注: Unicode "
"の扱いはまず Python 2.2 で UCS4 が使えるように拡張され(つまり 32 ビットに拡"
"張)、Python 3 では Unicode が唯一の文字列型に変更されています。後者の変更点は"
"非常に大きいですが、クックブックの「Python 2 から Python 3 への移植」に比較的"
"よくまとめられています。---)"
#: ../../whatsnew/2.0.rst:148
msgid ""
"The final interface for Unicode support was arrived at through countless "
"often-stormy discussions on the python-dev mailing list, and mostly "
"implemented by Marc-André Lemburg, based on a Unicode string type "
"implementation by Fredrik Lundh. A detailed explanation of the interface "
"was written up as :pep:`100`, \"Python Unicode Integration\". This article "
"will simply cover the most significant points about the Unicode interfaces."
msgstr ""
"最終的な Unicode サポートに関するインターフェイスは、python-dev メーリングリ"
"ストにおける数え切れない、時として嵐のような議論を経て、Fredrik Lundh によっ"
"て実装された Unicode 文字列型に基づいて、ほとんどが Marc-André Lemburg によっ"
"て実装されました。インターフェイスについての詳細な説明は :pep:`100` 「Python "
"Unicode の統合」に記述されました。今ここでは、Unicode インターフェイスについ"
"て、一番重要な点を単純にカバーするだけにしましょう。"
#: ../../whatsnew/2.0.rst:155
msgid ""
"In Python source code, Unicode strings are written as ``u\"string\"``. "
"Arbitrary Unicode characters can be written using a new escape sequence, :"
"samp:`\\\\u{HHHH}`, where *HHHH* is a 4-digit hexadecimal number from 0000 "
"to FFFF. The existing :samp:`\\\\x{HH}` escape sequence can also be used, "
"and octal escapes can be used for characters up to U+01FF, which is "
"represented by ``\\777``."
msgstr ""
"Python ソースコード内では Unicode 文字列は ``u\"string\"`` のように書きます。"
"任意の Unicode 文字は新しく追加されたエスケープシーケンスで書きます。 :samp:"
"`\\\\u{HHHH}` のように書き、 *HHHH* は 0000 から FFFF までの 4 桁の 16 進表記"
"数です。以前からあるエスケープシーケンス :samp:`\\\\x{HH}` も使えますし、8 進"
"表記も、 ``\\777`` で表現される U+01FF までの文字に使えます。"
#: ../../whatsnew/2.0.rst:161
msgid ""
"Unicode strings, just like regular strings, are an immutable sequence type. "
"They can be indexed and sliced, but not modified in place. Unicode strings "
"have an ``encode( [encoding] )`` method that returns an 8-bit string in the "
"desired encoding. Encodings are named by strings, such as ``'ascii'``, "
"``'utf-8'``, ``'iso-8859-1'``, or whatever. A codec API is defined for "
"implementing and registering new encodings that are then available "
"throughout a Python program. If an encoding isn't specified, the default "
"encoding is usually 7-bit ASCII, though it can be changed for your Python "
"installation by calling the ``sys.setdefaultencoding(encoding)`` function in "
"a customized version of :file:`site.py`."
msgstr ""
"Unicode 文字列は普通の文字列と全く似ていて、 :term:`immutable` なシーケンス型"
"です。添え字でアクセス出来、スライス出来ますが、インプレイスに変更することは"
"出来ません。Unicode 文字列は ``encode( [encoding] )`` メソッドを持っていて、"
"これは望みのエンコーディングでエンコードした 8 ビット文字列を返します。エン"
"コーディングは文字列で名前付けられていて、例えば ``'ascii'``, ``'utf-8'``, "
"``'iso-8859-1'`` のようなものです。コーデック API は、新しいエンコーディング"
"を実装し、Python プログラム全体を通して利用可能となるよう登録するために定義さ"
"れています。エンコーディングが指定されない場合はデフォルトのエンコーディング"
"は普通 7 ビット ASCII ですが、Python インストレーションにおいて、 :file:"
"`site.py` のカスタマイズ版内で ``sys.setdefaultencoding(encoding)`` を呼び出"
"すことで変更出来ます。"
#: ../../whatsnew/2.0.rst:172
msgid ""
"Combining 8-bit and Unicode strings always coerces to Unicode, using the "
"default ASCII encoding; the result of ``'a' + u'bc'`` is ``u'abc'``."
msgstr ""
"8 ビット文字列と Unicode 文字列を結合すると常に、デフォルトの ASCII エンコー"
"ディングを使って Unicode に型変換されます。 ``'a' + u'bc'`` の結果は "
"``u'abc'`` になります。"
#: ../../whatsnew/2.0.rst:175
msgid ""
"New built-in functions have been added, and existing built-ins modified to "
"support Unicode:"
msgstr ""
"新たなビルトイン関数が追加され、既存のビルトイン関数も Unicode サポートのため"
"に修正されました:"
#: ../../whatsnew/2.0.rst:178
msgid ""
"``unichr(ch)`` returns a Unicode string 1 character long, containing the "
"character *ch*."
msgstr ""
"``unichr(ch)`` は Unicode におけるコードが整数 *ch* になるような文字 1 文字か"
"らなる Unicode 文字列を返します。"
#: ../../whatsnew/2.0.rst:181
msgid ""
"``ord(u)``, where *u* is a 1-character regular or Unicode string, returns "
"the number of the character as an integer."
msgstr ""
"*u* が 1 文字の通常文字あるいは Unicode 文字として、 ``ord(u)`` はコードを整"
"数で返します。"
#: ../../whatsnew/2.0.rst:184
msgid ""
"``unicode(string [, encoding] [, errors] )`` creates a Unicode string from "
"an 8-bit string. ``encoding`` is a string naming the encoding to use. The "
"``errors`` parameter specifies the treatment of characters that are invalid "
"for the current encoding; passing ``'strict'`` as the value causes an "
"exception to be raised on any encoding error, while ``'ignore'`` causes "
"errors to be silently ignored and ``'replace'`` uses U+FFFD, the official "
"replacement character, in case of any problems."
msgstr ""
"``unicode(string [, encoding] [, errors] )`` は、8 ビット文字列から Unicode "
"文字列を作ります。 ``encoding`` は使用するエンコーディング名の文字列です。 "
"``errors`` パラメータは、現在エンコーディングにおいて不正な文字の扱いを指示し"
"ます; これに値として ``'strict'`` を渡すと全てのエンコーディングエラーに対"
"し、例外を引き起こします。 ``'ignore'`` を渡すとエラーは黙って無視されます。 "
"``'replace'`` を渡すと、全ての問題ケースで、公式な置き換え文字である U+FFFD "
"に置き換えます。"
#: ../../whatsnew/2.0.rst:192
msgid ""
"The ``exec`` statement, and various built-ins such as ``eval()``, "
"``getattr()``, and ``setattr()`` will also accept Unicode strings as well as "
"regular strings. (It's possible that the process of fixing this missed some "
"built-ins; if you find a built-in function that accepts strings but doesn't "
"accept Unicode strings at all, please report it as a bug.)"
msgstr ""
"``exec`` 文や ``eval()``, ``getattr()``, ``setattr()`` のような色々なビルト"
"インも、普通の文字列同様に Unicode 文字列を受け付けるようになりました。(この"
"修正をするプロセスをいくつかのビルトインで忘れている可能性もあります。文字列"
"を受け取るものが Unicode を全く受け取らないビルトインを見つけたら、バグとして"
"報告してください。)"
#: ../../whatsnew/2.0.rst:198
msgid ""
"A new module, :mod:`unicodedata`, provides an interface to Unicode character "
"properties. For example, ``unicodedata.category(u'A')`` returns the 2-"
"character string 'Lu', the 'L' denoting it's a letter, and 'u' meaning that "
"it's uppercase. ``unicodedata.bidirectional(u'\\u0660')`` returns 'AN', "
"meaning that U+0660 is an Arabic number."
msgstr ""
"新規モジュール :mod:`unicodedata` は、Unicode 文字の特性へのインターフェイス"
"を提供します。例えば ``unicodedata.category(u'A')`` は 2 文字の文字列 'Lu' を"
"返しますが、これは、 'L' が letter を、 'u' が uppercase を表します。 "
"``unicodedata.bidirectional(u'\\u0660')`` は 'AN' を返し、これは U+0660 が "
"Arabic Number であることを表します。"
#: ../../whatsnew/2.0.rst:204
msgid ""
"The :mod:`codecs` module contains functions to look up existing encodings "
"and register new ones. Unless you want to implement a new encoding, you'll "
"most often use the ``codecs.lookup(encoding)`` function, which returns a 4-"
"element tuple: ``(encode_func, decode_func, stream_reader, stream_writer)``."
msgstr ""
":mod:`codecs` モジュールには、既存のエンコーディングをルックアップする関数、"
"新しいエンコーディングを登録する関数が含まれます。新しいエンコーディングを実"
"装したいと思うのでない限りは、一番使うことになるのは ``codecs."
"lookup(encoding)`` でしょう。これは 4 要素のタプルを返します: "
"``(encode_func, decode_func, stream_reader, stream_writer)`` 。"
#: ../../whatsnew/2.0.rst:209
msgid ""
"*encode_func* is a function that takes a Unicode string, and returns a 2-"
"tuple ``(string, length)``. *string* is an 8-bit string containing a "
"portion (perhaps all) of the Unicode string converted into the given "
"encoding, and *length* tells you how much of the Unicode string was "
"converted."
msgstr ""
"*encode_func* は、Unicode 文字列を受け取って 2 要素タプル ``(string, "
"length)`` を返す関数です。 *string* は、与えられたエンコーディングで Unicode "
"文字列を変換した部分 (おそらく全体) を含む 8 ビット文字列で、 *length* は何文"
"字の Unicode 文字列が変換されたかを伝えます。"
#: ../../whatsnew/2.0.rst:214
msgid ""
"*decode_func* is the opposite of *encode_func*, taking an 8-bit string and "
"returning a 2-tuple ``(ustring, length)``, consisting of the resulting "
"Unicode string *ustring* and the integer *length* telling how much of the 8-"
"bit string was consumed."
msgstr ""
"*decode_func* は *encode_func* の対となる関数で、8 ビット文字列を受け取って、"
"2 要素のタプル ``(ustring, length)`` を返します。 *ustring* が結果の Unicode "
"文字列で、整数 *length* が、8 ビット文字列何文字が消費されたかを表します。"
#: ../../whatsnew/2.0.rst:219
msgid ""
"*stream_reader* is a class that supports decoding input from a stream. "
"*stream_reader(file_obj)* returns an object that supports the :meth:`!"
"read`, :meth:`!readline`, and :meth:`!readlines` methods. These methods "
"will all translate from the given encoding and return Unicode strings."
msgstr ""
#: ../../whatsnew/2.0.rst:224
msgid ""
"*stream_writer*, similarly, is a class that supports encoding output to a "
"stream. *stream_writer(file_obj)* returns an object that supports the :meth:"
"`!write` and :meth:`!writelines` methods. These methods expect Unicode "
"strings, translating them to the given encoding on output."
msgstr ""
#: ../../whatsnew/2.0.rst:229
msgid ""
"For example, the following code writes a Unicode string into a file, "
"encoding it as UTF-8::"
msgstr ""
"例えば以下のコードは Unicode 文字列を UTF-8 でエンコーディングしてファイルに"
"書きます::"
#: ../../whatsnew/2.0.rst:232
msgid ""
"import codecs\n"
"\n"
"unistr = u'\\u0660\\u2000ab ...'\n"
"\n"
"(UTF8_encode, UTF8_decode,\n"
" UTF8_streamreader, UTF8_streamwriter) = codecs.lookup('UTF-8')\n"
"\n"
"output = UTF8_streamwriter( open( '/tmp/output', 'wb') )\n"
"output.write( unistr )\n"
"output.close()"
msgstr ""
#: ../../whatsnew/2.0.rst:243
msgid "The following code would then read UTF-8 input from the file::"
msgstr "そして以下コードではファイルから UTF-8 で読めます::"
#: ../../whatsnew/2.0.rst:245
msgid ""
"input = UTF8_streamreader( open( '/tmp/output', 'rb') )\n"
"print repr(input.read())\n"
"input.close()"
msgstr ""
#: ../../whatsnew/2.0.rst:249
msgid ""
"Unicode-aware regular expressions are available through the :mod:`re` "
"module, which has a new underlying implementation called SRE written by "
"Fredrik Lundh of Secret Labs AB."
msgstr ""
":mod:`re` モジュールでは Unicode 対応した正規表現が利用可能で、これは新しい根"
"底となる SRE なる実装から成り、Secret Labs AB の Fredrik Lundh によって書かれ"
"ました。"
#: ../../whatsnew/2.0.rst:253
msgid ""
"A ``-U`` command line option was added which causes the Python compiler to "
"interpret all string literals as Unicode string literals. This is intended "
"to be used in testing and future-proofing your Python code, since some "
"future version of Python may drop support for 8-bit strings and provide only "
"Unicode strings."
msgstr ""
"Python コンパイラに全ての文字列リテラルを Unicode 文字列として解釈させるため"
"の ``-U`` コマンドラインオプションが追加されました。これはあなたの Python "
"コードのテストと将来の保障を意図しています。というのも、将来の Python バー"
"ジョンでは 8 ビット文字列のサポートがなくなって、Unicode 文字列だけとなる予定"
"だからです。 (---訳注: ここで言っている将来バージョンとは、結果的には Python "
"3 になりました。What's New での明記はないのですが ``-U`` オプションは Python "
"2.7 時点では存在していません。ですが同じことは 2.6 以降では ``from "
"__future__ import unicode_literals`` で出来ます。 ---)"
#: ../../whatsnew/2.0.rst:262
msgid "List Comprehensions"
msgstr "リストの内包表記"
#: ../../whatsnew/2.0.rst:264
msgid ""
"Lists are a workhorse data type in Python, and many programs manipulate a "
"list at some point. Two common operations on lists are to loop over them, "
"and either pick out the elements that meet a certain criterion, or apply "
"some function to each element. For example, given a list of strings, you "
"might want to pull out all the strings containing a given substring, or "
"strip off trailing whitespace from each line."
msgstr ""
"リストというのは Python の主要なデータ型で、多くのプログラムがリストをいつか"
"は操るものです。リストの操作での 2 つのよくある操作は、それらについてループ"
"し、あるいは特定の基準に合致したものを取り出すか個々の要素にある関数を適用す"
"るかする、といったものです。例えば文字列のリストが与えられた場合、特定の部分"
"文字列を含む全ての文字列を引き抜いたり、あるいは各行から末尾の空白を取り除い"
"たりしたいでしょう。"
#: ../../whatsnew/2.0.rst:271
msgid ""
"The existing :func:`map` and :func:`filter` functions can be used for this "
"purpose, but they require a function as one of their arguments. This is "
"fine if there's an existing built-in function that can be passed directly, "
"but if there isn't, you have to create a little function to do the required "
"work, and Python's scoping rules make the result ugly if the little function "
"needs additional information. Take the first example in the previous "
"paragraph, finding all the strings in the list containing a given "
"substring. You could write the following to do it::"
msgstr ""
"既にあった :func:`map` 関数、 :func:`filter` 関数がこの目的のためには使えます"
"が、それらにはその引数の一つに関数が必要です。何か既存のビルトイン関数で直接"
"渡せるものがあればよいのですが、これがない場合その必要とされる仕事をする小さ"
"な関数を作る必要があって、また、Python のスコープ規則によって、その小さな関数"
"が何かほかの情報を必要とする場合に醜いものになります。前パラグラフでの最初の"
"例を考えましょう。指定の部分文字列を含む文字列リストから全てを探す例です。こ"
"のように書けるでしょう::"
#: ../../whatsnew/2.0.rst:280
msgid ""
"# Given the list L, make a list of all strings\n"
"# containing the substring S.\n"
"sublist = filter( lambda s, substring=S:\n"
" string.find(s, substring) != -1,\n"
" L)"
msgstr ""
#: ../../whatsnew/2.0.rst:286
msgid ""
"Because of Python's scoping rules, a default argument is used so that the "
"anonymous function created by the :keyword:`lambda` expression knows what "
"substring is being searched for. List comprehensions make this cleaner::"
msgstr ""
"Python のスコープ規則のために、 :keyword:`lambda` 式で作っている匿名関数にデ"
"フォルト引数を使い、これに検索対象の部分文字列を渡しています。リスト内包表記"
"はこれを明快にします::"
#: ../../whatsnew/2.0.rst:290
msgid "sublist = [ s for s in L if string.find(s, S) != -1 ]"
msgstr ""
#: ../../whatsnew/2.0.rst:292
msgid "List comprehensions have the form::"
msgstr "リスト内包表記は以下の形式を持ちます::"
#: ../../whatsnew/2.0.rst:294
msgid ""
"[ expression for expr in sequence1\n"
" for expr2 in sequence2 ...\n"
" for exprN in sequenceN\n"
" if condition ]"
msgstr ""
#: ../../whatsnew/2.0.rst:299
msgid ""
"The :keyword:`!for`...\\ :keyword:`!in` clauses contain the sequences to be "
"iterated over. The sequences do not have to be the same length, because "
"they are *not* iterated over in parallel, but from left to right; this is "
"explained more clearly in the following paragraphs. The elements of the "
"generated list will be the successive values of *expression*. The final :"
"keyword:`!if` clause is optional; if present, *expression* is only evaluated "
"and added to the result if *condition* is true."
msgstr ""
":keyword:`!for`...\\ :keyword:`!in` 節はイテレートするシーケンスを含みます。"
"シーケンス群は同じ長さである必要はありません。それらは並列でイテレートされる "
"*のではなく* 左から右の順で周ります。続くパラグラフでもっとわかりやすく説明し"
"ます。生成されるリストの要素は一連の *expression* の値となります。最後の :"
"keyword:`if` 節はオプショナルです。これがあれば *expression* は *condition* "
"が真の場合にのみ評価・追加されます。"
#: ../../whatsnew/2.0.rst:307
msgid ""
"To make the semantics very clear, a list comprehension is equivalent to the "
"following Python code::"
msgstr ""
"セマンティクスについてとてもわかりやすく説明しておきましょう。リスト内包は以"
"下の Python コードと等価です::"
#: ../../whatsnew/2.0.rst:310
msgid ""
"for expr1 in sequence1:\n"
" for expr2 in sequence2:\n"
" ...\n"
" for exprN in sequenceN:\n"
" if (condition):\n"
" # Append the value of\n"
" # the expression to the\n"
" # resulting list."
msgstr ""
#: ../../whatsnew/2.0.rst:319
msgid ""
"This means that when there are multiple :keyword:`!for`...\\ :keyword:`!in` "
"clauses, the resulting list will be equal to the product of the lengths of "
"all the sequences. If you have two lists of length 3, the output list is 9 "
"elements long::"
msgstr ""
"つまり、複数の :keyword:`!for`...\\ :keyword:`!in` 節があって ``if`` がないと"
"きの最終出力は、長さが各シーケンス長の積に等しくなるということです。長さ 3 の"
"リスト二つなら、出力リストの長さは 9 要素です::"
#: ../../whatsnew/2.0.rst:324
msgid ""
"seq1 = 'abc'\n"
"seq2 = (1,2,3)\n"
">>> [ (x,y) for x in seq1 for y in seq2]\n"
"[('a', 1), ('a', 2), ('a', 3), ('b', 1), ('b', 2), ('b', 3), ('c', 1),\n"
"('c', 2), ('c', 3)]"
msgstr ""
#: ../../whatsnew/2.0.rst:330
msgid ""
"To avoid introducing an ambiguity into Python's grammar, if *expression* is "
"creating a tuple, it must be surrounded with parentheses. The first list "
"comprehension below is a syntax error, while the second one is correct::"
msgstr ""
"Python の文法に曖昧さを紛れ込ませないように、*expression* でタプルを作るなら"
"括弧で囲わなくてはなりません。下にあるリスト内包表記で、最初のは構文エラーで"
"すが、二番目は有効です::"
#: ../../whatsnew/2.0.rst:334
msgid ""
"# Syntax error\n"
"[ x,y for x in seq1 for y in seq2]\n"
"# Correct\n"
"[ (x,y) for x in seq1 for y in seq2]"
msgstr ""
#: ../../whatsnew/2.0.rst:339
msgid ""
"The idea of list comprehensions originally comes from the functional "
"programming language Haskell (https://www.haskell.org). Greg Ewing argued "
"most effectively for adding them to Python and wrote the initial list "
"comprehension patch, which was then discussed for a seemingly endless time "
"on the python-dev mailing list and kept up-to-date by Skip Montanaro."
msgstr ""
"リスト内包表記のアイディアは、もともとは関数型プログラミング言語 Haskell "
"(https://www.haskell.org) に由来しています。Greg Ewing が Python にこれを追加"
"することを最も実際的に主張し、彼が最初のリスト内包のパッチを書きました。それ"
"は傍目には終わりのない議論が python-dev メーリングリストにて続き、Skip "
"Montanaro によって最新に保たれました。"
#: ../../whatsnew/2.0.rst:349
msgid "Augmented Assignment"
msgstr "累算代入 (Augmented Assignment)"
#: ../../whatsnew/2.0.rst:351
msgid ""
"Augmented assignment operators, another long-requested feature, have been "
"added to Python 2.0. Augmented assignment operators include ``+=``, ``-=``, "
"``*=``, and so forth. For example, the statement ``a += 2`` increments the "
"value of the variable ``a`` by 2, equivalent to the slightly lengthier ``a "
"= a + 2``."
msgstr ""
"累算代入はもう一つの長らく待ち望まれた機能であり、Python 2.0 に追加されまし"
"た。累算代入演算子には ``+=``, ``-=``, ``*=`` などがあります。例えばステート"
"メント ``a += 2`` は変数 ``a`` に 2 を加算し、これはちょっとだけ長い記述 ``a "
"= a + 2`` と同じです。"
#: ../../whatsnew/2.0.rst:356
msgid ""
"The full list of supported assignment operators is ``+=``, ``-=``, ``*=``, "
"``/=``, ``%=``, ``**=``, ``&=``, ``|=``, ``^=``, ``>>=``, and ``<<=``. "
"Python classes can override the augmented assignment operators by defining "
"methods named :meth:`!__iadd__`, :meth:`!__isub__`, etc. For example, the "
"following :class:`!Number` class stores a number and supports using += to "
"create a new instance with an incremented value."
msgstr ""
#: ../../whatsnew/2.0.rst:367
msgid ""
"class Number:\n"
" def __init__(self, value):\n"
" self.value = value\n"
" def __iadd__(self, increment):\n"
" return Number( self.value + increment)\n"
"\n"
"n = Number(5)\n"
"n += 3\n"
"print n.value"
msgstr ""
#: ../../whatsnew/2.0.rst:377
msgid ""
"The :meth:`!__iadd__` special method is called with the value of the "
"increment, and should return a new instance with an appropriately modified "
"value; this return value is bound as the new value of the variable on the "
"left-hand side."
msgstr ""
#: ../../whatsnew/2.0.rst:381
msgid ""
"Augmented assignment operators were first introduced in the C programming "
"language, and most C-derived languages, such as :program:`awk`, C++, Java, "
"Perl, and PHP also support them. The augmented assignment patch was "
"implemented by Thomas Wouters."
msgstr ""
"累算代入演算子は最初に C 言語で導入されて、 :program:`awk`, C++, Java, Perl, "
"PHP といった C から派生した言語のほとんどでサポートされています。累算代入の"
"パッチは Thomas Wouters により実装されました。"
#: ../../whatsnew/2.0.rst:390
msgid "String Methods"
msgstr "文字列メソッド"
#: ../../whatsnew/2.0.rst:392
msgid ""
"Until now string-manipulation functionality was in the :mod:`string` module, "
"which was usually a front-end for the :mod:`!strop` module written in C. "
"The addition of Unicode posed a difficulty for the :mod:`!strop` module, "
"because the functions would all need to be rewritten in order to accept "
"either 8-bit or Unicode strings. For functions such as :func:`!string."
"replace`, which takes 3 string arguments, that means eight possible "
"permutations, and correspondingly complicated code."
msgstr ""
#: ../../whatsnew/2.0.rst:400
msgid ""
"Instead, Python 2.0 pushes the problem onto the string type, making string "
"manipulation functionality available through methods on both 8-bit strings "
"and Unicode strings. ::"
msgstr ""
"代わりに、Python 2.0 は問題を文字列型に押し込み、文字列操作機能が 8 ビット文"
"字列と Unicode 文字列の両方のメソッドを通じて利用可能としました。"
#: ../../whatsnew/2.0.rst:404
msgid ""
">>> 'andrew'.capitalize()\n"
"'Andrew'\n"
">>> 'hostname'.replace('os', 'linux')\n"
"'hlinuxtname'\n"
">>> 'moshe'.find('sh')\n"
"2"
msgstr ""
#: ../../whatsnew/2.0.rst:411
msgid ""
"One thing that hasn't changed, a noteworthy April Fools' joke "
"notwithstanding, is that Python strings are immutable. Thus, the string "
"methods return new strings, and do not modify the string on which they "
"operate."
msgstr ""
"変わらない一つのこと、華やかなエイプリルフールのジョークではありませんが、そ"
"れは Python 文字列が :term:`immutable` だということです。ですので文字列メソッ"
"ドは新しい文字列を返し、それが操作する文字列を変更しません。"
#: ../../whatsnew/2.0.rst:415
msgid ""
"The old :mod:`string` module is still around for backwards compatibility, "
"but it mostly acts as a front-end to the new string methods."
msgstr ""
"古い :mod:`string` モジュールはまだ後方互換性のために残されますが、それはほと"
"んど新たな文字列メソッドへのフロントエンドとして振舞います。"
#: ../../whatsnew/2.0.rst:418
msgid ""
"Two methods which have no parallel in pre-2.0 versions, although they did "
"exist in JPython for quite some time, are :meth:`!startswith` and :meth:`!"
"endswith`. ``s.startswith(t)`` is equivalent to ``s[:len(t)] == t``, while "
"``s.endswith(t)`` is equivalent to ``s[-len(t):] == t``."
msgstr ""
#: ../../whatsnew/2.0.rst:423
msgid ""
"One other method which deserves special mention is :meth:`!join`. The :meth:"
"`!join` method of a string receives one parameter, a sequence of strings, "
"and is equivalent to the :func:`!string.join` function from the old :mod:"
"`string` module, with the arguments reversed. In other words, ``s."
"join(seq)`` is equivalent to the old ``string.join(seq, s)``."
msgstr ""
#: ../../whatsnew/2.0.rst:433
msgid "Garbage Collection of Cycles"
msgstr "循環参照のガベージコレクション"
#: ../../whatsnew/2.0.rst:435
msgid ""
"The C implementation of Python uses reference counting to implement garbage "
"collection. Every Python object maintains a count of the number of "
"references pointing to itself, and adjusts the count as references are "
"created or destroyed. Once the reference count reaches zero, the object is "
"no longer accessible, since you need to have a reference to an object to "
"access it, and if the count is zero, no references exist any longer."
msgstr ""
"Python の C 実装は、ガーベージコレクションの実装に参照カウントを使っていま"
"す。全ての Python オブジェクトは自身を参照している数を維持していて、参照が作"
"成されたり破壊されたりするカウントを調整しています。参照カウントがゼロになれ"
"ばそのオブジェクトにはもはや到達可能ではありません。あなたはそれにアクセスす"
"るためのオブジェクトへの参照を持つ必要がありますが、カウントがゼロならば参照"
"はもはや存在しないということです。"
#: ../../whatsnew/2.0.rst:442
msgid ""
"Reference counting has some pleasant properties: it's easy to understand and "
"implement, and the resulting implementation is portable, fairly fast, and "
"reacts well with other libraries that implement their own memory handling "
"schemes. The major problem with reference counting is that it sometimes "
"doesn't realise that objects are no longer accessible, resulting in a memory "
"leak. This happens when there are cycles of references."
msgstr ""
"参照カウントはある種望ましい特徴を持っています。それは理解しやすく、実装しや"
"すく、結果としての実装の移植性は高く、かなり高速であり、そして、独自のメモリ"
"処理方式を実装しているようなほかのライブラリと共にでも良く振舞います。参照カ"
"ウントの主要な問題点は、それが時々、オブジェクトにはもう到達不能であることに"
"気付かないので、結果としてメモリリークを引き起こすことです。これは参照の循環"
"がある場合に発生します。"
#: ../../whatsnew/2.0.rst:449
msgid ""
"Consider the simplest possible cycle, a class instance which has a "
"reference to itself::"
msgstr ""
"最も単純な循環について考えてみます。クラスインスタンスが自身への参照を持つ場"
"合です::"
#: ../../whatsnew/2.0.rst:452
msgid ""
"instance = SomeClass()\n"
"instance.myself = instance"
msgstr ""
#: ../../whatsnew/2.0.rst:455
msgid ""
"After the above two lines of code have been executed, the reference count of "
"``instance`` is 2; one reference is from the variable named ``'instance'``, "
"and the other is from the ``myself`` attribute of the instance."
msgstr ""
"上の例の 2 行のコードが実行された後では、 ``instance`` の参照カウントは 2 で"
"す。参照の一つ目は ``'instance'`` と名付けられた変数からのもので、もう一つの"
"参照は、インスタンスの ``myself`` 属性から来るものです。"
#: ../../whatsnew/2.0.rst:459
msgid ""
"If the next line of code is ``del instance``, what happens? The reference "
"count of ``instance`` is decreased by 1, so it has a reference count of 1; "
"the reference in the ``myself`` attribute still exists. Yet the instance is "
"no longer accessible through Python code, and it could be deleted. Several "
"objects can participate in a cycle if they have references to each other, "
"causing all of the objects to be leaked."
msgstr ""
"このあとに続くコードが ``del instance`` だとしたら、何が起こるでしょうか? "
"``instance`` の参照カウントは 1 減るので参照カウントは 1 になります。 "
"``myself`` 属性内の参照はいまだ存在します。けれどもインスタンスはもう Python "
"コードからは到達不能ですから、本来削除出来るはずです。お互いを参照しあうなら"
"ばいくつものオブジェクトが循環に参加しえるので、結果それら全てのオブジェクト"
"はリークしてしまいます。"
#: ../../whatsnew/2.0.rst:466
msgid ""
"Python 2.0 fixes this problem by periodically executing a cycle detection "
"algorithm which looks for inaccessible cycles and deletes the objects "
"involved. A new :mod:`gc` module provides functions to perform a garbage "
"collection, obtain debugging statistics, and tuning the collector's "
"parameters."
msgstr ""
"Python 2.0 はこの問題を、循環検出アルゴリズムを周期的に実行することにより"
"フィックスします。そのアルゴリズムは、到達不能な循環を探して関係するオブジェ"
"クトを削除します。新しく追加された :mod:`gc` モジュールは、ガーベージコレク"
"ションを実行する関数、デバッグのための統計情報を取得する関数、コレクタのパラ"
"メータを調整する関数を提供します。"
#: ../../whatsnew/2.0.rst:471
msgid ""
"Running the cycle detection algorithm takes some time, and therefore will "
"result in some additional overhead. It is hoped that after we've gotten "
"experience with the cycle collection from using 2.0, Python 2.1 will be able "
"to minimize the overhead with careful tuning. It's not yet obvious how much "
"performance is lost, because benchmarking this is tricky and depends "
"crucially on how often the program creates and destroys objects. The "
"detection of cycles can be disabled when Python is compiled, if you can't "
"afford even a tiny speed penalty or suspect that the cycle collection is "
"buggy, by specifying the :option:`!--without-cycle-gc` switch when running "
"the :program:`configure` script."
msgstr ""
"循環検出アルゴリズムの実行はいくらかの時間がかかるので、結果として多少の追加"
"的なオーバヘッドがかかるでしょう。2.0 を使って循環のコレクションの経験を積ん"
"だのちに、 Python 2.1 では注意深い調整によりオーバヘッドを最小に出来ることが"
"望まれています。今のところパフォーマンスの損失がいかほどなのかは明らかではあ"
"りません。これはこれのベンチマークがトリッキーであり、プログラムがどれだけの"
"頻度でオブジェクトを構築・破棄するのかに大きく依存するからです。循環の検出は "
"Python コンパイル時に無効に出来ます。もしもあなたが小さな速度のペナルティでさ"
"えも許容出来ないであるとか、あるいは循環のコレクションがバギーであることを疑"
"うのであれば、 :program:`configure` スクリプト実行時に :option:`!--without-"
"cycle-gc` スイッチを与えることでそうすることが出来ます。 (---訳注: Python "
"2.3 でこの循環参照の GC は必須となり、 :option:`!--without-cycle-gc` 、 :"
"option:`!--with-cycle-gc` での有無効化は撤廃されました。---)"
#: ../../whatsnew/2.0.rst:482
msgid ""
"Several people tackled this problem and contributed to a solution. An early "
"implementation of the cycle detection approach was written by Toby Kelsey. "
"The current algorithm was suggested by Eric Tiedemann during a visit to "
"CNRI, and Guido van Rossum and Neil Schemenauer wrote two different "
"implementations, which were later integrated by Neil. Lots of other people "
"offered suggestions along the way; the March 2000 archives of the python-dev "
"mailing list contain most of the relevant discussion, especially in the "
"threads titled \"Reference cycle collection for Python\" and \"Finalization "
"again\"."
msgstr ""
"何人かの人々がこの問題に体当たりで取り組み、解決に対する貢献をしました。循環"
"検出アプローチの初期の実装は、Toby Kelsey により書かれました。現在のアルゴリ"
"ズムは CNRI を訪れている間に Eric Tiedemann によって提案されて、Guido van "
"Rossum と Neil Schemenauer が別々の 2 つの実装を書いて、あとで Neil によって"
"統合されたものです。そこに至るまでにもほかの数多くの人々によって提案がなされ"
"ました。python-dev メーリングリストの 2000 年 3 月のアーカイブに、これに関す"
"るほとんどの議論が含まれています。特にタイトルが \"Reference cycle "
"collection for Python\" と \"Finalization again\" のスレッドです。"
#: ../../whatsnew/2.0.rst:495
msgid "Other Core Changes"
msgstr "その他の言語コアの変更"
#: ../../whatsnew/2.0.rst:497
msgid ""
"Various minor changes have been made to Python's syntax and built-in "
"functions. None of the changes are very far-reaching, but they're handy "
"conveniences."
msgstr ""
"Python 文法とビルトイン関数について、色々マイナーな変更がなされました。影響が"
"広範囲に及ぶものは一つもありませんが、手軽で便利なものです。"
#: ../../whatsnew/2.0.rst:502