Skip to content

Commit f4a9588

Browse files
Deploy preview for PR 1231 🛫
1 parent 6d69fba commit f4a9588

591 files changed

Lines changed: 7216 additions & 7186 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pr-preview/pr-1231/_sources/library/email.compat32-message.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Here are the methods of the :class:`Message` class:
9696
text = fp.getvalue()
9797

9898
If the message object contains binary data that is not encoded according
99-
to RFC standards, the non-compliant data will be replaced by unicode
99+
to RFC standards, the non-compliant data will be replaced by Unicode
100100
"unknown character" code points. (See also :meth:`.as_bytes` and
101101
:class:`~email.generator.BytesGenerator`.)
102102

pr-preview/pr-1231/_sources/library/email.contentmanager.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ Currently the email package provides only one concrete content manager,
9999

100100
This content manager provides only a minimum interface beyond that provided
101101
by :class:`~email.message.Message` itself: it deals only with text, raw
102-
byte strings, and :class:`~email.message.Message` objects. Nevertheless, it
102+
bytes, and :class:`~email.message.Message` objects. Nevertheless, it
103103
provides significant advantages compared to the base API: ``get_content`` on
104-
a text part will return a unicode string without the application needing to
104+
a text part will return a string without the application needing to
105105
manually decode it, ``set_content`` provides a rich set of options for
106106
controlling the headers added to a part and controlling the content transfer
107107
encoding, and it enables the use of the various ``add_`` methods, thereby
@@ -114,7 +114,7 @@ Currently the email package provides only one concrete content manager,
114114
parts), or a ``bytes`` object (for all other non-multipart types). Raise
115115
a :exc:`KeyError` if called on a ``multipart``. If the part is a
116116
``text`` part and *errors* is specified, use it as the error handler when
117-
decoding the payload to unicode. The default error handler is
117+
decoding the payload to a string. The default error handler is
118118
``replace``.
119119

120120
.. method:: set_content(msg, <'str'>, subtype="plain", charset='utf-8', \

pr-preview/pr-1231/_sources/library/email.examples.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Here are a few examples of how to use the :mod:`email` package to read, write,
77
and send simple email messages, as well as more complex MIME messages.
88

99
First, let's see how to create and send a simple text message (both the
10-
text content and the addresses may contain unicode characters):
10+
text content and the addresses may contain Unicode characters):
1111

1212
.. literalinclude:: ../includes/email-simple.py
1313

pr-preview/pr-1231/_sources/library/email.header.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ For example::
4949

5050
Notice here how we wanted the :mailheader:`Subject` field to contain a non-ASCII
5151
character? We did this by creating a :class:`Header` instance and passing in
52-
the character set that the byte string was encoded in. When the subsequent
52+
the character set to use when encoding it. When the subsequent
5353
:class:`~email.message.Message` instance was flattened, the :mailheader:`Subject`
5454
field was properly :rfc:`2047` encoded. MIME-aware mail readers would show this
5555
header using the embedded ISO-8859-1 character.
@@ -150,7 +150,7 @@ Here is the :class:`Header` class description:
150150
.. method:: __str__()
151151

152152
Returns an approximation of the :class:`Header` as a string, using an
153-
unlimited line length. All pieces are converted to unicode using the
153+
unlimited line length. All pieces are decoded using the
154154
specified encoding and joined together appropriately. Any pieces with a
155155
charset of ``'unknown-8bit'`` are decoded as ASCII using the ``'replace'``
156156
error handler.

pr-preview/pr-1231/_sources/library/email.headerregistry.rst.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ headers.
4343

4444
*name* and *value* are passed to ``BaseHeader`` from the
4545
:attr:`~email.policy.EmailPolicy.header_factory` call. The string value of
46-
any header object is the *value* fully decoded to unicode.
46+
any header object is the *value* fully decoded to a string.
4747

4848
This base class defines the following read-only properties:
4949

@@ -98,10 +98,10 @@ headers.
9898
defects to this list. On return, the ``kwds`` dictionary *must* contain
9999
values for at least the keys ``decoded``, ``defects`` and ``parse_tree``.
100100
``decoded`` should be the string value for the header (that is, the header
101-
value fully decoded to unicode). ``parse_tree`` is set to the parse tree obtained
101+
value fully decoded to a string). ``parse_tree`` is set to the parse tree obtained
102102
from parsing the header. The parse method should assume that *string* may
103103
contain content-transfer-encoded parts, but should correctly handle all valid
104-
unicode characters as well so that it can parse un-encoded header values.
104+
Unicode characters as well so that it can parse un-encoded header values.
105105

106106
``BaseHeader``'s ``__new__`` then creates the header instance, and calls its
107107
``init`` method. The specialized class only needs to provide an ``init``
@@ -129,7 +129,7 @@ headers.
129129
mechanism for encoding non-ASCII text as ASCII characters within a header
130130
value. When a *value* containing encoded words is passed to the
131131
constructor, the ``UnstructuredHeader`` parser converts such encoded words
132-
into unicode, following the :rfc:`2047` rules for unstructured text. The
132+
into a string, following the :rfc:`2047` rules for unstructured text. The
133133
parser uses heuristics to attempt to decode certain non-compliant encoded
134134
words. Defects are registered in such cases, as well as defects for issues
135135
such as invalid characters within the encoded words or the non-encoded text.
@@ -206,8 +206,8 @@ headers.
206206
the list of addresses is "flattened" into a one dimensional list).
207207

