Repository navigation
Expand file tree
/
Copy pathbytes.po
More file actions
987 lines (852 loc) · 36.8 KB
/
Copy pathbytes.po
File metadata and controls
987 lines (852 loc) · 36.8 KB
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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2026
# Inada Naoki <songofacandy@gmail.com>, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-03 20:20+0000\n"
"PO-Revision-Date: 2025-09-16 00:00+0000\n"
"Last-Translator: Inada Naoki <songofacandy@gmail.com>, 2026\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"
#: ../../c-api/bytes.rst:6
msgid "Bytes Objects"
msgstr "バイトオブジェクト"
#: ../../c-api/bytes.rst:8
msgid ""
"These functions raise :exc:`TypeError` when expecting a bytes parameter and "
"called with a non-bytes parameter."
msgstr ""
"下記の関数は、バイトオブジェクトを期待している引数にバイトオブジェクトでない"
"パラメタを指定して呼び出されると、 :exc:`TypeError` を送出します。"
msgid ""
"The internal buffer of :c:type:`PyBytesObject` always includes an extra "
"trailing null byte for compatibility with null terminated C strings. This "
"extra byte is not counted in :c:func:`PyBytes_Size` nor in the various "
"*length* and *size* arguments of the functions below."
msgstr ""
":c:type:`PyBytesObject` の内部バッファには、null 終端の C 文字列との互換性の"
"ため、末尾に常に追加の null バイトが含まれます。\n"
"この追加バイトは :c:func:`PyBytes_Size` や、以下の関数の各種 *length* 引数と "
"*size* 引数には数えません。"
#: ../../c-api/bytes.rst:23
msgid "This subtype of :c:type:`PyObject` represents a Python bytes object."
msgstr ""
"この :c:type:`PyObject` のサブタイプは、Python バイトオブジェクトを表します。"
#: ../../c-api/bytes.rst:28
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python bytes type; it "
"is the same object as :class:`bytes` in the Python layer."
msgstr ""
"この :c:type:`PyTypeObject` のインスタンスは、Python バイト型を表します; "
"Pythonレイヤの :class:`bytes` と同じオブジェクトです。"
#: ../../c-api/bytes.rst:34
msgid ""
"Return true if the object *o* is a bytes object or an instance of a subtype "
"of the bytes type. This function always succeeds."
msgstr ""
"オブジェクト *o* が bytes オブジェクトか bytes 型のサブタイプのインスタンスで"
"ある場合に真を返します。この関数は常に成功します。"
#: ../../c-api/bytes.rst:40
msgid ""
"Return true if the object *o* is a bytes object, but not an instance of a "
"subtype of the bytes type. This function always succeeds."
msgstr ""
"オブジェクト *o* が bytes オブジェクトだが bytes 型のサブタイプのインスタンス"
"でない場合に真を返します。この関数は常に成功します。"
#: ../../c-api/bytes.rst:46
msgid ""
"Return a new bytes object with a copy of the string *v* as value on success, "
"and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will "
"not be checked."
msgstr ""
"成功時に、文字列 *v* のコピーを値とする新しいバイトオブジェクトを返し、失敗時"
"に ``NULL`` を返します。\n"
"引数 *v* は ``NULL`` であってはなりません; そのチェックは行われません。"
#: ../../c-api/bytes.rst:53
msgid ""
"Return a new bytes object with a copy of the string *v* as value and length "
"*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents "
"of the bytes object are uninitialized."
msgstr ""
"成功時に、文字列 *v* のコピーを値とする長さ *len* の新しいバイトオブジェクト"
"を返し、失敗時に ``NULL`` を返します。\n"
"引数 *v* が ``NULL`` の場合、バイトオブジェクトの中身は初期化されていません。"
msgid ""
"Use the :c:type:`PyBytesWriter` API instead of "
"``PyBytes_FromStringAndSize(NULL, len)``."
msgstr ""
"``PyBytes_FromStringAndSize(NULL, len)`` の代わりに :c:type:`PyBytesWriter` "
"API を使ってください。"
#: ../../c-api/bytes.rst:64
msgid ""
"Take a C :c:func:`printf`\\ -style *format* string and a variable number of "
"arguments, calculate the size of the resulting Python bytes object and "
"return a bytes object with the values formatted into it. The variable "
"arguments must be C types and must correspond exactly to the format "
"characters in the *format* string. The following format characters are "
"allowed:"
msgstr ""
"C 関数の :c:func:`printf` スタイルの *format* 文字列と可変長の引数を取り、結"
"果のPython バイトオブジェクトのサイズを計算し、値を指定した書式にしたがって変"
"換したバイトオブジェクトを返します。可変長の引数は C のデータ型でなければなら"
"ず、 *format* 文字列中のフォーマット文字と厳密に関連付けられていなければなり"
"ません。下記のフォーマット文字が使用できます:"
#: ../../c-api/bytes.rst:76
msgid "Format Characters"
msgstr "書式指定文字"
#: ../../c-api/bytes.rst:76
msgid "Type"
msgstr "型"
#: ../../c-api/bytes.rst:76
msgid "Comment"
msgstr "備考"
#: ../../c-api/bytes.rst:78
msgid "``%%``"
msgstr "``%%``"
#: ../../c-api/bytes.rst:78
msgid "*n/a*"
msgstr "*n/a*"
#: ../../c-api/bytes.rst:78
msgid "The literal % character."
msgstr "リテラルの % 文字"
#: ../../c-api/bytes.rst:80
msgid "``%c``"
msgstr "``%c``"
#: ../../c-api/bytes.rst:80 ../../c-api/bytes.rst:83 ../../c-api/bytes.rst:101
#: ../../c-api/bytes.rst:104
msgid "int"
msgstr "int"
#: ../../c-api/bytes.rst:80
msgid "A single byte, represented as a C int."
msgstr "C の整数型で表現される単一のバイト。"
#: ../../c-api/bytes.rst:83
msgid "``%d``"
msgstr "``%d``"
#: ../../c-api/bytes.rst:83
msgid "Equivalent to ``printf(\"%d\")``. [1]_"
msgstr "``printf(\"%d\")`` と同等。 [1]_"
#: ../../c-api/bytes.rst:86
msgid "``%u``"
msgstr "``%u``"
#: ../../c-api/bytes.rst:86
msgid "unsigned int"
msgstr "unsigned int"
#: ../../c-api/bytes.rst:86
msgid "Equivalent to ``printf(\"%u\")``. [1]_"
msgstr "``printf(\"%u\")`` と同等。 [1]_"
#: ../../c-api/bytes.rst:89
msgid "``%ld``"
msgstr "``%ld``"
#: ../../c-api/bytes.rst:89
msgid "long"
msgstr "long"
#: ../../c-api/bytes.rst:89
msgid "Equivalent to ``printf(\"%ld\")``. [1]_"
msgstr "``printf(\"%ld\")`` と同等。 [1]_"
#: ../../c-api/bytes.rst:92
msgid "``%lu``"
msgstr "``%lu``"
#: ../../c-api/bytes.rst:92
msgid "unsigned long"
msgstr "unsigned long"
#: ../../c-api/bytes.rst:92
msgid "Equivalent to ``printf(\"%lu\")``. [1]_"
msgstr "``printf(\"%lu\")`` と同等。 [1]_"
#: ../../c-api/bytes.rst:95
msgid "``%zd``"
msgstr "``%zd``"
msgid ":c:type:` Py_ssize_t`"
msgstr ""
#: ../../c-api/bytes.rst:95
msgid "Equivalent to ``printf(\"%zd\")``. [1]_"
msgstr "``printf(\"%zd\")`` と同等。 [1]_"
#: ../../c-api/bytes.rst:98
msgid "``%zu``"
msgstr "``%zu``"
#: ../../c-api/bytes.rst:98
msgid "size_t"
msgstr "size_t"
#: ../../c-api/bytes.rst:98
msgid "Equivalent to ``printf(\"%zu\")``. [1]_"
msgstr "``printf(\"%zu\")`` と同等。 [1]_"
#: ../../c-api/bytes.rst:101
msgid "``%i``"
msgstr "``%i``"
#: ../../c-api/bytes.rst:101
msgid "Equivalent to ``printf(\"%i\")``. [1]_"
msgstr "``printf(\"%i\")`` と同等。 [1]_"
#: ../../c-api/bytes.rst:104
msgid "``%x``"
msgstr "``%x``"
#: ../../c-api/bytes.rst:104
msgid "Equivalent to ``printf(\"%x\")``. [1]_"
msgstr "``printf(\"%x\")`` と同等。 [1]_"
#: ../../c-api/bytes.rst:107
msgid "``%s``"
msgstr "``%s``"
#: ../../c-api/bytes.rst:107
msgid "const char\\*"
msgstr "const char\\*"
#: ../../c-api/bytes.rst:107
msgid "A null-terminated C character array."
msgstr "null で終端された C の文字列。"
#: ../../c-api/bytes.rst:110
msgid "``%p``"
msgstr "``%p``"
#: ../../c-api/bytes.rst:110
msgid "const void\\*"
msgstr "const void\\*"
#: ../../c-api/bytes.rst:110
msgid ""
"The hex representation of a C pointer. Mostly equivalent to "
"``printf(\"%p\")`` except that it is guaranteed to start with the literal "
"``0x`` regardless of what the platform's ``printf`` yields."
msgstr ""
"C ポインタの 16 進表記。``printf(\"%p\")`` とほとんど同じですが、プラット"
"フォームにおける ``printf`` の定義に関わりなく先頭にリテラル ``0x`` が付きま"
"す。"
#: ../../c-api/bytes.rst:119
msgid ""
"An unrecognized format character causes all the rest of the format string to "
"be copied as-is to the result object, and any extra arguments discarded."
msgstr ""
"識別できない書式指定文字があった場合、残りの書式文字列はそのまま結果のオブ"
"ジェクトにコピーされ、残りの引数は無視されます。"
#: ../../c-api/bytes.rst:122
msgid ""
"For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag "
"has effect even when a precision is given."
msgstr ""
"整数指定子 (d, u, ld, lu, zd, zu, i, x): 精度が与えられていても、0指定子は有"
"効です。"
#: ../../c-api/bytes.rst:128
msgid ""
"Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two "
"arguments."
msgstr ""
"ちょうど2つの引数を取ることを除いて、 :c:func:`PyBytes_FromFormat` と同じで"
"す。"
#: ../../c-api/bytes.rst:134
msgid ""
"Return the bytes representation of object *o* that implements the buffer "
"protocol."
msgstr "バッファプロトコルを実装するオブジェクト *o* のバイト表現を返します。"
msgid ""
"If the object implements the buffer protocol, then the buffer must not be "
"mutated while the bytes object is being created."
msgstr ""
"オブジェクトがバッファプロトコルを実装している場合、bytes オブジェクトの作成"
"中にそのバッファを変更してはいけません。"
#: ../../c-api/bytes.rst:144
msgid "Return the length of the bytes in bytes object *o*."
msgstr "バイトオブジェクト *o* のバイト単位の長さを返します。"
#: ../../c-api/bytes.rst:149
msgid "Similar to :c:func:`PyBytes_Size`, but without error checking."
msgstr ":c:func:`PyBytes_Size` に似ていますが、エラーチェックを行いません。"
msgid ""
"Return a pointer to the contents of *o*. The pointer refers to the internal "
"buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the "
"buffer is always null, regardless of whether there are any other null "
"bytes. The data must not be modified in any way, unless the object was just "
"created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be "
"deallocated. If *o* is not a bytes object at "
"all, :c:func:`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`."
msgstr ""
"*o* の内容へのポインタを返します。\n"
"このポインタは ``len(o) + 1`` バイトからなる *o* の内部バッファを参照しま"
"す。\n"
"内部に他の null バイトがあるかどうかにかかわらず、バッファの最後のバイトは常"
"に null です。\n"
"``PyBytes_FromStringAndSize(NULL, size)`` で作成したばかりのオブジェクトでな"
"い限り、データを変更してはいけません。\n"
"このバッファを解放してはいけません。\n"
"*o* が bytes オブジェクトでなければ、:c:func:`PyBytes_AsString` は ``NULL`` "
"を返し、:exc:`TypeError` を送出します。"
#: ../../c-api/bytes.rst:166
msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking."
msgstr ""
":c:func:`PyBytes_AsString` に似ていますが、エラーチェックを行いません。"
msgid ""
"Return the null-terminated contents of the object *obj* through the output "
"variables *buffer* and *length*. Returns ``0`` on success."
msgstr ""
"出力変数 *buffer* と *length* を通じて、オブジェクト *obj* の null 終端された"
"内容を返します。\n"
"成功すると ``0`` を返します。"
msgid ""
"If *length* is ``NULL``, the bytes object may not contain embedded null "
"bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is "
"raised."
msgstr ""
"*length* が ``NULL`` の場合、bytes オブジェクトの内部に null バイトが含まれて"
"いてはいけません。\n"
"含まれている場合は ``-1`` を返し、:exc:`ValueError` を送出します。"
msgid ""
"The buffer refers to an internal buffer of *obj*, which includes an "
"additional null byte at the end (not counted in *length*). The data must "
"not be modified in any way, unless the object was just created using "
"``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If "
"*obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` "
"returns ``-1`` and raises :exc:`TypeError`."
msgstr ""
"``buffer`` は *obj* の内部バッファを参照します。\n"
"このバッファには末尾に追加の null バイトが含まれます (*length* には数えませ"
"ん)。\n"
"``PyBytes_FromStringAndSize(NULL, size)`` で作成したばかりのオブジェクトでな"
"い限り、データを変更してはいけません。\n"
"このバッファを解放してはいけません。\n"
"*obj* が bytes オブジェクトでなければ、:c:func:`PyBytes_AsStringAndSize` は "
"``-1`` を返し、:exc:`TypeError` を送出します。"
#: ../../c-api/bytes.rst:186
msgid ""
"Previously, :exc:`TypeError` was raised when embedded null bytes were "
"encountered in the bytes object."
msgstr ""
"以前は bytes オブジェクトにヌルバイトが埋め込まれていたとき"
"に :exc:`TypeError` を送出していました。"
msgid ""
"Create a new bytes object in *\\*bytes* containing the contents of *newpart* "
"appended to *bytes*; the caller will own the new reference. The reference to "
"the old value of *bytes* will be \":term:`stolen <steal>`\". If the new "
"object cannot be created, the old reference to *bytes* will still be "
"\"stolen\", the value of *\\*bytes* will be set to ``NULL``, and the "
"appropriate exception will be set."
msgstr ""
"*bytes* の内容に *newpart* の内容を追加した新しい bytes オブジェクトを "
"*\\*bytes* に作成します。\n"
"呼び出し側はこの新しい参照を所有します。\n"
"*bytes* の元の値への参照は「:term:`盗まれます <steal>`」。\n"
"新しいオブジェクトを作成できない場合も、*bytes* の元の参照は「盗まれ」、"
"*\\*bytes* の値は ``NULL`` に設定され、適切な例外が設定されます。"
msgid ""
"If *newpart* implements the buffer protocol, then the buffer must not be "
"mutated while the new bytes object is being created."
msgstr ""
"*newpart* がバッファプロトコルを実装している場合、新しい bytes オブジェクトの"
"作成中にそのバッファを変更してはいけません。"
msgid ""
"Create a new bytes object in *\\*bytes* containing the contents of *newpart* "
"appended to *bytes*. This version releases the :term:`strong reference` to "
"*newpart* (i.e. decrements its reference count)."
msgstr ""
"*bytes* の内容に *newpart* の内容を追加した新しい bytes オブジェクトを "
"*\\*bytes* に作成します。\n"
"この関数は *newpart* への :term:`強参照 <strong reference>` を解放します (つ"
"まり参照カウントを減らします)。"
msgid "Similar to ``sep.join(iterable)`` in Python."
msgstr "Python の ``sep.join(iterable)`` と同様です。"
msgid ""
"*sep* must be Python :class:`bytes` object. (Note "
"that :c:func:`PyUnicode_Join` accepts ``NULL`` separator and treats it as a "
"space, whereas :c:func:`PyBytes_Join` doesn't accept ``NULL`` separator.)"
msgstr ""
"*sep* は Python の :class:`bytes` オブジェクトでなければなりません。\n"
"(:c:func:`PyUnicode_Join` は区切り文字として ``NULL`` を受け取り、空白として"
"扱いますが、:c:func:`PyBytes_Join` は区切り文字に ``NULL`` を受け付けませ"
"ん。)"
msgid ""
"*iterable* must be an iterable object yielding objects that implement "
"the :ref:`buffer protocol <bufferobjects>`."
msgstr ""
"*iterable* は :ref:`バッファプロトコル <bufferobjects>` を実装するオブジェク"
"トを生成するイテラブルオブジェクトでなければなりません。"
msgid ""
"On success, return a new :class:`bytes` object. On error, set an exception "
"and return ``NULL``."
msgstr ""
"成功すると新しい :class:`bytes` オブジェクトを返します。\n"
"エラー時には例外を設定して ``NULL`` を返します。"
msgid ""
"If *iterable* objects implement the buffer protocol, then the buffers must "
"not be mutated while the new bytes object is being created."
msgstr ""
"*iterable* のオブジェクトがバッファプロトコルを実装している場合、新しい "
"bytes オブジェクトの作成中にそれらのバッファを変更してはいけません。"
msgid ""
"Resize a bytes object. *newsize* will be the new length of the bytes object. "
"You can think of it as creating a new bytes object and destroying the old "
"one, only more efficiently. Pass the address of an existing bytes object as "
"an lvalue (it may be written into), and the new size desired. On success, "
"*\\*bytes* holds the resized bytes object and ``0`` is returned; the address "
"in *\\*bytes* may differ from its input value. If the reallocation fails, "
"the original bytes object at *\\*bytes* is deallocated, *\\*bytes* is set to "
"``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned."
msgstr ""
"bytes オブジェクトのサイズを変更します。\n"
"*newsize* が bytes オブジェクトの新しい長さになります。\n"
"新しい bytes オブジェクトを作成して古いものを破棄する操作を、より効率よく行う"
"ものと考えることができます。\n"
"既存の bytes オブジェクトのアドレスを左辺値 (書き込みが行われる可能性がありま"
"す) として渡し、希望する新しいサイズを指定します。\n"
"成功すると *\\*bytes* はサイズ変更後の bytes オブジェクトを保持し、``0`` を返"
"します。\n"
"*\\*bytes* のアドレスは入力時の値と異なる場合があります。\n"
"再割り当てに失敗すると、*\\*bytes* の元の bytes オブジェクトを解放し、"
"*\\*bytes* に ``NULL`` を設定し、:exc:`MemoryError` を設定して ``-1`` を返し"
"ます。"
msgid "Use the :c:type:`PyBytesWriter` API instead."
msgstr "代わりに :c:type:`PyBytesWriter` API を使ってください。"
msgid ""
"Get the string representation of *bytes*. This function is currently used to "
"implement :meth:`!bytes.__repr__` in Python."
msgstr ""
"*bytes* の文字列表現を取得します。\n"
"現在、この関数は Python の :meth:`!bytes.__repr__` の実装に使われています。"
msgid ""
"This function does not do type checking; it is undefined behavior to pass "
"*bytes* as a non-bytes object or ``NULL``."
msgstr ""
"この関数は型チェックを行いません。\n"
"*bytes* に bytes オブジェクト以外のオブジェクトや ``NULL`` を渡すと、動作は未"
"定義です。"
msgid ""
"If *smartquotes* is true, the representation will use a double-quoted string "
"instead of single-quoted string when single-quotes are present in *bytes*. "
"For example, the byte string ``'Python'`` would be represented as "
"``b\"'Python'\"`` when *smartquotes* is true, or ``b'\\'Python\\''`` when it "
"is false."
msgstr ""
"*smartquotes* が真の場合、*bytes* にシングルクォートが含まれていれば、その表"
"現にはシングルクォートの代わりにダブルクォートで囲んだ文字列を使います。\n"
"例えば、バイト文字列 ``'Python'`` の表現は、*smartquotes* が真なら "
"``b\"'Python'\"``、偽なら ``b'\\'Python\\''`` となります。"
msgid ""
"On success, this function returns a :term:`strong reference` to "
"a :class:`str` object containing the representation. On failure, this "
"returns ``NULL`` with an exception set."
msgstr ""
"成功すると、この関数は表現を格納した :class:`str` オブジェクトへの :term:`強"
"参照 <strong reference>` を返します。\n"
"失敗すると例外を設定して ``NULL`` を返します。"
msgid ""
"Unescape a backslash-escaped string *s*. *s* must not be ``NULL``. *len* "
"must be the size of *s*."
msgstr ""
"バックスラッシュでエスケープされた文字列 *s* のエスケープを解除します。\n"
"*s* は ``NULL`` であってはなりません。\n"
"*len* は *s* のサイズでなければなりません。"
msgid ""
"*errors* must be one of ``\"strict\"``, ``\"replace\"``, or ``\"ignore\"``. "
"If *errors* is ``NULL``, then ``\"strict\"`` is used by default."
msgstr ""
"*errors* は ``\"strict\"``、``\"replace\"``、``\"ignore\"`` のいずれかでなけ"
"ればなりません。\n"
"*errors* が ``NULL`` の場合、デフォルトで ``\"strict\"`` を使います。"
msgid ""
"On success, this function returns a :term:`strong reference` to a "
"Python :class:`bytes` object containing the unescaped string. On failure, "
"this function returns ``NULL`` with an exception set."
msgstr ""
"成功すると、この関数はエスケープを解除した文字列を格納する Python "
"の :class:`bytes` オブジェクトへの :term:`強参照 <strong reference>` を返しま"
"す。\n"
"失敗すると例外を設定して ``NULL`` を返します。"
msgid "*unicode* and *recode_encoding* are now unused."
msgstr "*unicode* と *recode_encoding* は使われなくなりました。"
msgid "PyBytesWriter"
msgstr "PyBytesWriter"
msgid ""
"The :c:type:`PyBytesWriter` API can be used to create a "
"Python :class:`bytes` object."
msgstr ""
":c:type:`PyBytesWriter` API を使って Python の :class:`bytes` オブジェクトを"
"作成できます。"
msgid "A bytes writer instance."
msgstr "bytes ライターのインスタンスです。"
msgid ""
"The API is **not thread safe**. To share a writer with multiple threads, a "
"critical section or a lock is needed."
msgstr ""
"この API は **スレッドセーフではありません**。\n"
"複数のスレッドでライターを共有するには、クリティカルセクションまたはロックが"
"必要です。"
msgid ""
"The instance must be destroyed by :c:func:`PyBytesWriter_Finish` on success, "
"or :c:func:`PyBytesWriter_Discard` on error."
msgstr ""
"成功時には :c:func:`PyBytesWriter_Finish`、エラー時に"
"は :c:func:`PyBytesWriter_Discard` でインスタンスを破棄しなければなりません。"
msgid "Create, Finish, Discard"
msgstr "作成、完了、破棄"
msgid "Create a :c:type:`PyBytesWriter` to write *size* bytes."
msgstr "*size* バイトを書き込むための :c:type:`PyBytesWriter` を作成します。"
msgid ""
"If *size* is greater than zero, allocate *size* bytes, and set the writer "
"size to *size*. The caller is responsible to write *size* bytes "
"using :c:func:`PyBytesWriter_GetData`. This function does not overallocate."
msgstr ""
"*size* がゼロより大きければ *size* バイトを割り当て、ライターのサイズを "
"*size* に設定します。\n"
"呼び出し側は :c:func:`PyBytesWriter_GetData` を使って *size* バイトを書き込む"
"責任があります。\n"
"この関数は余分な領域を割り当てません。"
msgid "On error, set an exception and return ``NULL``."
msgstr "エラー時には例外を設定して ``NULL`` を返します。"
msgid "*size* must be positive or zero."
msgstr "*size* は正の値またはゼロでなければなりません。"
msgid ""
"Finish a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`."
msgstr ""
":c:func:`PyBytesWriter_Create` で作成した :c:type:`PyBytesWriter` の処理を完"
"了します。"
msgid ""
"On success, return a Python :class:`bytes` object. On error, set an "
"exception and return ``NULL``."
msgstr ""
"成功すると Python の :class:`bytes` オブジェクトを返します。\n"
"エラー時には例外を設定して ``NULL`` を返します。"
msgid ""
"The writer instance is invalid after the call in any case. No API can be "
"called on the writer after :c:func:`PyBytesWriter_Finish`."
msgstr ""
"呼び出し後は、成功したかどうかにかかわらずライターのインスタンスは無効になり"
"ます。\n"
":c:func:`PyBytesWriter_Finish` の後に、そのライターに対して API を呼び出すこ"
"とはできません。"
msgid ""
"Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer to *size* "
"bytes before creating the :class:`bytes` object."
msgstr ""
":c:func:`PyBytesWriter_Finish` と同様ですが、:class:`bytes` オブジェクトを作"
"成する前にライターのサイズを *size* バイトに変更します。"
msgid ""
"Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer using *buf* "
"pointer before creating the :class:`bytes` object."
msgstr ""
":c:func:`PyBytesWriter_Finish` と同様ですが、:class:`bytes` オブジェクトを作"
"成する前に *buf* ポインタを使ってライターのサイズを変更します。"
msgid ""
"Set an exception and return ``NULL`` if *buf* pointer is outside the "
"internal buffer bounds."
msgstr ""
"*buf* ポインタが内部バッファの範囲外であれば、例外を設定して ``NULL`` を返し"
"ます。"
msgid "Function pseudo-code::"
msgstr "関数の疑似コードを示します。 ::"
msgid ""
"Py_ssize_t size = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n"
"return PyBytesWriter_FinishWithSize(writer, size);"
msgstr ""
"Py_ssize_t size = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n"
"return PyBytesWriter_FinishWithSize(writer, size);"
msgid ""
"Discard a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`."
msgstr ""
":c:func:`PyBytesWriter_Create` で作成した :c:type:`PyBytesWriter` を破棄しま"
"す。"
msgid "Do nothing if *writer* is ``NULL``."
msgstr "*writer* が ``NULL`` の場合は何もしません。"
msgid ""
"The writer instance is invalid after the call. No API can be called on the "
"writer after :c:func:`PyBytesWriter_Discard`."
msgstr ""
"呼び出し後はライターのインスタンスは無効になります。\n"
":c:func:`PyBytesWriter_Discard` の後に、そのライターに対して API を呼び出すこ"
"とはできません。"
#: ../../c-api/bytes.rst:364
msgid "High-level API"
msgstr "高レベルAPI"
msgid ""
"Grow the *writer* internal buffer by *size* bytes, write *size* bytes of "
"*bytes* at the *writer* end, and add *size* to the *writer* size."
msgstr ""
"*writer* の内部バッファを *size* バイト拡張し、*bytes* の *size* バイトを "
"*writer* の末尾に書き込み、*writer* のサイズに *size* を加えます。"
msgid ""
"If *size* is equal to ``-1``, call ``strlen(bytes)`` to get the string "
"length."
msgstr ""
"*size* が ``-1`` の場合は ``strlen(bytes)`` を呼び出して文字列の長さを取得し"
"ます。"
msgid "On success, return ``0``. On error, set an exception and return ``-1``."
msgstr ""
"成功すると ``0`` を返します。\n"
"エラー時には例外を設定して ``-1`` を返します。"
msgid ""
"Similar to :c:func:`PyBytes_FromFormat`, but write the output directly at "
"the writer end. Grow the writer internal buffer on demand. Then add the "
"written size to the writer size."
msgstr ""
":c:func:`PyBytes_FromFormat` と同様ですが、出力をライターの末尾に直接書き込み"
"ます。\n"
"必要に応じてライターの内部バッファを拡張します。\n"
"その後、書き込んだサイズをライターのサイズに加えます。"
msgid "Getters"
msgstr "値の取得"
msgid "Get the writer size."
msgstr "ライターのサイズを取得します。"
msgid ""
"The function does not invalidate pointers returned "
"by :c:func:`PyBytesWriter_GetData`."
msgstr ""
"この関数は :c:func:`PyBytesWriter_GetData` が返したポインタを無効にしません。"
msgid "The function cannot fail."
msgstr "この関数は失敗しません。"
msgid "Get the writer data: start of the internal buffer."
msgstr "ライターのデータ、つまり内部バッファの先頭を取得します。"
msgid ""
"The pointer remains valid until a :c:type:`PyBytesWriter` function other "
"than :c:func:`PyBytesWriter_GetData` or :c:func:`PyBytesWriter_GetSize` is "
"called on *writer*."
msgstr ""
"このポインタは、*writer* に対して :c:func:`PyBytesWriter_GetData` "
"と :c:func:`PyBytesWriter_GetSize` 以外の :c:type:`PyBytesWriter` 関数を呼び"
"出すまで有効です。"
#: ../../c-api/bytes.rst:412
msgid "Low-level API"
msgstr "低レベルAPI"
msgid ""
"Resize the writer to *size* bytes. It can be used to enlarge or to shrink "
"the writer. This function typically overallocates to achieve amortized "
"performance when resizing multiple times."
msgstr ""
"ライターのサイズを *size* バイトに変更します。\n"
"ライターの拡張にも縮小にも使えます。\n"
"この関数は通常、サイズ変更を繰り返したときの償却性能をよくするため、余分な領"
"域を割り当てます。"
msgid "Newly allocated bytes are left uninitialized."
msgstr "新しく割り当てられたバイトは初期化されません。"
msgid ""
"Resize the writer by adding *grow* bytes to the current writer size. This "
"function typically overallocates to achieve amortized performance when "
"resizing multiple times."
msgstr ""
"現在のライターのサイズに *grow* バイトを加えてサイズを変更します。\n"
"この関数は通常、サイズ変更を繰り返したときの償却性能をよくするため、余分な領"
"域を割り当てます。"
msgid "*grow* can be negative to shrink the writer."
msgstr "*grow* に負の値を指定するとライターを縮小できます。"
msgid ""
"Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer."
msgstr ""
":c:func:`PyBytesWriter_Grow` と同様ですが、*buf* ポインタも更新します。"
msgid ""
"The *buf* pointer is moved if the internal buffer is moved in memory. The "
"*buf* relative position within the internal buffer is left unchanged."
msgstr ""
"内部バッファがメモリ上で移動した場合は、*buf* ポインタも移動します。\n"
"内部バッファ内での *buf* の相対位置は変わりません。"
msgid "*buf* must not be ``NULL``."
msgstr "*buf* は ``NULL`` であってはなりません。"
msgid ""
"Py_ssize_t pos = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n"
"if (PyBytesWriter_Grow(writer, size) < 0) {\n"
" return NULL;\n"
"}\n"
"return (char*)PyBytesWriter_GetData(writer) + pos;"
msgstr ""
"Py_ssize_t pos = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n"
"if (PyBytesWriter_Grow(writer, size) < 0) {\n"
" return NULL;\n"
"}\n"
"return (char*)PyBytesWriter_GetData(writer) + pos;"
msgid "Example creating the string ``b'abc'``"
msgstr "文字列 ``b'abc'`` を作成する例"
msgid ""
"Example creating the bytes string ``b\"abc\"``, with a fixed size of 3 "
"bytes::"
msgstr "3 バイトの固定サイズでバイト文字列 ``b\"abc\"`` を作成する例です。 ::"
msgid ""
"PyObject* create_abc(void)\n"
"{\n"
" PyBytesWriter *writer = PyBytesWriter_Create(3);\n"
" if (writer == NULL) {\n"
" return NULL;\n"
" }\n"
"\n"
" char *str = PyBytesWriter_GetData(writer);\n"
" memcpy(str, \"abc\", 3);\n"
" return PyBytesWriter_Finish(writer);\n"
"}"
msgstr ""
"PyObject* create_abc(void)\n"
"{\n"
" PyBytesWriter *writer = PyBytesWriter_Create(3);\n"
" if (writer == NULL) {\n"
" return NULL;\n"
" }\n"
"\n"
" char *str = PyBytesWriter_GetData(writer);\n"
" memcpy(str, \"abc\", 3);\n"
" return PyBytesWriter_Finish(writer);\n"
"}"
msgid "Variant using a pointer to compute the final size::"
msgstr "ポインタを使って最終的なサイズを計算する別の例です。 ::"
msgid ""
"PyObject* create_abc_ptr(void)\n"
"{\n"
" PyBytesWriter *writer = PyBytesWriter_Create(3);\n"
" if (writer == NULL) {\n"
" return NULL;\n"
" }\n"
"\n"
" char *str = PyBytesWriter_GetData(writer);\n"
" memcpy(str, \"abc\", 3);\n"
" str += 3;\n"
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
"}"
msgstr ""
"PyObject* create_abc_ptr(void)\n"
"{\n"
" PyBytesWriter *writer = PyBytesWriter_Create(3);\n"
" if (writer == NULL) {\n"
" return NULL;\n"
" }\n"
"\n"
" char *str = PyBytesWriter_GetData(writer);\n"
" memcpy(str, \"abc\", 3);\n"
" str += 3;\n"
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
"}"
msgid "Update ``PyBytes_FromStringAndSize()`` code"
msgstr "``PyBytes_FromStringAndSize()`` を使うコードの更新"
msgid ""
"Example of code using the soft deprecated ``PyBytes_FromStringAndSize(NULL, "
"size)`` API::"
msgstr ""
"ソフト非推奨の API ``PyBytes_FromStringAndSize(NULL, size)`` を使うコードの例"
"です。 ::"
msgid ""
"int copy_bytes(char *dest, const char *src, Py_ssize_t num_bytes)\n"
"{\n"
" ...\n"
"}\n"
"\n"
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
"{\n"
" PyObject *result = PyBytes_FromStringAndSize(NULL, num_bytes);\n"
" if (result == NULL) {\n"
" return NULL;\n"
" }\n"
" if (copy_bytes(PyBytes_AS_STRING(result), start, num_bytes) < 0) {\n"
" Py_CLEAR(result);\n"
" }\n"
" return result;\n"
"}"
msgstr ""
"int copy_bytes(char *dest, const char *src, Py_ssize_t num_bytes)\n"
"{\n"
" ...\n"
"}\n"
"\n"
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
"{\n"
" PyObject *result = PyBytes_FromStringAndSize(NULL, num_bytes);\n"
" if (result == NULL) {\n"
" return NULL;\n"
" }\n"
" if (copy_bytes(PyBytes_AS_STRING(result), start, num_bytes) < 0) {\n"
" Py_CLEAR(result);\n"
" }\n"
" return result;\n"
"}"
msgid "It can now be updated to::"
msgstr "これを次のように更新できます。 ::"
msgid ""
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
"{\n"
" PyBytesWriter *writer = PyBytesWriter_Create(num_bytes);\n"
" if (writer == NULL) {\n"
" return NULL;\n"
" }\n"
" if (copy_bytes(PyBytesWriter_GetData(writer), start, num_bytes) < 0) {\n"
" PyBytesWriter_Discard(writer);\n"
" return NULL;\n"
" }\n"
" return PyBytesWriter_Finish(writer);\n"
"}"
msgstr ""
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
"{\n"
" PyBytesWriter *writer = PyBytesWriter_Create(num_bytes);\n"
" if (writer == NULL) {\n"
" return NULL;\n"
" }\n"
" if (copy_bytes(PyBytesWriter_GetData(writer), start, num_bytes) < 0) {\n"
" PyBytesWriter_Discard(writer);\n"
" return NULL;\n"
" }\n"
" return PyBytesWriter_Finish(writer);\n"
"}"
msgid "Update ``_PyBytes_Resize()`` code"
msgstr "``_PyBytes_Resize()`` を使うコードの更新"
msgid "Example of code using the soft deprecated ``_PyBytes_Resize()`` API::"
msgstr "ソフト非推奨の API ``_PyBytes_Resize()`` を使うコードの例です。 ::"
msgid ""
"PyObject* create_string(Py_ssize_t size)\n"
"{\n"
" PyObject *bytes = PyBytes_FromStringAndSize(NULL, size);\n"
" if (bytes == NULL) {\n"
" return NULL;\n"
" }\n"
" char *str = PyBytes_AS_STRING(bytes);\n"
"\n"
" // ... write data into str ...\n"
"\n"
" if (_PyBytes_Resize(&bytes, (str - PyBytes_AS_STRING(bytes)))) {\n"
" return NULL;\n"
" }\n"
" return bytes;\n"
"}"
msgstr ""
"PyObject* create_string(Py_ssize_t size)\n"
"{\n"
" PyObject *bytes = PyBytes_FromStringAndSize(NULL, size);\n"
" if (bytes == NULL) {\n"
" return NULL;\n"
" }\n"
" char *str = PyBytes_AS_STRING(bytes);\n"
"\n"
" // ... str にデータを書き込む ...\n"
"\n"
" if (_PyBytes_Resize(&bytes, (str - PyBytes_AS_STRING(bytes)))) {\n"
" return NULL;\n"
" }\n"
" return bytes;\n"
"}"
msgid ""
"PyObject* create_string(Py_ssize_t size)\n"
"{\n"
" PyBytesWriter *writer = PyBytesWriter_Create(size);\n"
" if (writer == NULL) {\n"
" return NULL;\n"
" }\n"
" char *str = PyBytesWriter_GetData(writer);\n"
"\n"
" // ... write data into str ...\n"
"\n"
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
"}"
msgstr ""
"PyObject* create_string(Py_ssize_t size)\n"
"{\n"
" PyBytesWriter *writer = PyBytesWriter_Create(size);\n"
" if (writer == NULL) {\n"
" return NULL;\n"
" }\n"
" char *str = PyBytesWriter_GetData(writer);\n"
"\n"
" // ... str にデータを書き込む ...\n"
"\n"
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
"}"
#: ../../c-api/bytes.rst:18
msgid "object"
msgstr "object"
#: ../../c-api/bytes.rst:18
msgid "bytes"
msgstr "bytes"