Expand Up @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-15 20:43 +0000\n" "POT-Creation-Date: 2022-11-30 00:19 +0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" Expand Down Expand Up @@ -93,92 +93,104 @@ msgstr "" #: ../../library/base64.rst:56 msgid "" "Optional *altchars* must be a :term:`bytes-like object` ofat least length 2 " "(additional characters are ignored) which specifies an alternative alphabet " "for the ``+`` and ``/`` characters. This allows an application to e.g. " "generate URL or filesystem safe Base64 strings. The default is ``None``, " "for which the standard Base64 alphabet is used." "Optional *altchars* must be a :term:`bytes-like object` of length 2 which " "specifies an alternative alphabet for the ``+`` and ``/`` characters. This " "allows an application to e.g. generate URL or filesystem safe Base64 " "strings. The default is ``None``, for which the standard Base64 alphabet is " "used." msgstr "" #: ../../library/base64.rst:65 #: ../../library/base64.rst:61 msgid "" "May assert or raise a a :exc:`ValueError` if the length of *altchars* is not " "2. Raises a :exc:`TypeError` if *altchars* is not a :term:`bytes-like " "object`." msgstr "" #: ../../library/base64.rst:67 msgid "" "Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:68 #: ../../library/base64.rst:70 msgid "" "Optional *altchars* must be a :term:`bytes-like object` or ASCII string of " "at least length 2(additional characters are ignored) which specifies the " "alternative alphabet used instead of the ``+`` and ``/`` characters." "length 2which specifies the alternative alphabet used instead of the ``+`` " "and ``/`` characters." msgstr "" #: ../../library/base64.rst:72 #: ../../library/base64.rst:74 msgid "" "A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded." msgstr "" #: ../../library/base64.rst:75 #: ../../library/base64.rst:77 msgid "" "If *validate* is ``False`` (the default), characters that are neither in the " "normal base-64 alphabet nor the alternative alphabet are discarded prior to " "the padding check. If *validate* is ``True``, these non-alphabet characters " "in the input result in a :exc:`binascii.Error`." msgstr "" #: ../../library/base64.rst:81 #: ../../library/base64.rst:83 msgid "" "For more information about the strict base64 check, see :func:`binascii." "a2b_base64`" msgstr "" #: ../../library/base64.rst:86 #: ../../library/base64.rst:85 msgid "" "May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2." msgstr "" #: ../../library/base64.rst:89 msgid "" "Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and " "return the encoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:92 #: ../../library/base64.rst:95 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the standard " "Base64 alphabet and return the decoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:98 #: ../../library/base64.rst:101 msgid "" "Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe " "alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of ``/" "`` in the standard Base64 alphabet, and return the encoded :class:`bytes`. " "The result can still contain ``=``." msgstr "" #: ../../library/base64.rst:107 #: ../../library/base64.rst:110 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the URL- and " "filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_`` " "instead of ``/`` in the standard Base64 alphabet, and return the decoded :" "class:`bytes`." msgstr "" #: ../../library/base64.rst:116 #: ../../library/base64.rst:119 msgid "" "Encode the :term:`bytes-like object` *s* using Base32 and return the " "encoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:122 #: ../../library/base64.rst:125 msgid "" "Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:125 ../../library/base64.rst:173 #: ../../library/base64.rst:128 ../../library/base64.rst:176 msgid "" "Optional *casefold* is a flag specifying whether a lowercase alphabet is " "acceptable as input. For security purposes, the default is ``False``." msgstr "" #: ../../library/base64.rst:129 #: ../../library/base64.rst:132 msgid "" ":rfc:`4648` allows for optional mapping of the digit 0 (zero) to the letter " "O (oh), and for optional mapping of the digit 1 (one) to either the letter I " Expand All @@ -189,141 +201,141 @@ msgid "" "input." msgstr "" #: ../../library/base64.rst:136 ../../library/base64.rst:177 #: ../../library/base64.rst:139 ../../library/base64.rst:180 msgid "" "A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there " "are non-alphabet characters present in the input." msgstr "" #: ../../library/base64.rst:143 #: ../../library/base64.rst:146 msgid "" "Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" #: ../../library/base64.rst:151 #: ../../library/base64.rst:154 msgid "" "Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" #: ../../library/base64.rst:154 #: ../../library/base64.rst:157 msgid "" "This version does not allow the digit 0 (zero) to the letter O (oh) and " "digit 1 (one) to either the letter I (eye) or letter L (el) mappings, all " "these characters are included in the Extended Hex Alphabet and are not " "interchangeable." msgstr "" #: ../../library/base64.rst:164 #: ../../library/base64.rst:167 msgid "" "Encode the :term:`bytes-like object` *s* using Base16 and return the " "encoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:170 #: ../../library/base64.rst:173 msgid "" "Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:184 #: ../../library/base64.rst:187 msgid "" "Encode the :term:`bytes-like object` *b* using Ascii85 and return the " "encoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:187 #: ../../library/base64.rst:190 msgid "" "*foldspaces* is an optional flag that uses the special short sequence 'y' " "instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " "feature is not supported by the \"standard\" Ascii85 encoding." msgstr "" #: ../../library/base64.rst:191 #: ../../library/base64.rst:194 msgid "" "*wrapcol* controls whether the output should have newline (``b'\\n'``) " "characters added to it. If this is non-zero, each output line will be at " "most this many characters long." msgstr "" #: ../../library/base64.rst:195 #: ../../library/base64.rst:198 msgid "" "*pad* controls whether the input is padded to a multiple of 4 before " "encoding. Note that the ``btoa`` implementation always pads." msgstr "" #: ../../library/base64.rst:198 #: ../../library/base64.rst:201 msgid "" "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " "``~>``, which is used by the Adobe implementation." msgstr "" #: ../../library/base64.rst:206 #: ../../library/base64.rst:209 msgid "" "Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:209 #: ../../library/base64.rst:212 msgid "" "*foldspaces* is a flag that specifies whether the 'y' short sequence should " "be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " "is not supported by the \"standard\" Ascii85 encoding." msgstr "" #: ../../library/base64.rst:213 #: ../../library/base64.rst:216 msgid "" "*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. " "is framed with <~ and ~>)." msgstr "" #: ../../library/base64.rst:216 #: ../../library/base64.rst:219 msgid "" "*ignorechars* should be a :term:`bytes-like object` or ASCII string " "containing characters to ignore from the input. This should only contain " "whitespace characters, and by default contains all whitespace characters in " "ASCII." msgstr "" #: ../../library/base64.rst:226 #: ../../library/base64.rst:229 msgid "" "Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-" "style binary diffs) and return the encoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:229 #: ../../library/base64.rst:232 msgid "" "If *pad* is true, the input is padded with ``b'\\0'`` so its length is a " "multiple of 4 bytes before encoding." msgstr "" #: ../../library/base64.rst:237 #: ../../library/base64.rst:240 msgid "" "Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`. Padding is implicitly removed, if " "necessary." msgstr "" #: ../../library/base64.rst:244 #: ../../library/base64.rst:247 msgid "The legacy interface:" msgstr "" #: ../../library/base64.rst:248 #: ../../library/base64.rst:251 msgid "" "Decode the contents of the binary *input* file and write the resulting " "binary data to the *output* file. *input* and *output* must be :term:`file " "objects <file object>`. *input* will be read until ``input.readline()`` " "returns an empty bytes object." msgstr "" #: ../../library/base64.rst:256 #: ../../library/base64.rst:259 msgid "" "Decode the :term:`bytes-like object` *s*, which must contain one or more " "lines of base64 encoded data, and return the decoded :class:`bytes`." msgstr "" #: ../../library/base64.rst:264 #: ../../library/base64.rst:267 msgid "" "Encode the contents of the binary *input* file and write the resulting " "base64 encoded data to the *output* file. *input* and *output* must be :term:" Expand All @@ -333,46 +345,46 @@ msgid "" "the output always ends with a newline, as per :rfc:`2045` (MIME)." msgstr "" #: ../../library/base64.rst:274 #: ../../library/base64.rst:277 msgid "" "Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary " "data, and return :class:`bytes` containing the base64-encoded data, with " "newlines (``b'\\n'``) inserted after every 76 bytes of output, and ensuring " "that there is a trailing newline, as per :rfc:`2045` (MIME)." msgstr "" #: ../../library/base64.rst:282 #: ../../library/base64.rst:285 msgid "An example usage of the module:" msgstr "" #: ../../library/base64.rst:295 #: ../../library/base64.rst:298 msgid "Security Considerations" msgstr "" #: ../../library/base64.rst:297 #: ../../library/base64.rst:300 msgid "" "A new security considerations section was added to :rfc:`4648` (section 12); " "it's recommended to review the security section for any code deployed to " "production." msgstr "" #: ../../library/base64.rst:303 #: ../../library/base64.rst:306 msgid "Module :mod:`binascii`" msgstr ":mod:`binascii` 模組" #: ../../library/base64.rst:303 #: ../../library/base64.rst:306 msgid "" "Support module containing ASCII-to-binary and binary-to-ASCII conversions." msgstr "" #: ../../library/base64.rst:306 #: ../../library/base64.rst:309 msgid "" ":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: " "Mechanisms for Specifying and Describing the Format of Internet Message " "Bodies" msgstr "" #: ../../library/base64.rst:306 #: ../../library/base64.rst:309 msgid "" "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "of the base64 encoding." Expand Down