[Python-checkins] python/dist/src/Lib/email Header.py,1.9,1.10
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Mon, 22 Jul 2002 23:08:13 -0700
- Previous message: [Python-checkins] python/dist/src/Lib/email Header.py,1.8,1.9
- Next message: [Python-checkins] python/dist/src/Modules bsddbmodule.c,1.36,1.37 mmapmodule.c,2.39,2.40 parsermodule.c,2.71,2.72 selectmodule.c,2.66,2.67 socketmodule.c,1.234,1.235 unicodedata.c,2.18,2.19 zlibmodule.c,2.64,2.65 _testcapimodule.c,1.16,1.17 _tkinter.c,1.126,1.127
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/email
In directory usw-pr-cvs1:/tmp/cvs-serv10572
Modified Files:
Header.py
Log Message:
append(): Bite the bullet and let charset be the string name of a
character set, which we'll convert to a Charset instance. Sigh.
Index: Header.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Header.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Header.py 23 Jul 2002 04:29:54 -0000 1.9
--- Header.py 23 Jul 2002 06:08:10 -0000 1.10
***************
*** 189,198 ****
"""Append string s with Charset charset to the MIME header.
! charset defaults to the one given in the class constructor. If
! charset is given, it should be an instance of Charset (not a character
! set name string!).
"""
if charset is None:
charset = self._charset
self._chunks.append((s, charset))
--- 189,201 ----
"""Append string s with Charset charset to the MIME header.
! If charset is given, it should be a Charset instance, or the name of a
! character set (which will be converted to a Charset instance). A
! value of None (the default) means charset is the one given in the
! class constructor.
"""
if charset is None:
charset = self._charset
+ elif not isinstance(charset, Charset):
+ charset = Charset(charset)
self._chunks.append((s, charset))
- Previous message: [Python-checkins] python/dist/src/Lib/email Header.py,1.8,1.9
- Next message: [Python-checkins] python/dist/src/Modules bsddbmodule.c,1.36,1.37 mmapmodule.c,2.39,2.40 parsermodule.c,2.71,2.72 selectmodule.c,2.66,2.67 socketmodule.c,1.234,1.235 unicodedata.c,2.18,2.19 zlibmodule.c,2.64,2.65 _testcapimodule.c,1.16,1.17 _tkinter.c,1.126,1.127
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]