summaryrefslogtreecommitdiffstats
path: root/Doc/library/email.header.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-27 16:46:17 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-27 16:46:17 (GMT)
commit3638e487b94da01a8e29f376ed5706c5195a7698 (patch)
tree9729bd00d7e02878688d12eb7aa37f21d293e558 /Doc/library/email.header.rst
parent540b45c475aef0d2b803c4d4025a469eefeaa975 (diff)
downloadcpython-3638e487b94da01a8e29f376ed5706c5195a7698.zip
cpython-3638e487b94da01a8e29f376ed5706c5195a7698.tar.gz
cpython-3638e487b94da01a8e29f376ed5706c5195a7698.tar.bz2
Merged revisions 71572 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71572 | georg.brandl | 2009-04-13 15:13:25 +0200 (Mo, 13 Apr 2009) | 1 line #5745: more linking for identifiers in email docs. ........
Diffstat (limited to 'Doc/library/email.header.rst')
-rw-r--r--Doc/library/email.header.rst23
1 files changed, 12 insertions, 11 deletions
diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst
index 7ee4a2d..5da1d95 100644
--- a/Doc/library/email.header.rst
+++ b/Doc/library/email.header.rst
@@ -21,10 +21,10 @@ in its :mod:`email.header` and :mod:`email.charset` modules.
If you want to include non-ASCII characters in your email headers, say in the
:mailheader:`Subject` or :mailheader:`To` fields, you should use the
-:class:`Header` class and assign the field in the :class:`Message` object to an
-instance of :class:`Header` instead of using a string for the header value.
-Import the :class:`Header` class from the :mod:`email.header` module. For
-example::
+:class:`Header` class and assign the field in the :class:`~email.message.Message`
+object to an instance of :class:`Header` instead of using a string for the header
+value. Import the :class:`Header` class from the :mod:`email.header` module.
+For example::
>>> from email.message import Message
>>> from email.header import Header
@@ -39,9 +39,9 @@ example::
Notice here how we wanted the :mailheader:`Subject` field to contain a non-ASCII
character? We did this by creating a :class:`Header` instance and passing in
the character set that the byte string was encoded in. When the subsequent
-:class:`Message` instance was flattened, the :mailheader:`Subject` field was
-properly :rfc:`2047` encoded. MIME-aware mail readers would show this header
-using the embedded ISO-8859-1 character.
+:class:`~email.message.Message` instance was flattened, the :mailheader:`Subject`
+field was properly :rfc:`2047` encoded. MIME-aware mail readers would show this
+header using the embedded ISO-8859-1 character.
Here is the :class:`Header` class description:
@@ -81,10 +81,11 @@ Here is the :class:`Header` class description:
Append the string *s* to the MIME header.
- Optional *charset*, if given, should be a :class:`Charset` instance (see
- :mod:`email.charset`) or the name of a character set, which will be
- converted to a :class:`Charset` instance. A value of ``None`` (the
- default) means that the *charset* given in the constructor is used.
+ Optional *charset*, if given, should be a :class:`~email.charset.Charset`
+ instance (see :mod:`email.charset`) or the name of a character set, which
+ will be converted to a :class:`~email.charset.Charset` instance. A value
+ of ``None`` (the default) means that the *charset* given in the constructor
+ is used.
*s* may be an instance of :class:`bytes` or :class:`str`. If it is an
instance of :class:`bytes`, then *charset* is the encoding of that byte