8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.11\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
- "POT-Creation-Date : 2022-10-15 20:43 +0000\n "
11
+ "POT-Creation-Date : 2022-11-30 00:19 +0000\n "
12
12
"PO-Revision-Date : 2018-05-23 14:39+0000\n "
13
13
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -93,92 +93,104 @@ msgstr ""
93
93
94
94
#: ../../library/base64.rst:56
95
95
msgid ""
96
- "Optional *altchars* must be a :term:`bytes-like object` of at least length 2 "
97
- "(additional characters are ignored) which specifies an alternative alphabet "
98
- "for the ``+`` and ``/`` characters. This allows an application to e.g. "
99
- "generate URL or filesystem safe Base64 strings. The default is ``None``, "
100
- "for which the standard Base64 alphabet is used."
96
+ "Optional *altchars* must be a :term:`bytes-like object` of length 2 which "
97
+ "specifies an alternative alphabet for the ``+`` and ``/`` characters. This "
98
+ "allows an application to e.g. generate URL or filesystem safe Base64 "
99
+ "strings. The default is ``None``, for which the standard Base64 alphabet is "
100
+ "used."
101
101
msgstr ""
102
102
103
- #: ../../library/base64.rst:65
103
+ #: ../../library/base64.rst:61
104
+ msgid ""
105
+ "May assert or raise a a :exc:`ValueError` if the length of *altchars* is not "
106
+ "2. Raises a :exc:`TypeError` if *altchars* is not a :term:`bytes-like "
107
+ "object`."
108
+ msgstr ""
109
+
110
+ #: ../../library/base64.rst:67
104
111
msgid ""
105
112
"Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and "
106
113
"return the decoded :class:`bytes`."
107
114
msgstr ""
108
115
109
- #: ../../library/base64.rst:68
116
+ #: ../../library/base64.rst:70
110
117
msgid ""
111
118
"Optional *altchars* must be a :term:`bytes-like object` or ASCII string of "
112
- "at least length 2 (additional characters are ignored) which specifies the "
113
- "alternative alphabet used instead of the ``+`` and ``/`` characters."
119
+ "length 2 which specifies the alternative alphabet used instead of the ``+`` "
120
+ "and ``/`` characters."
114
121
msgstr ""
115
122
116
- #: ../../library/base64.rst:72
123
+ #: ../../library/base64.rst:74
117
124
msgid ""
118
125
"A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded."
119
126
msgstr ""
120
127
121
- #: ../../library/base64.rst:75
128
+ #: ../../library/base64.rst:77
122
129
msgid ""
123
130
"If *validate* is ``False`` (the default), characters that are neither in the "
124
131
"normal base-64 alphabet nor the alternative alphabet are discarded prior to "
125
132
"the padding check. If *validate* is ``True``, these non-alphabet characters "
126
133
"in the input result in a :exc:`binascii.Error`."
127
134
msgstr ""
128
135
129
- #: ../../library/base64.rst:81
136
+ #: ../../library/base64.rst:83
130
137
msgid ""
131
138
"For more information about the strict base64 check, see :func:`binascii."
132
139
"a2b_base64`"
133
140
msgstr ""
134
141
135
- #: ../../library/base64.rst:86
142
+ #: ../../library/base64.rst:85
143
+ msgid ""
144
+ "May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2."
145
+ msgstr ""
146
+
147
+ #: ../../library/base64.rst:89
136
148
msgid ""
137
149
"Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and "
138
150
"return the encoded :class:`bytes`."
139
151
msgstr ""
140
152
141
- #: ../../library/base64.rst:92
153
+ #: ../../library/base64.rst:95
142
154
msgid ""
143
155
"Decode :term:`bytes-like object` or ASCII string *s* using the standard "
144
156
"Base64 alphabet and return the decoded :class:`bytes`."
145
157
msgstr ""
146
158
147
- #: ../../library/base64.rst:98
159
+ #: ../../library/base64.rst:101
148
160
msgid ""
149
161
"Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe "
150
162
"alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/"
151
163
"`` in the standard Base64 alphabet, and return the encoded :class:`bytes`. "
152
164
"The result can still contain ``=``."
153
165
msgstr ""
154
166
155
- #: ../../library/base64.rst:107
167
+ #: ../../library/base64.rst:110
156
168
msgid ""
157
169
"Decode :term:`bytes-like object` or ASCII string *s* using the URL- and "
158
170
"filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` "
159
171
"instead of ``/`` in the standard Base64 alphabet, and return the decoded :"
160
172
"class:`bytes`."
161
173
msgstr ""
162
174
163
- #: ../../library/base64.rst:116
175
+ #: ../../library/base64.rst:119
164
176
msgid ""
165
177
"Encode the :term:`bytes-like object` *s* using Base32 and return the "
166
178
"encoded :class:`bytes`."
167
179
msgstr ""
168
180
169
- #: ../../library/base64.rst:122
181
+ #: ../../library/base64.rst:125
170
182
msgid ""
171
183
"Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and "
172
184
"return the decoded :class:`bytes`."
173
185
msgstr ""
174
186
175
- #: ../../library/base64.rst:125 ../../library/base64.rst:173
187
+ #: ../../library/base64.rst:128 ../../library/base64.rst:176
176
188
msgid ""
177
189
"Optional *casefold* is a flag specifying whether a lowercase alphabet is "
178
190
"acceptable as input. For security purposes, the default is ``False``."
179
191
msgstr ""
180
192
181
- #: ../../library/base64.rst:129
193
+ #: ../../library/base64.rst:132
182
194
msgid ""
183
195
":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter "
184
196
"O (oh), and for optional mapping of the digit 1 (one) to either the letter I "
@@ -189,141 +201,141 @@ msgid ""
189
201
"input."
190
202
msgstr ""
191
203
192
- #: ../../library/base64.rst:136 ../../library/base64.rst:177
204
+ #: ../../library/base64.rst:139 ../../library/base64.rst:180
193
205
msgid ""
194
206
"A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there "
195
207
"are non-alphabet characters present in the input."
196
208
msgstr ""
197
209
198
- #: ../../library/base64.rst:143
210
+ #: ../../library/base64.rst:146
199
211
msgid ""
200
212
"Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined "
201
213
"in :rfc:`4648`."
202
214
msgstr ""
203
215
204
- #: ../../library/base64.rst:151
216
+ #: ../../library/base64.rst:154
205
217
msgid ""
206
218
"Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined "
207
219
"in :rfc:`4648`."
208
220
msgstr ""
209
221
210
- #: ../../library/base64.rst:154
222
+ #: ../../library/base64.rst:157
211
223
msgid ""
212
224
"This version does not allow the digit 0 (zero) to the letter O (oh) and "
213
225
"digit 1 (one) to either the letter I (eye) or letter L (el) mappings, all "
214
226
"these characters are included in the Extended Hex Alphabet and are not "
215
227
"interchangeable."
216
228
msgstr ""
217
229
218
- #: ../../library/base64.rst:164
230
+ #: ../../library/base64.rst:167
219
231
msgid ""
220
232
"Encode the :term:`bytes-like object` *s* using Base16 and return the "
221
233
"encoded :class:`bytes`."
222
234
msgstr ""
223
235
224
- #: ../../library/base64.rst:170
236
+ #: ../../library/base64.rst:173
225
237
msgid ""
226
238
"Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and "
227
239
"return the decoded :class:`bytes`."
228
240
msgstr ""
229
241
230
- #: ../../library/base64.rst:184
242
+ #: ../../library/base64.rst:187
231
243
msgid ""
232
244
"Encode the :term:`bytes-like object` *b* using Ascii85 and return the "
233
245
"encoded :class:`bytes`."
234
246
msgstr ""
235
247
236
- #: ../../library/base64.rst:187
248
+ #: ../../library/base64.rst:190
237
249
msgid ""
238
250
"*foldspaces* is an optional flag that uses the special short sequence 'y' "
239
251
"instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This "
240
252
"feature is not supported by the \" standard\" Ascii85 encoding."
241
253
msgstr ""
242
254
243
- #: ../../library/base64.rst:191
255
+ #: ../../library/base64.rst:194
244
256
msgid ""
245
257
"*wrapcol* controls whether the output should have newline (``b'\\ n'``) "
246
258
"characters added to it. If this is non-zero, each output line will be at "
247
259
"most this many characters long."
248
260
msgstr ""
249
261
250
- #: ../../library/base64.rst:195
262
+ #: ../../library/base64.rst:198
251
263
msgid ""
252
264
"*pad* controls whether the input is padded to a multiple of 4 before "
253
265
"encoding. Note that the ``btoa`` implementation always pads."
254
266
msgstr ""
255
267
256
- #: ../../library/base64.rst:198
268
+ #: ../../library/base64.rst:201
257
269
msgid ""
258
270
"*adobe* controls whether the encoded byte sequence is framed with ``<~`` and "
259
271
"``~>``, which is used by the Adobe implementation."
260
272
msgstr ""
261
273
262
- #: ../../library/base64.rst:206
274
+ #: ../../library/base64.rst:209
263
275
msgid ""
264
276
"Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and "
265
277
"return the decoded :class:`bytes`."
266
278
msgstr ""
267
279
268
- #: ../../library/base64.rst:209
280
+ #: ../../library/base64.rst:212
269
281
msgid ""
270
282
"*foldspaces* is a flag that specifies whether the 'y' short sequence should "
271
283
"be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature "
272
284
"is not supported by the \" standard\" Ascii85 encoding."
273
285
msgstr ""
274
286
275
- #: ../../library/base64.rst:213
287
+ #: ../../library/base64.rst:216
276
288
msgid ""
277
289
"*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. "
278
290
"is framed with <~ and ~>)."
279
291
msgstr ""
280
292
281
- #: ../../library/base64.rst:216
293
+ #: ../../library/base64.rst:219
282
294
msgid ""
283
295
"*ignorechars* should be a :term:`bytes-like object` or ASCII string "
284
296
"containing characters to ignore from the input. This should only contain "
285
297
"whitespace characters, and by default contains all whitespace characters in "
286
298
"ASCII."
287
299
msgstr ""
288
300
289
- #: ../../library/base64.rst:226
301
+ #: ../../library/base64.rst:229
290
302
msgid ""
291
303
"Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-"
292
304
"style binary diffs) and return the encoded :class:`bytes`."
293
305
msgstr ""
294
306
295
- #: ../../library/base64.rst:229
307
+ #: ../../library/base64.rst:232
296
308
msgid ""
297
309
"If *pad* is true, the input is padded with ``b'\\ 0'`` so its length is a "
298
310
"multiple of 4 bytes before encoding."
299
311
msgstr ""
300
312
301
- #: ../../library/base64.rst:237
313
+ #: ../../library/base64.rst:240
302
314
msgid ""
303
315
"Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and "
304
316
"return the decoded :class:`bytes`. Padding is implicitly removed, if "
305
317
"necessary."
306
318
msgstr ""
307
319
308
- #: ../../library/base64.rst:244
320
+ #: ../../library/base64.rst:247
309
321
msgid "The legacy interface:"
310
322
msgstr ""
311
323
312
- #: ../../library/base64.rst:248
324
+ #: ../../library/base64.rst:251
313
325
msgid ""
314
326
"Decode the contents of the binary *input* file and write the resulting "
315
327
"binary data to the *output* file. *input* and *output* must be :term:`file "
316
328
"objects <file object>`. *input* will be read until ``input.readline()`` "
317
329
"returns an empty bytes object."
318
330
msgstr ""
319
331
320
- #: ../../library/base64.rst:256
332
+ #: ../../library/base64.rst:259
321
333
msgid ""
322
334
"Decode the :term:`bytes-like object` *s*, which must contain one or more "
323
335
"lines of base64 encoded data, and return the decoded :class:`bytes`."
324
336
msgstr ""
325
337
326
- #: ../../library/base64.rst:264
338
+ #: ../../library/base64.rst:267
327
339
msgid ""
328
340
"Encode the contents of the binary *input* file and write the resulting "
329
341
"base64 encoded data to the *output* file. *input* and *output* must be :term:"
@@ -333,46 +345,46 @@ msgid ""
333
345
"the output always ends with a newline, as per :rfc:`2045` (MIME)."
334
346
msgstr ""
335
347
336
- #: ../../library/base64.rst:274
348
+ #: ../../library/base64.rst:277
337
349
msgid ""
338
350
"Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary "
339
351
"data, and return :class:`bytes` containing the base64-encoded data, with "
340
352
"newlines (``b'\\ n'``) inserted after every 76 bytes of output, and ensuring "
341
353
"that there is a trailing newline, as per :rfc:`2045` (MIME)."
342
354
msgstr ""
343
355
344
- #: ../../library/base64.rst:282
356
+ #: ../../library/base64.rst:285
345
357
msgid "An example usage of the module:"
346
358
msgstr ""
347
359
348
- #: ../../library/base64.rst:295
360
+ #: ../../library/base64.rst:298
349
361
msgid "Security Considerations"
350
362
msgstr ""
351
363
352
- #: ../../library/base64.rst:297
364
+ #: ../../library/base64.rst:300
353
365
msgid ""
354
366
"A new security considerations section was added to :rfc:`4648` (section 12); "
355
367
"it's recommended to review the security section for any code deployed to "
356
368
"production."
357
369
msgstr ""
358
370
359
- #: ../../library/base64.rst:303
371
+ #: ../../library/base64.rst:306
360
372
msgid "Module :mod:`binascii`"
361
373
msgstr ":mod:`binascii` 模組"
362
374
363
- #: ../../library/base64.rst:303
375
+ #: ../../library/base64.rst:306
364
376
msgid ""
365
377
"Support module containing ASCII-to-binary and binary-to-ASCII conversions."
366
378
msgstr ""
367
379
368
- #: ../../library/base64.rst:306
380
+ #: ../../library/base64.rst:309
369
381
msgid ""
370
382
":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: "
371
383
"Mechanisms for Specifying and Describing the Format of Internet Message "
372
384
"Bodies"
373
385
msgstr ""
374
386
375
- #: ../../library/base64.rst:306
387
+ #: ../../library/base64.rst:309
376
388
msgid ""
377
389
"Section 5.2, \" Base64 Content-Transfer-Encoding,\" provides the definition "
378
390
"of the base64 encoding."
0 commit comments