-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy path3.11.po
4542 lines (3766 loc) · 142 KB
/
3.11.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:
# yaakiyu, 2022
# souma987, 2023
# Yosuke Miyashita, 2023
# Takanori Suzuki <[email protected]>, 2023
# Skydelta, 2024
# Taichi Haradaguchi, 2024
# tomo, 2024
# Arihiro TAKASE, 2024
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-14 14:17+0000\n"
"PO-Revision-Date: 2022-11-05 19:49+0000\n"
"Last-Translator: Arihiro TAKASE, 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/3.11.rst:3
msgid "What's New In Python 3.11"
msgstr "What's New In Python 3.11"
#: ../../whatsnew/3.11.rst:0
msgid "Editor"
msgstr "編集者"
#: ../../whatsnew/3.11.rst:5
msgid "Pablo Galindo Salgado"
msgstr "Pablo Galindo Salgado"
#: ../../whatsnew/3.11.rst:47
msgid ""
"This article explains the new features in Python 3.11, compared to 3.10. "
"Python 3.11 was released on October 24, 2022. For full details, see the :ref:"
"`changelog <changelog>`."
msgstr ""
"この記事では Python 3.10 と比較した Python 3.11 の新機能を解説します。Python "
"3.11 は2022年10月24日にリリースされました。全詳細については :ref:`変更履歴 "
"<changelog>` をご覧ください。"
#: ../../whatsnew/3.11.rst:55
msgid "Summary -- Release highlights"
msgstr "概要 -- リリースハイライト"
#: ../../whatsnew/3.11.rst:60
msgid ""
"Python 3.11 is between 10-60% faster than Python 3.10. On average, we "
"measured a 1.25x speedup on the standard benchmark suite. See :ref:"
"`whatsnew311-faster-cpython` for details."
msgstr ""
"Python 3.11 は Python 3.10 とくらべて 10-60% 高速です。平均的には、標準ベンチ"
"マークスイートでは 1.25倍の高速化を計測しました。詳細については :ref:"
"`whatsnew311-faster-cpython` を見てください。"
#: ../../whatsnew/3.11.rst:66
msgid "New syntax features:"
msgstr "新たな文法機能:"
#: ../../whatsnew/3.11.rst:68
msgid ":ref:`whatsnew311-pep654`"
msgstr ":ref:`whatsnew311-pep654`"
#: ../../whatsnew/3.11.rst:70
msgid "New built-in features:"
msgstr "新たな組み込み機能:"
#: ../../whatsnew/3.11.rst:72
msgid ":ref:`whatsnew311-pep678`"
msgstr ":ref:`whatsnew311-pep678`"
#: ../../whatsnew/3.11.rst:74
msgid "New standard library modules:"
msgstr "新しい標準ライブラリのモジュール:"
#: ../../whatsnew/3.11.rst:76
msgid ""
":pep:`680`: :mod:`tomllib` — Support for parsing `TOML <https://toml.io/>`_ "
"in the Standard Library"
msgstr ""
":pep:`680`: :mod:`tomllib` — `TOML <https://toml.io/>`_ のパースを標準ライブ"
"ラリでサポート"
#: ../../whatsnew/3.11.rst:79
msgid "Interpreter improvements:"
msgstr "インタープリタの改善:"
#: ../../whatsnew/3.11.rst:81
msgid ":ref:`whatsnew311-pep657`"
msgstr ":ref:`whatsnew311-pep657`"
#: ../../whatsnew/3.11.rst:82
msgid ""
"New :option:`-P` command line option and :envvar:`PYTHONSAFEPATH` "
"environment variable to :ref:`disable automatically prepending potentially "
"unsafe paths <whatsnew311-pythonsafepath>` to :data:`sys.path`"
msgstr ""
"新しい :option:`-P` コマンドライン引数と :envvar:`PYTHONSAFEPATH` 環境変数に"
"より、 :ref:`安全でない可能性のあるパス <whatsnew311-pythonsafepath>` を :"
"data:`sys.path` に自動的に先頭に付加しないようにします。"
#: ../../whatsnew/3.11.rst:86
msgid "New typing features:"
msgstr "新しい型ヒントの機能:"
#: ../../whatsnew/3.11.rst:88
msgid ":ref:`whatsnew311-pep646`"
msgstr ":ref:`whatsnew311-pep646`"
#: ../../whatsnew/3.11.rst:89
msgid ":ref:`whatsnew311-pep655`"
msgstr ":ref:`whatsnew311-pep655`"
#: ../../whatsnew/3.11.rst:90
msgid ":ref:`whatsnew311-pep673`"
msgstr ":ref:`whatsnew311-pep673`"
#: ../../whatsnew/3.11.rst:91
msgid ":ref:`whatsnew311-pep675`"
msgstr ":ref:`whatsnew311-pep675`"
#: ../../whatsnew/3.11.rst:92
msgid ":ref:`whatsnew311-pep681`"
msgstr ":ref:`whatsnew311-pep681`"
#: ../../whatsnew/3.11.rst:94
msgid "Important deprecations, removals and restrictions:"
msgstr "重要な非推奨化、削除と制限:"
#: ../../whatsnew/3.11.rst:96
msgid ""
":pep:`594`: :ref:`Many legacy standard library modules have been deprecated "
"<whatsnew311-pep594>` and will be removed in Python 3.13"
msgstr ""
":pep:`594`: :ref:`たくさんのレガシーの標準ライブラリのモジュールが非推奨にな"
"り <whatsnew311-pep594>` Python 3.13 で削除されます"
#: ../../whatsnew/3.11.rst:99
msgid ""
":pep:`624`: :ref:`Py_UNICODE encoder APIs have been removed <whatsnew311-"
"pep624>`"
msgstr ""
":pep:`624`: :ref:`Py_UNICODE エンコーダー API は削除されました <whatsnew311-"
"pep624>`"
#: ../../whatsnew/3.11.rst:101
msgid ""
":pep:`670`: :ref:`Macros converted to static inline functions <whatsnew311-"
"pep670>`"
msgstr ""
":pep:`670`: :ref:`静的インライン関数に変換されたマクロ <whatsnew311-pep670>`"
#: ../../whatsnew/3.11.rst:108 ../../whatsnew/3.11.rst:2211
msgid "New Features"
msgstr "新しい機能"
#: ../../whatsnew/3.11.rst:113
msgid "PEP 657: Fine-grained error locations in tracebacks"
msgstr "PEP 657: トレースバックのエラー位置の詳細化"
#: ../../whatsnew/3.11.rst:115
msgid ""
"When printing tracebacks, the interpreter will now point to the exact "
"expression that caused the error, instead of just the line. For example:"
msgstr ""
"トレースバックの出力時に、インタープリタはエラーを送出した行だけでなく正確な"
"式を指し示すようになりました。たとえば::"
#: ../../whatsnew/3.11.rst:118
msgid ""
"Traceback (most recent call last):\n"
" File \"distance.py\", line 11, in <module>\n"
" print(manhattan_distance(p1, p2))\n"
" ^^^^^^^^^^^^^^^^^^^^^^^^^^\n"
" File \"distance.py\", line 6, in manhattan_distance\n"
" return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y)\n"
" ^^^^^^^^^\n"
"AttributeError: 'NoneType' object has no attribute 'x'"
msgstr ""
#: ../../whatsnew/3.11.rst:129
msgid ""
"Previous versions of the interpreter would point to just the line, making it "
"ambiguous which object was ``None``. These enhanced errors can also be "
"helpful when dealing with deeply nested :class:`dict` objects and multiple "
"function calls:"
msgstr ""
"以前のバージョンのインタープリタはその行だけを指していたため、どのオブジェク"
"トが ``None`` であるかが曖昧でした。これらの強化されたエラーは、深くネストさ"
"れた :class:`dict` オブジェクトや複数の関数呼び出しを処理するときにも役立ちま"
"す:"
#: ../../whatsnew/3.11.rst:133
msgid ""
"Traceback (most recent call last):\n"
" File \"query.py\", line 37, in <module>\n"
" magic_arithmetic('foo')\n"
" File \"query.py\", line 18, in magic_arithmetic\n"
" return add_counts(x) / 25\n"
" ^^^^^^^^^^^^^\n"
" File \"query.py\", line 24, in add_counts\n"
" return 25 + query_user(user1) + query_user(user2)\n"
" ^^^^^^^^^^^^^^^^^\n"
" File \"query.py\", line 32, in query_user\n"
" return 1 + query_count(db, response['a']['b']['c']['user'], retry=True)\n"
" ~~~~~~~~~~~~~~~~~~^^^^^\n"
"TypeError: 'NoneType' object is not subscriptable"
msgstr ""
#: ../../whatsnew/3.11.rst:149
msgid "As well as complex arithmetic expressions:"
msgstr "複雑な算術式と同様に:"
#: ../../whatsnew/3.11.rst:151
msgid ""
"Traceback (most recent call last):\n"
" File \"calculation.py\", line 54, in <module>\n"
" result = (x / y / z) * (a / b / c)\n"
" ~~~~~~^~~\n"
"ZeroDivisionError: division by zero"
msgstr ""
#: ../../whatsnew/3.11.rst:159
msgid ""
"Additionally, the information used by the enhanced traceback feature is made "
"available via a general API, that can be used to correlate :term:`bytecode` :"
"ref:`instructions <bytecodes>` with source code location. This information "
"can be retrieved using:"
msgstr ""
"さらに、強化されたトレースバック機能で使用される情報は、一般的な API を介して"
"利用可能になり、 :term:`bytecode` :ref:`命令 <bytecodes>` とソースコードの場"
"所を関連付けるために使用できます。この情報は次を使用して取得できます:"
#: ../../whatsnew/3.11.rst:164
msgid "The :meth:`codeobject.co_positions` method in Python."
msgstr "Python の :meth:`codeobject.co_positions` メソッド。"
#: ../../whatsnew/3.11.rst:165
msgid "The :c:func:`PyCode_Addr2Location` function in the C API."
msgstr "C API の :c:func:`PyCode_Addr2Location` 関数。"
#: ../../whatsnew/3.11.rst:167
msgid ""
"See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan "
"Taskaya and Ammar Askar in :issue:`43950`.)"
msgstr ""
"詳細は :pep:`657` を参照してください。(Pablo Galindo, Batuhan Taskaya, Ammar "
"Askar の貢献による :issue:`43950`)"
#: ../../whatsnew/3.11.rst:171
msgid ""
"This feature requires storing column positions in :ref:`codeobjects`, which "
"may result in a small increase in interpreter memory usage and disk usage "
"for compiled Python files. To avoid storing the extra information and "
"deactivate printing the extra traceback information, use the :option:`-X "
"no_debug_ranges <-X>` command line option or the :envvar:"
"`PYTHONNODEBUGRANGES` environment variable."
msgstr ""
"この機能は :ref:`codeobjects` に列の位置を保存する必要があり、その結果コンパ"
"イルされた Pthon ファイルのインタープリタのメモリ使用量とディスク使用量がわず"
"かに増加する可能性があります。余分な情報を保存せず、余分なトレースバック情報"
"を表示しないようにするには :option:`-X no_debug_ranges <-X>` コマンドライン引"
"数または :envvar:`PYTHONNODEBUGRANGES` 環境変数を使用してください。"
#: ../../whatsnew/3.11.rst:183
msgid "PEP 654: Exception Groups and ``except*``"
msgstr "PEP 654: 例外グループと ``except*``"
#: ../../whatsnew/3.11.rst:185
msgid ""
":pep:`654` introduces language features that enable a program to raise and "
"handle multiple unrelated exceptions simultaneously. The builtin types :exc:"
"`ExceptionGroup` and :exc:`BaseExceptionGroup` make it possible to group "
"exceptions and raise them together, and the new :keyword:`except* "
"<except_star>` syntax generalizes :keyword:`except` to match subgroups of "
"exception groups."
msgstr ""
":pep:`654` では、プログラムが無関係な複数の例外を同時に送出させて処理できるよ"
"うにする言語機能が導入されています。組み込み型 :exc:`ExceptionGroup` と :exc:"
"`BaseExceptionGroup` を使用すると、例外をグループ化して一緒に送出することがで"
"きます。また、新しい :keyword:`except* <except_star>` 構文は、 :keyword:"
"`except` を例外グループのサブグループにマッチするように一般化したものです。"
#: ../../whatsnew/3.11.rst:192
msgid "See :pep:`654` for more details."
msgstr "より詳しくは :pep:`654` を参照してください。"
#: ../../whatsnew/3.11.rst:194
msgid ""
"(Contributed by Irit Katriel in :issue:`45292`. PEP written by Irit Katriel, "
"Yury Selivanov and Guido van Rossum.)"
msgstr ""
"(Irit Katriel の貢献による :issue:`45292`。PEP はIrit Katriel, Yury "
"Selivanov, Guido van Rossum によって作成されました。)"
#: ../../whatsnew/3.11.rst:201
msgid "PEP 678: Exceptions can be enriched with notes"
msgstr "PEP 678: ノートによって例外を充実させる"
#: ../../whatsnew/3.11.rst:203
msgid ""
"The :meth:`~BaseException.add_note` method is added to :exc:`BaseException`. "
"It can be used to enrich exceptions with context information that is not "
"available at the time when the exception is raised. The added notes appear "
"in the default traceback."
msgstr ""
":exc:`BaseException` に :meth:`~BaseException.add_note` メソッドが追加されま"
"した。これは例外が送出された時点では利用できないコンテキスト情報を例外に付与"
"するために使用できます。追加された注釈はデフォルトのトレースバックに表示され"
"ます。"
#: ../../whatsnew/3.11.rst:208
msgid "See :pep:`678` for more details."
msgstr "より詳しくは :pep:`678` を参照してください。"
#: ../../whatsnew/3.11.rst:210
msgid ""
"(Contributed by Irit Katriel in :issue:`45607`. PEP written by Zac Hatfield-"
"Dodds.)"
msgstr ""
"(Irit Katriel の貢献による :issue:`45607`。PEP は Zac Hatfield-Dodds によって"
"作成されました。)"
#: ../../whatsnew/3.11.rst:217
msgid "Windows ``py.exe`` launcher improvements"
msgstr "Windows ``py.exe`` ランチャーの改善"
#: ../../whatsnew/3.11.rst:219
msgid ""
"The copy of the :ref:`launcher` included with Python 3.11 has been "
"significantly updated. It now supports company/tag syntax as defined in :pep:"
"`514` using the :samp:`-V:{<company>}/{<tag>}` argument instead of the "
"limited :samp:`-{<major>}.{<minor>}`. This allows launching distributions "
"other than ``PythonCore``, the one hosted on `python.org <https://www.python."
"org>`_."
msgstr ""
"Python 3.11 に含まれる :ref:`launcher` のコピーが大幅に更新されました。 :pep:"
"`514` で定義されているように、制限付きの :samp:`-{<major>}.{<minor>}` の代わ"
"りに :samp:`-V:{<company>}/{<tag>}` 引数を使用した company/tag 構文をサポート"
"するようになりました。これにより、 `python.org <https://www.python.org>`_ で"
"ホストされている ``PythonCore`` 以外のディストリビューションを起動できるよう"
"になります。"
#: ../../whatsnew/3.11.rst:225
msgid ""
"When using ``-V:`` selectors, either company or tag can be omitted, but all "
"installs will be searched. For example, ``-V:OtherPython/`` will select the "
"\"best\" tag registered for ``OtherPython``, while ``-V:3.11`` or ``-"
"V:/3.11`` will select the \"best\" distribution with tag ``3.11``."
msgstr ""
#: ../../whatsnew/3.11.rst:230
msgid ""
"When using the legacy :samp:`-{<major>}`, :samp:`-{<major>}.{<minor>}`, :"
"samp:`-{<major>}-{<bitness>}` or :samp:`-{<major>}.{<minor>}-{<bitness>}` "
"arguments, all existing behaviour should be preserved from past versions, "
"and only releases from ``PythonCore`` will be selected. However, the ``-64`` "
"suffix now implies \"not 32-bit\" (not necessarily x86-64), as there are "
"multiple supported 64-bit platforms. 32-bit runtimes are detected by "
"checking the runtime's tag for a ``-32`` suffix. All releases of Python "
"since 3.5 have included this in their 32-bit builds."
msgstr ""
#: ../../whatsnew/3.11.rst:244
msgid "New Features Related to Type Hints"
msgstr "型ヒントに関連する新しい機能"
#: ../../whatsnew/3.11.rst:246
msgid ""
"This section covers major changes affecting :pep:`484` type hints and the :"
"mod:`typing` module."
msgstr ""
#: ../../whatsnew/3.11.rst:253
msgid "PEP 646: Variadic generics"
msgstr ""
#: ../../whatsnew/3.11.rst:255
msgid ""
":pep:`484` previously introduced :data:`~typing.TypeVar`, enabling creation "
"of generics parameterised with a single type. :pep:`646` adds :data:`~typing."
"TypeVarTuple`, enabling parameterisation with an *arbitrary* number of "
"types. In other words, a :data:`~typing.TypeVarTuple` is a *variadic* type "
"variable, enabling *variadic* generics."
msgstr ""
#: ../../whatsnew/3.11.rst:262
msgid ""
"This enables a wide variety of use cases. In particular, it allows the type "
"of array-like structures in numerical computing libraries such as NumPy and "
"TensorFlow to be parameterised with the array *shape*. Static type checkers "
"will now be able to catch shape-related bugs in code that uses these "
"libraries."
msgstr ""
#: ../../whatsnew/3.11.rst:268
msgid "See :pep:`646` for more details."
msgstr "より詳しくは :pep:`646` を参照してください。"
#: ../../whatsnew/3.11.rst:270
msgid ""
"(Contributed by Matthew Rahtz in :issue:`43224`, with contributions by "
"Serhiy Storchaka and Jelle Zijlstra. PEP written by Mark Mendoza, Matthew "
"Rahtz, Pradeep Kumar Srinivasan, and Vincent Siles.)"
msgstr ""
#: ../../whatsnew/3.11.rst:278
msgid ""
"PEP 655: Marking individual ``TypedDict`` items as required or not-required"
msgstr ""
#: ../../whatsnew/3.11.rst:280
msgid ""
":data:`~typing.Required` and :data:`~typing.NotRequired` provide a "
"straightforward way to mark whether individual items in a :class:`~typing."
"TypedDict` must be present. Previously, this was only possible using "
"inheritance."
msgstr ""
#: ../../whatsnew/3.11.rst:285
msgid ""
"All fields are still required by default, unless the *total* parameter is "
"set to ``False``, in which case all fields are still not-required by "
"default. For example, the following specifies a :class:`!TypedDict` with one "
"required and one not-required key::"
msgstr ""
#: ../../whatsnew/3.11.rst:291
msgid ""
"class Movie(TypedDict):\n"
" title: str\n"
" year: NotRequired[int]\n"
"\n"
"m1: Movie = {\"title\": \"Black Panther\", \"year\": 2018} # OK\n"
"m2: Movie = {\"title\": \"Star Wars\"} # OK (year is not required)\n"
"m3: Movie = {\"year\": 2022} # ERROR (missing required field title)"
msgstr ""
#: ../../whatsnew/3.11.rst:299
msgid "The following definition is equivalent::"
msgstr ""
#: ../../whatsnew/3.11.rst:301
msgid ""
"class Movie(TypedDict, total=False):\n"
" title: Required[str]\n"
" year: int"
msgstr ""
#: ../../whatsnew/3.11.rst:305
msgid "See :pep:`655` for more details."
msgstr "より詳しくは :pep:`655` を参照してください。"
#: ../../whatsnew/3.11.rst:307
msgid ""
"(Contributed by David Foster and Jelle Zijlstra in :issue:`47087`. PEP "
"written by David Foster.)"
msgstr ""
#: ../../whatsnew/3.11.rst:314
msgid "PEP 673: ``Self`` type"
msgstr "PEP 673: ``Self`` 型"
#: ../../whatsnew/3.11.rst:316
msgid ""
"The new :data:`~typing.Self` annotation provides a simple and intuitive way "
"to annotate methods that return an instance of their class. This behaves the "
"same as the :class:`~typing.TypeVar`-based approach :pep:`specified in PEP "
"484 <484#annotating-instance-and-class-methods>`, but is more concise and "
"easier to follow."
msgstr ""
#: ../../whatsnew/3.11.rst:322
msgid ""
"Common use cases include alternative constructors provided as :func:"
"`classmethod <classmethod>`\\s, and :meth:`~object.__enter__` methods that "
"return ``self``::"
msgstr ""
#: ../../whatsnew/3.11.rst:326
msgid ""
"class MyLock:\n"
" def __enter__(self) -> Self:\n"
" self.lock()\n"
" return self\n"
"\n"
" ...\n"
"\n"
"class MyInt:\n"
" @classmethod\n"
" def fromhex(cls, s: str) -> Self:\n"
" return cls(int(s, 16))\n"
"\n"
" ..."
msgstr ""
#: ../../whatsnew/3.11.rst:340
msgid ""
":data:`~typing.Self` can also be used to annotate method parameters or "
"attributes of the same type as their enclosing class."
msgstr ""
#: ../../whatsnew/3.11.rst:343
msgid "See :pep:`673` for more details."
msgstr "より詳しくは :pep:`673` を参照してください。"
#: ../../whatsnew/3.11.rst:345
msgid ""
"(Contributed by James Hilton-Balfe in :issue:`46534`. PEP written by Pradeep "
"Kumar Srinivasan and James Hilton-Balfe.)"
msgstr ""
#: ../../whatsnew/3.11.rst:352
msgid "PEP 675: Arbitrary literal string type"
msgstr ""
#: ../../whatsnew/3.11.rst:354
msgid ""
"The new :data:`~typing.LiteralString` annotation may be used to indicate "
"that a function parameter can be of any literal string type. This allows a "
"function to accept arbitrary literal string types, as well as strings "
"created from other literal strings. Type checkers can then enforce that "
"sensitive functions, such as those that execute SQL statements or shell "
"commands, are called only with static arguments, providing protection "
"against injection attacks."
msgstr ""
#: ../../whatsnew/3.11.rst:362
msgid "For example, a SQL query function could be annotated as follows::"
msgstr ""
#: ../../whatsnew/3.11.rst:364
msgid ""
"def run_query(sql: LiteralString) -> ...\n"
" ...\n"
"\n"
"def caller(\n"
" arbitrary_string: str,\n"
" query_string: LiteralString,\n"
" table_name: LiteralString,\n"
") -> None:\n"
" run_query(\"SELECT * FROM students\") # ok\n"
" run_query(query_string) # ok\n"
" run_query(\"SELECT * FROM \" + table_name) # ok\n"
" run_query(arbitrary_string) # type checker error\n"
" run_query( # type checker error\n"
" f\"SELECT * FROM students WHERE name = {arbitrary_string}\"\n"
" )"
msgstr ""
#: ../../whatsnew/3.11.rst:380
msgid "See :pep:`675` for more details."
msgstr "より詳しくは :pep:`675` を参照してください。"
#: ../../whatsnew/3.11.rst:382
msgid ""
"(Contributed by Jelle Zijlstra in :issue:`47088`. PEP written by Pradeep "
"Kumar Srinivasan and Graham Bleaney.)"
msgstr ""
#: ../../whatsnew/3.11.rst:389
msgid "PEP 681: Data class transforms"
msgstr ""
#: ../../whatsnew/3.11.rst:391
msgid ""
":data:`~typing.dataclass_transform` may be used to decorate a class, "
"metaclass, or a function that is itself a decorator. The presence of "
"``@dataclass_transform()`` tells a static type checker that the decorated "
"object performs runtime \"magic\" that transforms a class, giving it :func:"
"`dataclass <dataclasses.dataclass>`-like behaviors."
msgstr ""
#: ../../whatsnew/3.11.rst:397
msgid "For example::"
msgstr "例えば::"
#: ../../whatsnew/3.11.rst:399
msgid ""
"# The create_model decorator is defined by a library.\n"
"@typing.dataclass_transform()\n"
"def create_model(cls: Type[T]) -> Type[T]:\n"
" cls.__init__ = ...\n"
" cls.__eq__ = ...\n"
" cls.__ne__ = ...\n"
" return cls\n"
"\n"
"# The create_model decorator can now be used to create new model classes:\n"
"@create_model\n"
"class CustomerModel:\n"
" id: int\n"
" name: str\n"
"\n"
"c = CustomerModel(id=327, name=\"Eric Idle\")"
msgstr ""
#: ../../whatsnew/3.11.rst:415
msgid "See :pep:`681` for more details."
msgstr "より詳しくは :pep:`681` を参照してください。"
#: ../../whatsnew/3.11.rst:417
msgid ""
"(Contributed by Jelle Zijlstra in :gh:`91860`. PEP written by Erik De Bonte "
"and Eric Traut.)"
msgstr ""
#: ../../whatsnew/3.11.rst:424
msgid "PEP 563 may not be the future"
msgstr ""
#: ../../whatsnew/3.11.rst:426
msgid ""
":pep:`563` Postponed Evaluation of Annotations (the ``from __future__ import "
"annotations`` :ref:`future statement <future>`) that was originally planned "
"for release in Python 3.10 has been put on hold indefinitely. See `this "
"message from the Steering Council <https://mail.python.org/archives/list/"
"[email protected]/message/VIZEBX5EYMSYIJNDBF6DMUMZOCWHARSO/>`__ for more "
"information."
msgstr ""
#: ../../whatsnew/3.11.rst:437
msgid "Other Language Changes"
msgstr "その他の言語変更"
#: ../../whatsnew/3.11.rst:439
msgid ""
"Starred unpacking expressions can now be used in :keyword:`for` statements. "
"(See :issue:`46725` for more details.)"
msgstr ""
#: ../../whatsnew/3.11.rst:442
msgid ""
"Asynchronous :ref:`comprehensions <comprehensions>` are now allowed inside "
"comprehensions in :ref:`asynchronous functions <async def>`. Outer "
"comprehensions implicitly become asynchronous in this case. (Contributed by "
"Serhiy Storchaka in :issue:`33346`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:447
msgid ""
"A :exc:`TypeError` is now raised instead of an :exc:`AttributeError` in :"
"keyword:`with` statements and :meth:`contextlib.ExitStack.enter_context` for "
"objects that do not support the :term:`context manager` protocol, and in :"
"keyword:`async with` statements and :meth:`contextlib.AsyncExitStack."
"enter_async_context` for objects not supporting the :term:`asynchronous "
"context manager` protocol. (Contributed by Serhiy Storchaka in :issue:"
"`12022` and :issue:`44471`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:455
msgid ""
"Added :meth:`object.__getstate__`, which provides the default implementation "
"of the :meth:`!__getstate__` method. :mod:`copy`\\ing and :mod:`pickle`\\ing "
"instances of subclasses of builtin types :class:`bytearray`, :class:`set`, :"
"class:`frozenset`, :class:`collections.OrderedDict`, :class:`collections."
"deque`, :class:`weakref.WeakSet`, and :class:`datetime.tzinfo` now copies "
"and pickles instance attributes implemented as :term:`slots <__slots__>`. "
"This change has an unintended side effect: It trips up a small minority of "
"existing Python projects not expecting :meth:`object.__getstate__` to exist. "
"See the later comments on :gh:`70766` for discussions of what workarounds "
"such code may need. (Contributed by Serhiy Storchaka in :issue:`26579`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:470
msgid ""
"Added a :option:`-P` command line option and a :envvar:`PYTHONSAFEPATH` "
"environment variable, which disable the automatic prepending to :data:`sys."
"path` of the script's directory when running a script, or the current "
"directory when using :option:`-c` and :option:`-m`. This ensures only stdlib "
"and installed modules are picked up by :keyword:`import`, and avoids "
"unintentionally or maliciously shadowing modules with those in a local (and "
"typically user-writable) directory. (Contributed by Victor Stinner in :gh:"
"`57684`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:481
msgid ""
"A ``\"z\"`` option was added to the :ref:`formatspec` that coerces negative "
"to positive zero after rounding to the format precision. See :pep:`682` for "
"more details. (Contributed by John Belmonte in :gh:`90153`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:486
msgid ""
"Bytes are no longer accepted on :data:`sys.path`. Support broke sometime "
"between Python 3.2 and 3.6, with no one noticing until after Python 3.10.0 "
"was released. In addition, bringing back support would be problematic due to "
"interactions between :option:`-b` and :data:`sys.path_importer_cache` when "
"there is a mixture of :class:`str` and :class:`bytes` keys. (Contributed by "
"Thomas Grainger in :gh:`91181`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:497
msgid "Other CPython Implementation Changes"
msgstr "その他の CPython の実装の変更"
#: ../../whatsnew/3.11.rst:499
msgid ""
"The special methods :meth:`~object.__complex__` for :class:`complex` and :"
"meth:`~object.__bytes__` for :class:`bytes` are implemented to support the :"
"class:`typing.SupportsComplex` and :class:`typing.SupportsBytes` protocols. "
"(Contributed by Mark Dickinson and Donghee Na in :issue:`24234`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:504
msgid ""
"``siphash13`` is added as a new internal hashing algorithm. It has similar "
"security properties as ``siphash24``, but it is slightly faster for long "
"inputs. :class:`str`, :class:`bytes`, and some other types now use it as the "
"default algorithm for :func:`hash`. :pep:`552` :ref:`hash-based .pyc files "
"<pyc-invalidation>` now use ``siphash13`` too. (Contributed by Inada Naoki "
"in :issue:`29410`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:513
msgid ""
"When an active exception is re-raised by a :keyword:`raise` statement with "
"no parameters, the traceback attached to this exception is now always ``sys."
"exc_info()[1].__traceback__``. This means that changes made to the traceback "
"in the current :keyword:`except` clause are reflected in the re-raised "
"exception. (Contributed by Irit Katriel in :issue:`45711`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:519
msgid ""
"The interpreter state's representation of handled exceptions (aka "
"``exc_info`` or ``_PyErr_StackItem``) now only has the ``exc_value`` field; "
"``exc_type`` and ``exc_traceback`` have been removed, as they can be derived "
"from ``exc_value``. (Contributed by Irit Katriel in :issue:`45711`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:525
msgid ""
"A new :ref:`command line option <install-quiet-option>`, ``AppendPath``, has "
"been added for the Windows installer. It behaves similarly to "
"``PrependPath``, but appends the install and scripts directories instead of "
"prepending them. (Contributed by Bastian Neuburger in :issue:`44934`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:531
msgid ""
"The :c:member:`PyConfig.module_search_paths_set` field must now be set to "
"``1`` for initialization to use :c:member:`PyConfig.module_search_paths` to "
"initialize :data:`sys.path`. Otherwise, initialization will recalculate the "
"path and replace any values added to ``module_search_paths``."
msgstr ""
#: ../../whatsnew/3.11.rst:536
msgid ""
"The output of the :option:`--help` option now fits in 50 lines/80 columns. "
"Information about :ref:`Python environment variables <using-on-envvars>` "
"and :option:`-X` options is now available using the respective :option:`--"
"help-env` and :option:`--help-xoptions` flags, and with the new :option:`--"
"help-all`. (Contributed by Éric Araujo in :issue:`46142`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:543
msgid ""
"Converting between :class:`int` and :class:`str` in bases other than 2 "
"(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) "
"now raises a :exc:`ValueError` if the number of digits in string form is "
"above a limit to avoid potential denial of service attacks due to the "
"algorithmic complexity. This is a mitigation for :cve:`2020-10735`. This "
"limit can be configured or disabled by environment variable, command line "
"flag, or :mod:`sys` APIs. See the :ref:`integer string conversion length "
"limitation <int_max_str_digits>` documentation. The default limit is 4300 "
"digits in string form."
msgstr ""
#: ../../whatsnew/3.11.rst:557
msgid "New Modules"
msgstr "新たなモジュール"
#: ../../whatsnew/3.11.rst:559
msgid ""
":mod:`tomllib`: For parsing `TOML <https://toml.io/>`_. See :pep:`680` for "
"more details. (Contributed by Taneli Hukkinen in :issue:`40059`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:563
msgid ""
":mod:`wsgiref.types`: :pep:`WSGI <3333>`-specific types for static type "
"checking. (Contributed by Sebastian Rittau in :issue:`42012`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:571
msgid "Improved Modules"
msgstr "改良されたモジュール"
#: ../../whatsnew/3.11.rst:576
msgid "asyncio"
msgstr "asyncio"
#: ../../whatsnew/3.11.rst:578
msgid ""
"Added the :class:`~asyncio.TaskGroup` class, an :ref:`asynchronous context "
"manager <async-context-managers>` holding a group of tasks that will wait "
"for all of them upon exit. For new code this is recommended over using :func:"
"`~asyncio.create_task` and :func:`~asyncio.gather` directly. (Contributed by "
"Yury Selivanov and others in :gh:`90908`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:585
msgid ""
"Added :func:`~asyncio.timeout`, an asynchronous context manager for setting "
"a timeout on asynchronous operations. For new code this is recommended over "
"using :func:`~asyncio.wait_for` directly. (Contributed by Andrew Svetlov in :"
"gh:`90927`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:590
msgid ""
"Added the :class:`~asyncio.Runner` class, which exposes the machinery used "
"by :func:`~asyncio.run`. (Contributed by Andrew Svetlov in :gh:`91218`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:594
msgid ""
"Added the :class:`~asyncio.Barrier` class to the synchronization primitives "
"in the asyncio library, and the related :exc:`~asyncio.BrokenBarrierError` "
"exception. (Contributed by Yves Duprat and Andrew Svetlov in :gh:`87518`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:599
msgid ""
"Added keyword argument *all_errors* to :meth:`asyncio.loop."
"create_connection` so that multiple connection errors can be raised as an :"
"exc:`ExceptionGroup`."
msgstr ""
#: ../../whatsnew/3.11.rst:602
msgid ""
"Added the :meth:`asyncio.StreamWriter.start_tls` method for upgrading "
"existing stream-based connections to TLS. (Contributed by Ian Good in :issue:"
"`34975`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:606
msgid ""
"Added raw datagram socket functions to the event loop: :meth:`~asyncio.loop."
"sock_sendto`, :meth:`~asyncio.loop.sock_recvfrom` and :meth:`~asyncio.loop."
"sock_recvfrom_into`. These have implementations in :class:`~asyncio."
"SelectorEventLoop` and :class:`~asyncio.ProactorEventLoop`. (Contributed by "
"Alex Grönholm in :issue:`46805`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:614
msgid ""
"Added :meth:`~asyncio.Task.cancelling` and :meth:`~asyncio.Task.uncancel` "
"methods to :class:`~asyncio.Task`. These are primarily intended for internal "
"use, notably by :class:`~asyncio.TaskGroup`."
msgstr ""
#: ../../whatsnew/3.11.rst:623
msgid "contextlib"
msgstr "contextlib"
#: ../../whatsnew/3.11.rst:625
msgid ""
"Added non parallel-safe :func:`~contextlib.chdir` context manager to change "
"the current working directory and then restore it on exit. Simple wrapper "
"around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)"
msgstr ""
#: ../../whatsnew/3.11.rst:633
msgid "dataclasses"
msgstr "データクラス"
#: ../../whatsnew/3.11.rst:635
msgid ""
"Change field default mutability check, allowing only defaults which are :"
"term:`hashable` instead of any object which is not an instance of :class:"
"`dict`, :class:`list` or :class:`set`. (Contributed by Eric V. Smith in :"
"issue:`44674`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:644
msgid "datetime"
msgstr "datetime"
#: ../../whatsnew/3.11.rst:646
msgid ""
"Add :const:`datetime.UTC`, a convenience alias for :attr:`datetime.timezone."
"utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:649
msgid ""
":meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` "
"and :meth:`datetime.datetime.fromisoformat` can now be used to parse most "
"ISO 8601 formats (barring only those that support fractional hours and "
"minutes). (Contributed by Paul Ganssle in :gh:`80010`.)"
msgstr ""
#: ../../whatsnew/3.11.rst:658
msgid "enum"
msgstr "enum"
#: ../../whatsnew/3.11.rst:660
msgid ""
"Renamed :class:`!EnumMeta` to :class:`~enum.EnumType` (:class:`!EnumMeta` "
"kept as an alias)."
msgstr ""
#: ../../whatsnew/3.11.rst:663
msgid ""
"Added :class:`~enum.StrEnum`, with members that can be used as (and must be) "
"strings."
msgstr ""
#: ../../whatsnew/3.11.rst:666
msgid ""
"Added :class:`~enum.ReprEnum`, which only modifies the :meth:`~object."
"__repr__` of members while returning their literal values (rather than "
"names) for :meth:`~object.__str__` and :meth:`~object.__format__` (used by :"
"func:`str`, :func:`format` and :term:`f-string`\\s)."
msgstr ""
#: ../../whatsnew/3.11.rst:672
msgid ""
"Changed :meth:`Enum.__format__() <enum.Enum.__format__>` (the default for :"
"func:`format`, :meth:`str.format` and :term:`f-string`\\s) to always produce "
"the same result as :meth:`Enum.__str__() <enum.Enum.__str__>`: for enums "
"inheriting from :class:`~enum.ReprEnum` it will be the member's value; for "
"all other enums it will be the enum and member name (e.g. ``Color.RED``)."
msgstr ""
#: ../../whatsnew/3.11.rst:678
msgid ""
"Added a new *boundary* class parameter to :class:`~enum.Flag` enums and the :"
"class:`~enum.FlagBoundary` enum with its options, to control how to handle "
"out-of-range flag values."
msgstr ""
#: ../../whatsnew/3.11.rst:682
msgid ""
"Added the :func:`~enum.verify` enum decorator and the :class:`~enum."
"EnumCheck` enum with its options, to check enum classes against several "
"specific constraints."
msgstr ""
#: ../../whatsnew/3.11.rst:686
msgid ""
"Added the :func:`~enum.member` and :func:`~enum.nonmember` decorators, to "
"ensure the decorated object is/is not converted to an enum member."
msgstr ""
#: ../../whatsnew/3.11.rst:689
msgid ""
"Added the :func:`~enum.property` decorator, which works like :func:"
"`property` except for enums. Use this instead of :func:`types."
"DynamicClassAttribute`."
msgstr ""
#: ../../whatsnew/3.11.rst:693
msgid ""
"Added the :func:`~enum.global_enum` enum decorator, which adjusts :meth:"
"`~object.__repr__` and :meth:`~object.__str__` to show values as members of "
"their module rather than the enum class. For example, ``'re.ASCII'`` for "
"the :const:`~re.ASCII` member of :class:`re.RegexFlag` rather than "
"``'RegexFlag.ASCII'``."
msgstr ""
#: ../../whatsnew/3.11.rst:699
msgid ""
"Enhanced :class:`~enum.Flag` to support :func:`len`, iteration and :keyword:"
"`in`/:keyword:`not in` on its members. For example, the following now works: "
"``len(AFlag(3)) == 2 and list(AFlag(3)) == (AFlag.ONE, AFlag.TWO)``"
msgstr ""
#: ../../whatsnew/3.11.rst:704
msgid ""
"Changed :class:`~enum.Enum` and :class:`~enum.Flag` so that members are now "
"defined before :meth:`~object.__init_subclass__` is called; :func:`dir` now "
"includes methods, etc., from mixed-in data types."
msgstr ""
#: ../../whatsnew/3.11.rst:709
msgid ""
"Changed :class:`~enum.Flag` to only consider primary values (power of two) "
"canonical while composite values (``3``, ``6``, ``10``, etc.) are considered "
"aliases; inverted flags are coerced to their positive equivalent."
msgstr ""
#: ../../whatsnew/3.11.rst:718
msgid "fcntl"
msgstr "fcntl"