]> granicus.if.org Git - python/commit
With help from Martin v. Loewis, clarification is added for the
authorBarry Warsaw <barry@python.org>
Mon, 30 Sep 2002 15:51:31 +0000 (15:51 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 30 Sep 2002 15:51:31 +0000 (15:51 +0000)
commit174aa49a88336713cd2231e9fe9110b8fb089d6c
tree210270ae444af2462983121bd3c137fa9bca5276
parent884554dfe54fe4015a1ca2c0624e247dce9312f5
With help from Martin v. Loewis, clarification is added for the
semantics of header chunks using byte and Unicode strings.
Specifically,

append(): When the given string is a byte string, charset (whether
specified explicitly in the argument list or implicitly via the
constructor default) is the encoding of the byte string, and a
UnicodeError will be raised if the string cannot be decoded with that
charset.  If s is a Unicode string, then charset is a hint specifying
the character set of the characters in the string.  In this case, when
producing an RFC 2822 compliant header using RFC 2047 rules, the
Unicode string will be encoded using the following charsets in order:
us-ascii, the charset hint, utf-8.

__init__(): Use the global USASCII Charset instance when the charset
argument is None.  Also, clarification in the docstring.

Also, use True/False where appropriate.
Lib/email/Header.py