208208
The ``decoded`` value of the header will have all encoded words decoded to
209-
unicode. :class:`~encodings.idna` encoded domain names are also decoded to
210-
unicode. The ``decoded`` value is set by :ref:`joining <meth-str-join>` the
209+
a string. :class:`~encodings.idna` encoded domain names are also decoded to
210+
a string. The ``decoded`` value is set by :ref:`joining <meth-str-join>` the
211211
:class:`str` value of the elements of the ``groups`` attribute with ``',
212212
'``.
213213

@@ -391,7 +391,7 @@ construct structured values to assign to specific headers.
391391
*domain*, in which case *username* and *domain* will be parsed from the
392392
*addr_spec*. An *addr_spec* must be a properly RFC quoted string; if it is
393393
not ``Address`` will raise an error. Unicode characters are allowed and
394-
will be property encoded when serialized. However, per the RFCs, unicode is
394+
will be property encoded when serialized. However, per the RFCs, Unicode is
395395
*not* allowed in the username portion of the address.
396396

397397
.. attribute:: display_name

pr-preview/pr-1231/_sources/library/email.policy.rst.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ added matters. To illustrate::
493493
Otherwise the *name*, and the *value* with any CR or LF characters
494494
removed, are passed to the ``header_factory``, and the resulting
495495
header object is returned. Any surrogateescaped bytes get turned into
496-
the unicode unknown-character glyph.
496+
the Unicode unknown-character glyph.
497497

498498

499499
.. method:: fold(name, value)
@@ -588,10 +588,10 @@ the email package is changed from the Python 3.2 API in the following ways:
588588

589589
From the application view, this means that any header obtained through the
590590
:class:`~email.message.EmailMessage` is a header object with extra
591-
attributes, whose string value is the fully decoded unicode value of the
591+
attributes, whose string value is the fully decoded value of the
592592
header. Likewise, a header may be assigned a new value, or a new header
593-
created, using a unicode string, and the policy will take care of converting
594-
the unicode string into the correct RFC encoded form.
593+
created, using a string, and the policy will take care of converting
594+
the string into the correct RFC encoded form.
595595

596596
The header objects and their attributes are described in
597597
:mod:`~email.headerregistry`.

pr-preview/pr-1231/_sources/library/email.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ server.
5757

5858
The email package does its best to hide the details of the various governing
5959
RFCs from the application. Conceptually the application should be able to
60-
treat the email message as a structured tree of unicode text and binary
60+
treat the email message as a structured tree of Unicode text and binary
6161
attachments, without having to worry about how these are represented when
6262
serialized. In practice, however, it is often necessary to be aware of at
6363
least some of the rules governing MIME messages and their structure,
@@ -87,7 +87,7 @@ to advanced applications.
8787
Following those is a set of examples of using the fundamental parts of the APIs
8888
covered in the preceding sections.
8989

90-
The foregoing represent the modern (unicode friendly) API of the email package.
90+
The foregoing represent the modern (Unicode friendly) API of the email package.
9191
The remaining sections, starting with the :class:`~email.message.Message`
9292
class, cover the legacy :data:`~email.policy.compat32` API that deals much more
9393
directly with the details of how email messages are represented. The

pr-preview/pr-1231/_sources/library/email.utils.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ of the new API.
205205
When a header parameter is encoded in :rfc:`2231` format,
206206
:meth:`Message.get_param <email.message.Message.get_param>` may return a
207207
3-tuple containing the character set,
208-
language, and value. :func:`collapse_rfc2231_value` turns this into a unicode
208+
language, and value. :func:`collapse_rfc2231_value` turns this into a
209209
string. Optional *errors* is passed to the *errors* argument of :class:`str`'s
210210
:func:`~str.encode` method; it defaults to ``'replace'``. Optional
211211
*fallback_charset* specifies the character set to use if the one in the

pr-preview/pr-1231/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ <h3>導航</h3>
356356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
357357
<br>
358358
<br>
359-
最後更新於 8月 12, 2026 (00:25 UTC)。
359+
最後更新於 8月 13, 2026 (00:27 UTC)。
360360

361361
<a href="/bugs.html">發現 bug</a>
362362

pr-preview/pr-1231/bugs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ <h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title=
250250
</section>
251251
<section id="getting-started-contributing-to-python-yourself">
252252
<span id="contributing-to-python"></span><h2>開始讓自己貢獻 Python<a class="headerlink" href="#getting-started-contributing-to-python-yourself" title="連結到這個標頭"></a></h2>
253-
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://devguide.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
253+
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://devguide.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
254254
</section>
255255
</section>
256256

@@ -393,7 +393,7 @@ <h3>導航</h3>
393393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
394394
<br>
395395
<br>
396-
最後更新於 8月 12, 2026 (00:25 UTC)。
396+
最後更新於 8月 13, 2026 (00:27 UTC)。
397397

398398
<a href="/bugs.html">發現 bug</a>
399399

0 commit comments

Comments
 (0)