66msgstr ""
77"Project-Id-Version : Python 3.14\n "
88"Report-Msgid-Bugs-To : \n "
9- "POT-Creation-Date : 2026-03-28 00:21 +0000\n "
9+ "POT-Creation-Date : 2026-09-16 00:19 +0000\n "
1010"PO-Revision-Date : 2023-08-12 11:42+0800\n "
1111"Last-Translator : Liang-Bo Wang <me@liang2.tw>\n "
1212"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -27,109 +27,117 @@ msgid ""
2727"This subtype of :c:type:`PyObject` represents a Python bytearray object."
2828msgstr "這個 :c:type:`PyObject` 的子型別代表了 Python 的位元組陣列物件。"
2929
30- #: ../../c-api/bytearray.rst:18
30+ #: ../../c-api/bytearray.rst:17
31+ msgid ""
32+ "The internal buffer of :c:type:`PyByteArrayObject` always includes an extra "
33+ "trailing null byte for compatibility with null terminated C strings. This "
34+ "extra byte is not counted in :c:func:`PyByteArray_Size` nor in the *len* "
35+ "arguments of the functions below."
36+ msgstr ""
37+
38+ #: ../../c-api/bytearray.rst:24
3139msgid ""
3240"This instance of :c:type:`PyTypeObject` represents the Python bytearray "
3341"type; it is the same object as :class:`bytearray` in the Python layer."
3442msgstr ""
3543"這個 :c:type:`PyTypeObject` 的實例代表了 Python 的位元組陣列型別;在 Python "
3644"層中的 :class:`bytearray` 為同一個物件。"
3745
38- #: ../../c-api/bytearray.rst:23
46+ #: ../../c-api/bytearray.rst:29
3947msgid "Type check macros"
4048msgstr "型別檢查巨集"
4149
42- #: ../../c-api/bytearray.rst:27
50+ #: ../../c-api/bytearray.rst:33
4351msgid ""
4452"Return true if the object *o* is a bytearray object or an instance of a "
4553"subtype of the bytearray type. This function always succeeds."
4654msgstr ""
4755"如果物件 *o* 是一個位元組陣列物件,或者是位元組陣列型別的子型別的實例,則回傳"
4856"真值。此函式總是會成功執行。"
4957
50- #: ../../c-api/bytearray.rst:33
58+ #: ../../c-api/bytearray.rst:39
5159msgid ""
5260"Return true if the object *o* is a bytearray object, but not an instance of "
5361"a subtype of the bytearray type. This function always succeeds."
5462msgstr ""
5563"如果物件 *o* 是一個位元組陣列物件,但不是位元組陣列型別的子型別的實例,則回傳"
5664"真值。此函式總是會成功執行。"
5765
58- #: ../../c-api/bytearray.rst:38
66+ #: ../../c-api/bytearray.rst:44
5967msgid "Direct API functions"
6068msgstr "直接 API 函式"
6169
62- #: ../../c-api/bytearray.rst:42
70+ #: ../../c-api/bytearray.rst:48
6371msgid ""
6472"Return a new bytearray object from any object, *o*, that implements the :ref:"
6573"`buffer protocol <bufferobjects>`."
6674msgstr ""
6775"由任意物件 *o* 回傳一個新的位元組陣列物件,並實作了\\ :ref:`緩衝協定 (buffer "
6876"protocol) <bufferobjects>`。"
6977
70- #: ../../c-api/bytearray.rst:45 ../../c-api/bytearray.rst:56
71- #: ../../c-api/bytearray.rst:63
78+ #: ../../c-api/bytearray.rst:51 ../../c-api/bytearray.rst:62
79+ #: ../../c-api/bytearray.rst:69
7280msgid "On failure, return ``NULL`` with an exception set."
7381msgstr "在失敗時,會回傳 ``NULL`` 並設定例外。"
7482
75- #: ../../c-api/bytearray.rst:48 ../../c-api/bytearray.rst:66
83+ #: ../../c-api/bytearray.rst:54 ../../c-api/bytearray.rst:72
7684msgid ""
7785"If the object implements the buffer protocol, then the buffer must not be "
7886"mutated while the bytearray object is being created."
7987msgstr ""
8088
81- #: ../../c-api/bytearray.rst:54
89+ #: ../../c-api/bytearray.rst:60
8290msgid "Create a new bytearray object from *string* and its length, *len*."
8391msgstr "從 *string* 及其長度 *len* 建立一個新的位元組陣列物件。"
8492
85- #: ../../c-api/bytearray.rst:61
93+ #: ../../c-api/bytearray.rst:67
8694msgid ""
8795"Concat bytearrays *a* and *b* and return a new bytearray with the result."
8896msgstr "連接位元組陣列 *a* 和 *b*,並回傳一個包含結果的新位元組陣列。"
8997
90- #: ../../c-api/bytearray.rst:72
98+ #: ../../c-api/bytearray.rst:78
9199msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer."
92100msgstr "在檢查為 ``NULL`` 指標後,回傳 *bytearray* 的大小。"
93101
94- #: ../../c-api/bytearray.rst:77
102+ #: ../../c-api/bytearray.rst:83
95103msgid ""
96104"Return the contents of *bytearray* as a char array after checking for a "
97105"``NULL`` pointer. The returned array always has an extra null byte appended."
98106msgstr ""
99107"在檢查是否為 ``NULL`` 指標後,將 *bytearray* 的內容回傳為字元陣列。回傳的陣列"
100108"總是會多附加一個空位元組。"
101109
102- #: ../../c-api/bytearray.rst:82 ../../c-api/bytearray.rst:104
110+ #: ../../c-api/bytearray.rst:88 ../../c-api/bytearray.rst:110
103111msgid ""
104112"It is not thread-safe to mutate the bytearray object while using the "
105113"returned char array."
106114msgstr ""
107115
108- #: ../../c-api/bytearray.rst:87
116+ #: ../../c-api/bytearray.rst:93
109117msgid ""
110118"Resize the internal buffer of *bytearray* to *len*. Failure is a ``-1`` "
111119"return with an exception set."
112120msgstr ""
113121"將 *bytearray* 的內部緩衝區大小調整為 *len*。失敗時會回傳 ``-1`` 並設定例外。"
114122
115- #: ../../c-api/bytearray.rst:90
123+ #: ../../c-api/bytearray.rst:96
116124msgid ""
117125"A negative *len* will now result in an exception being set and -1 returned."
118126msgstr "負的 *len* 現在會設定例外並回傳 -1。"
119127
120- #: ../../c-api/bytearray.rst:95
128+ #: ../../c-api/bytearray.rst:101
121129msgid "Macros"
122130msgstr "巨集"
123131
124- #: ../../c-api/bytearray.rst:97
132+ #: ../../c-api/bytearray.rst:103
125133msgid "These macros trade safety for speed and they don't check pointers."
126134msgstr "這些巨集犧牲了安全性以換取速度,並且它們不會檢查指標。"
127135
128- #: ../../c-api/bytearray.rst:101
136+ #: ../../c-api/bytearray.rst:107
129137msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking."
130138msgstr "與 :c:func:`PyByteArray_AsString` 類似,但沒有錯誤檢查。"
131139
132- #: ../../c-api/bytearray.rst:109
140+ #: ../../c-api/bytearray.rst:115
133141msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking."
134142msgstr "與 :c:func:`PyByteArray_Size` 類似,但沒有錯誤檢查。"
135143
0 commit comments