|
1 |
| -# SOME DESCRIPTIVE TITLE. |
2 |
| -# Copyright (C) 2001-2023, Python Software Foundation |
3 |
| -# This file is distributed under the same license as the Python package. |
4 |
| -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
5 | 1 | #
|
6 |
| -# Translators: |
7 |
| -# Rafael Fontenelle <rffontenelle@gmail.com>, 2023 |
8 |
| -# |
9 |
| -#, fuzzy |
10 | 2 | msgid ""
|
11 | 3 | msgstr ""
|
12 |
| -"Project-Id-Version: Python 3.10\n" |
13 |
| -"Report-Msgid-Bugs-To: \n" |
14 |
| -"POT-Creation-Date: 2023-08-18 15:12+0000\n" |
15 |
| -"PO-Revision-Date: 2022-11-05 17:21+0000\n" |
16 |
| -"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n" |
17 | 4 | "Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
|
18 |
| -"MIME-Version: 1.0\n" |
19 |
| -"Content-Type: text/plain; charset=UTF-8\n" |
20 |
| -"Content-Transfer-Encoding: 8bit\n" |
21 | 5 | "Language: zh_CN\n"
|
22 | 6 | "Plural-Forms: nplurals=1; plural=0;\n"
|
23 |
| - |
24 |
| -#: ../../c-api/bytes.rst:6 |
25 |
| -msgid "Bytes Objects" |
26 |
| -msgstr "bytes 对象" |
27 |
| - |
28 |
| -#: ../../c-api/bytes.rst:8 |
29 |
| -msgid "" |
30 |
| -"These functions raise :exc:`TypeError` when expecting a bytes parameter and " |
31 |
| -"called with a non-bytes parameter." |
32 |
| -msgstr "这些函数在期望附带一个字节串形参但却附带了一个非字节串形参被调用时会引发 :exc:`TypeError`。" |
33 |
| - |
34 |
| -#: ../../c-api/bytes.rst:16 |
35 |
| -msgid "This subtype of :c:type:`PyObject` represents a Python bytes object." |
36 |
| -msgstr "这种 :c:type:`PyObject` 的子类型表示一个 Python 字节对象。" |
37 |
| - |
38 |
| -#: ../../c-api/bytes.rst:21 |
39 |
| -msgid "" |
40 |
| -"This instance of :c:type:`PyTypeObject` represents the Python bytes type; it" |
41 |
| -" is the same object as :class:`bytes` in the Python layer." |
42 |
| -msgstr "" |
43 |
| -":c:type:`PyTypeObject` 的实例代表一个 Python 字节类型,在 Python 层面它与 :class:`bytes` " |
44 |
| -"是相同的对象。" |
45 |
| - |
46 |
| -#: ../../c-api/bytes.rst:27 |
47 |
| -msgid "" |
48 |
| -"Return true if the object *o* is a bytes object or an instance of a subtype " |
49 |
| -"of the bytes type. This function always succeeds." |
50 |
| -msgstr "如果对象 *o* 是一个 bytes 对象或者 bytes 类型的子类型的实例则返回真值。 此函数总是会成功执行。" |
51 |
| - |
52 |
| -#: ../../c-api/bytes.rst:33 |
53 |
| -msgid "" |
54 |
| -"Return true if the object *o* is a bytes object, but not an instance of a " |
55 |
| -"subtype of the bytes type. This function always succeeds." |
56 |
| -msgstr "如果对象 *o* 是一个 bytes 对象但不是 bytes 类型的子类型的实例则返回真值。 此函数总是会成功执行。" |
57 |
| - |
58 |
| -#: ../../c-api/bytes.rst:39 |
59 |
| -msgid "" |
60 |
| -"Return a new bytes object with a copy of the string *v* as value on success," |
61 |
| -" and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will " |
62 |
| -"not be checked." |
63 |
| -msgstr "" |
64 |
| -"成功时返回一个以字符串 *v* 的副本为值的新字节串对象,失败时返回 ``NULL``。 形参 *v* 不可为 ``NULL``;它不会被检查。" |
65 |
| - |
66 |
| -#: ../../c-api/bytes.rst:46 |
67 |
| -msgid "" |
68 |
| -"Return a new bytes object with a copy of the string *v* as value and length " |
69 |
| -"*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents" |
70 |
| -" of the bytes object are uninitialized." |
71 |
| -msgstr "" |
72 |
| -"成功时返回一个以字符串 *v* 的副本为值且长度为 *len* 的新字节串对象,失败时返回 ``NULL``。 如果 *v* 为 " |
73 |
| -"``NULL``,则不初始化字节串对象的内容。" |
74 |
| - |
75 |
| -#: ../../c-api/bytes.rst:53 |
76 |
| -msgid "" |
77 |
| -"Take a C :c:func:`printf`\\ -style *format* string and a variable number of " |
78 |
| -"arguments, calculate the size of the resulting Python bytes object and " |
79 |
| -"return a bytes object with the values formatted into it. The variable " |
80 |
| -"arguments must be C types and must correspond exactly to the format " |
81 |
| -"characters in the *format* string. The following format characters are " |
82 |
| -"allowed:" |
83 |
| -msgstr "" |
84 |
| -"接受一个 C :c:func:`printf` 风格的 *format* 字符串和可变数量的参数,计算结果 Python " |
85 |
| -"字节串对象的大小并返回参数值经格式化后的字节串对象。 可变数量的参数必须均为 C 类型并且必须恰好与 *format* 字符串中的格式字符相对应。 " |
86 |
| -"允许使用下列格式字符串:" |
87 |
| - |
88 |
| -#: ../../c-api/bytes.rst:68 |
89 |
| -msgid "Format Characters" |
90 |
| -msgstr "格式字符" |
91 |
| - |
92 |
| -#: ../../c-api/bytes.rst:68 |
93 |
| -msgid "Type" |
94 |
| -msgstr "类型" |
95 |
| - |
96 |
| -#: ../../c-api/bytes.rst:68 |
97 |
| -msgid "Comment" |
98 |
| -msgstr "注释" |
99 |
| - |
100 |
| -#: ../../c-api/bytes.rst:70 |
101 |
| -msgid ":attr:`%%`" |
102 |
| -msgstr ":attr:`%%`" |
103 |
| - |
104 |
| -#: ../../c-api/bytes.rst:70 |
105 |
| -msgid "*n/a*" |
106 |
| -msgstr "*不适用*" |
107 |
| - |
108 |
| -#: ../../c-api/bytes.rst:70 |
109 |
| -msgid "The literal % character." |
110 |
| -msgstr "文字%字符。" |
111 |
| - |
112 |
| -#: ../../c-api/bytes.rst:72 |
113 |
| -msgid ":attr:`%c`" |
114 |
| -msgstr ":attr:`%c`" |
115 |
| - |
116 |
| -#: ../../c-api/bytes.rst:72 ../../c-api/bytes.rst:75 ../../c-api/bytes.rst:93 |
117 |
| -#: ../../c-api/bytes.rst:96 |
118 |
| -msgid "int" |
119 |
| -msgstr "int" |
120 |
| - |
121 |
| -#: ../../c-api/bytes.rst:72 |
122 |
| -msgid "A single byte, represented as a C int." |
123 |
| -msgstr "一个字节,被表示为一个 C 语言的整型" |
124 |
| - |
125 |
| -#: ../../c-api/bytes.rst:75 |
126 |
| -msgid ":attr:`%d`" |
127 |
| -msgstr ":attr:`%d`" |
128 |
| - |
129 |
| -#: ../../c-api/bytes.rst:75 |
130 |
| -msgid "Equivalent to ``printf(\"%d\")``. [1]_" |
131 |
| -msgstr "相当于 ``printf(\"%d\")``. [1]_" |
132 |
| - |
133 |
| -#: ../../c-api/bytes.rst:78 |
134 |
| -msgid ":attr:`%u`" |
135 |
| -msgstr ":attr:`%u`" |
136 |
| - |
137 |
| -#: ../../c-api/bytes.rst:78 |
138 |
| -msgid "unsigned int" |
139 |
| -msgstr "unsigned int" |
140 |
| - |
141 |
| -#: ../../c-api/bytes.rst:78 |
142 |
| -msgid "Equivalent to ``printf(\"%u\")``. [1]_" |
143 |
| -msgstr "相当于 ``printf(\"%u\")``. [1]_" |
144 |
| - |
145 |
| -#: ../../c-api/bytes.rst:81 |
146 |
| -msgid ":attr:`%ld`" |
147 |
| -msgstr ":attr:`%ld`" |
148 |
| - |
149 |
| -#: ../../c-api/bytes.rst:81 |
150 |
| -msgid "long" |
151 |
| -msgstr "长整型" |
152 |
| - |
153 |
| -#: ../../c-api/bytes.rst:81 |
154 |
| -msgid "Equivalent to ``printf(\"%ld\")``. [1]_" |
155 |
| -msgstr "相当于 ``printf(\"%ld\")``. [1]_" |
156 |
| - |
157 |
| -#: ../../c-api/bytes.rst:84 |
158 |
| -msgid ":attr:`%lu`" |
159 |
| -msgstr ":attr:`%lu`" |
160 |
| - |
161 |
| -#: ../../c-api/bytes.rst:84 |
162 |
| -msgid "unsigned long" |
163 |
| -msgstr "unsigned long" |
164 |
| - |
165 |
| -#: ../../c-api/bytes.rst:84 |
166 |
| -msgid "Equivalent to ``printf(\"%lu\")``. [1]_" |
167 |
| -msgstr "相当于 ``printf(\"%lu\")``. [1]_" |
168 |
| - |
169 |
| -#: ../../c-api/bytes.rst:87 |
170 |
| -msgid ":attr:`%zd`" |
171 |
| -msgstr ":attr:`%zd`" |
172 |
| - |
173 |
| -#: ../../c-api/bytes.rst:87 |
174 |
| -msgid ":c:type:`\\ Py_ssize_t`" |
175 |
| -msgstr ":c:type:`\\ Py_ssize_t`" |
176 |
| - |
177 |
| -#: ../../c-api/bytes.rst:87 |
178 |
| -msgid "Equivalent to ``printf(\"%zd\")``. [1]_" |
179 |
| -msgstr "相当于 ``printf(\"%zd\")``. [1]_" |
180 |
| - |
181 |
| -#: ../../c-api/bytes.rst:90 |
182 |
| -msgid ":attr:`%zu`" |
183 |
| -msgstr ":attr:`%zu`" |
184 |
| - |
185 |
| -#: ../../c-api/bytes.rst:90 |
186 |
| -msgid "size_t" |
187 |
| -msgstr "size_t" |
188 |
| - |
189 |
| -#: ../../c-api/bytes.rst:90 |
190 |
| -msgid "Equivalent to ``printf(\"%zu\")``. [1]_" |
191 |
| -msgstr "相当于 ``printf(\"%zu\")``. [1]_" |
192 |
| - |
193 |
| -#: ../../c-api/bytes.rst:93 |
194 |
| -msgid ":attr:`%i`" |
195 |
| -msgstr ":attr:`%i`" |
196 |
| - |
197 |
| -#: ../../c-api/bytes.rst:93 |
198 |
| -msgid "Equivalent to ``printf(\"%i\")``. [1]_" |
199 |
| -msgstr "相当于 ``printf(\"%i\")``. [1]_" |
200 |
| - |
201 |
| -#: ../../c-api/bytes.rst:96 |
202 |
| -msgid ":attr:`%x`" |
203 |
| -msgstr ":attr:`%x`" |
204 |
| - |
205 |
| -#: ../../c-api/bytes.rst:96 |
206 |
| -msgid "Equivalent to ``printf(\"%x\")``. [1]_" |
207 |
| -msgstr "相当于 ``printf(\"%x\")``. [1]_" |
208 |
| - |
209 |
| -#: ../../c-api/bytes.rst:99 |
210 |
| -msgid ":attr:`%s`" |
211 |
| -msgstr ":attr:`%s`" |
212 |
| - |
213 |
| -#: ../../c-api/bytes.rst:99 |
214 |
| -msgid "const char\\*" |
215 |
| -msgstr "const char\\*" |
216 |
| - |
217 |
| -#: ../../c-api/bytes.rst:99 |
218 |
| -msgid "A null-terminated C character array." |
219 |
| -msgstr "以 null 为终止符的 C 字符数组。" |
220 |
| - |
221 |
| -#: ../../c-api/bytes.rst:102 |
222 |
| -msgid ":attr:`%p`" |
223 |
| -msgstr ":attr:`%p`" |
224 |
| - |
225 |
| -#: ../../c-api/bytes.rst:102 |
226 |
| -msgid "const void\\*" |
227 |
| -msgstr "const void\\*" |
228 |
| - |
229 |
| -#: ../../c-api/bytes.rst:102 |
230 |
| -msgid "" |
231 |
| -"The hex representation of a C pointer. Mostly equivalent to " |
232 |
| -"``printf(\"%p\")`` except that it is guaranteed to start with the literal " |
233 |
| -"``0x`` regardless of what the platform's ``printf`` yields." |
234 |
| -msgstr "" |
235 |
| -"一个 C 指针的十六进制表示形式。 基本等价于 ``printf(\"%p\")`` 但它会确保以字面值 ``0x`` 开头,不论系统平台上 " |
236 |
| -"``printf`` 的输出是什么。" |
237 |
| - |
238 |
| -#: ../../c-api/bytes.rst:111 |
239 |
| -msgid "" |
240 |
| -"An unrecognized format character causes all the rest of the format string to" |
241 |
| -" be copied as-is to the result object, and any extra arguments discarded." |
242 |
| -msgstr "无法识别的格式字符会导致将格式字符串的其余所有内容原样复制到结果对象,并丢弃所有多余的参数。" |
243 |
| - |
244 |
| -#: ../../c-api/bytes.rst:114 |
245 |
| -msgid "" |
246 |
| -"For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag " |
247 |
| -"has effect even when a precision is given." |
248 |
| -msgstr "对于整数说明符(d,u,ld,lu,zd,zu,i,x):当给出精度时,0 转换标志是有效的。" |
249 |
| - |
250 |
| -#: ../../c-api/bytes.rst:120 |
251 |
| -msgid "" |
252 |
| -"Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two " |
253 |
| -"arguments." |
254 |
| -msgstr "与 :c:func:`PyBytes_FromFormat` 完全相同,除了它需要两个参数。" |
255 |
| - |
256 |
| -#: ../../c-api/bytes.rst:126 |
257 |
| -msgid "" |
258 |
| -"Return the bytes representation of object *o* that implements the buffer " |
259 |
| -"protocol." |
260 |
| -msgstr "返回字节表示实现缓冲区协议的对象*o*。" |
261 |
| - |
262 |
| -#: ../../c-api/bytes.rst:132 |
263 |
| -msgid "Return the length of the bytes in bytes object *o*." |
264 |
| -msgstr "返回字节对象*o*中字节的长度。" |
265 |
| - |
266 |
| -#: ../../c-api/bytes.rst:137 |
267 |
| -msgid "Macro form of :c:func:`PyBytes_Size` but without error checking." |
268 |
| -msgstr "宏版本的 :c:func:`PyBytes_Size` 但是不带错误检测。" |
269 |
| - |
270 |
| -#: ../../c-api/bytes.rst:142 |
271 |
| -msgid "" |
272 |
| -"Return a pointer to the contents of *o*. The pointer refers to the internal" |
273 |
| -" buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in " |
274 |
| -"the buffer is always null, regardless of whether there are any other null " |
275 |
| -"bytes. The data must not be modified in any way, unless the object was just" |
276 |
| -" created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be " |
277 |
| -"deallocated. If *o* is not a bytes object at all, " |
278 |
| -":c:func:`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." |
279 |
| -msgstr "" |
280 |
| -"返回对应 *o* 的内容的指针。 该指针指向 *o* 的内部缓冲区,其中包含 ``len(o) + 1`` 个字节。 " |
281 |
| -"缓冲区的最后一个字节总是为空,不论是否存在其他空字节。 该数据不可通过任何形式来修改,除非是刚使用 " |
282 |
| -"``PyBytes_FromStringAndSize(NULL, size)`` 创建该对象。 它不可被撤销分配。 如果 *o* " |
283 |
| -"根本不是一个字节串对象,则 :c:func:`PyBytes_AsString` 将返回 ``NULL`` 并引发 :exc:`TypeError`。" |
284 |
| - |
285 |
| -#: ../../c-api/bytes.rst:154 |
286 |
| -msgid "Macro form of :c:func:`PyBytes_AsString` but without error checking." |
287 |
| -msgstr "宏版本的 :c:func:`PyBytes_AsString` 但是不带错误检测。" |
288 |
| - |
289 |
| -#: ../../c-api/bytes.rst:159 |
290 |
| -msgid "" |
291 |
| -"Return the null-terminated contents of the object *obj* through the output " |
292 |
| -"variables *buffer* and *length*." |
293 |
| -msgstr "通过输出变量 *buffer* 和 *length* 返回以 null 为终止符的对象 *obj* 的内容。" |
294 |
| - |
295 |
| -#: ../../c-api/bytes.rst:162 |
296 |
| -msgid "" |
297 |
| -"If *length* is ``NULL``, the bytes object may not contain embedded null " |
298 |
| -"bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is " |
299 |
| -"raised." |
300 |
| -msgstr "" |
301 |
| -"如果 *length* 为 ``NULL``,字节串对象就不包含嵌入的空字节;如果包含,则该函数将返回 ``-1`` 并引发 " |
302 |
| -":exc:`ValueError`。" |
303 |
| - |
304 |
| -#: ../../c-api/bytes.rst:166 |
305 |
| -msgid "" |
306 |
| -"The buffer refers to an internal buffer of *obj*, which includes an " |
307 |
| -"additional null byte at the end (not counted in *length*). The data must " |
308 |
| -"not be modified in any way, unless the object was just created using " |
309 |
| -"``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If " |
310 |
| -"*obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` " |
311 |
| -"returns ``-1`` and raises :exc:`TypeError`." |
312 |
| -msgstr "" |
313 |
| -"该缓冲区指向 *obj* 的内部缓冲,它的末尾包含一个额外的空字节(不算在 *length* 当中)。 该数据不可通过任何方式来修改,除非是刚使用 " |
314 |
| -"``PyBytes_FromStringAndSize(NULL, size)`` 创建该对象。 它不可被撤销分配。 如果 *obj* " |
315 |
| -"根本不是一个字节串对象,则 :c:func:`PyBytes_AsStringAndSize` 将返回 ``-1`` 并引发 " |
316 |
| -":exc:`TypeError`。" |
317 |
| - |
318 |
| -#: ../../c-api/bytes.rst:173 |
319 |
| -msgid "" |
320 |
| -"Previously, :exc:`TypeError` was raised when embedded null bytes were " |
321 |
| -"encountered in the bytes object." |
322 |
| -msgstr "以前,当字节串对象中出现嵌入的空字节时将引发 :exc:`TypeError`。" |
323 |
| - |
324 |
| -#: ../../c-api/bytes.rst:180 |
325 |
| -msgid "" |
326 |
| -"Create a new bytes object in *\\*bytes* containing the contents of *newpart*" |
327 |
| -" appended to *bytes*; the caller will own the new reference. The reference " |
328 |
| -"to the old value of *bytes* will be stolen. If the new object cannot be " |
329 |
| -"created, the old reference to *bytes* will still be discarded and the value " |
330 |
| -"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be " |
331 |
| -"set." |
332 |
| -msgstr "" |
333 |
| -"在 *\\*bytes* 中创建新的字节串对象,其中包含添加到 *bytes* 的 *newpart* 的内容;调用者将获得新的引用。 对 " |
334 |
| -"*bytes* 原值的引用将被收回。 如果无法创建新对象,对 *bytes* 的旧引用仍将被丢弃且 *\\*bytes* 的值将被设为 " |
335 |
| -"``NULL``;并将设置适当的异常。" |
336 |
| - |
337 |
| -#: ../../c-api/bytes.rst:189 |
338 |
| -msgid "" |
339 |
| -"Create a new bytes object in *\\*bytes* containing the contents of *newpart*" |
340 |
| -" appended to *bytes*. This version releases the :term:`strong reference` to" |
341 |
| -" *newpart* (i.e. decrements its reference count)." |
342 |
| -msgstr "" |
343 |
| -"在 *\\*bytes* 中创建一个新的字节串对象,其中包含添加到 *bytes* 的 *newpart* 的内容。 此版本将释放对 *newpart*" |
344 |
| -" 的 :term:`strong reference` (即递减其引用计数)。" |
345 |
| - |
346 |
| -#: ../../c-api/bytes.rst:196 |
347 |
| -msgid "" |
348 |
| -"A way to resize a bytes object even though it is \"immutable\". Only use " |
349 |
| -"this to build up a brand new bytes object; don't use this if the bytes may " |
350 |
| -"already be known in other parts of the code. It is an error to call this " |
351 |
| -"function if the refcount on the input bytes object is not one. Pass the " |
352 |
| -"address of an existing bytes object as an lvalue (it may be written into), " |
353 |
| -"and the new size desired. On success, *\\*bytes* holds the resized bytes " |
354 |
| -"object and ``0`` is returned; the address in *\\*bytes* may differ from its " |
355 |
| -"input value. If the reallocation fails, the original bytes object at " |
356 |
| -"*\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError`" |
357 |
| -" is set, and ``-1`` is returned." |
358 |
| -msgstr "" |
359 |
| -"改变字节串大小的一种方式,即使其为“不可变对象”。 此方式仅用于创建全新的字节串对象;如果字节串在代码的其他部分已知则不可使用此方式。 " |
360 |
| -"如果输入字节串对象的引用计数不为一则调用此函数将报错。 传入一个现有字节串对象的地址作为 lvalue(它可能会被写入),并传入希望的新大小。 " |
361 |
| -"当成功时,*\\*bytes* 将存放改变大小后的字节串对象并返回 ``0``;*\\*bytes* 中的地址可能与其输入值不同。 如果重新分配失败,则" |
362 |
| -" *\\*bytes* 上的原字节串对象将被撤销分配,*\\*bytes* 会被设为 ``NULL``,同时设置 :exc:`MemoryError` " |
363 |
| -"并返回 ``-1``。" |
0 commit comments