diff options
author | Barry Warsaw <barry@python.org> | 2004-05-09 03:55:11 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2004-05-09 03:55:11 (GMT) |
commit | 24f79762a10bdadcf8383e5a94acf5346810d4d5 (patch) | |
tree | 2cefd9ed86b17e1bd4f3eaeecbfabbeb4f591acb /Lib/email/__init__.py | |
parent | 235c8eba62f1ecfb5beb1be0f692de3a07ef4ab1 (diff) | |
download | cpython-24f79762a10bdadcf8383e5a94acf5346810d4d5.zip cpython-24f79762a10bdadcf8383e5a94acf5346810d4d5.tar.gz cpython-24f79762a10bdadcf8383e5a94acf5346810d4d5.tar.bz2 |
Update to Python 2.3, getting rid of backward compatiblity crud.
Diffstat (limited to 'Lib/email/__init__.py')
-rw-r--r-- | Lib/email/__init__.py | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/Lib/email/__init__.py b/Lib/email/__init__.py index e45dadc..74b9b73 100644 --- a/Lib/email/__init__.py +++ b/Lib/email/__init__.py @@ -1,10 +1,9 @@ -# Copyright (C) 2001,2002 Python Software Foundation -# Author: barry@zope.com (Barry Warsaw) +# Copyright (C) 2001-2004 Python Software Foundation +# Author: barry@python.org (Barry Warsaw) -"""A package for parsing, handling, and generating email messages. -""" +"""A package for parsing, handling, and generating email messages.""" -__version__ = '2.5.5' +__version__ = '3.0a0' __all__ = [ 'base64MIME', @@ -29,12 +28,6 @@ __all__ = [ 'message_from_file', ] -try: - True, False -except NameError: - True = 1 - False = 0 - # Some convenience routines. Don't import Parser and Message as side-effects @@ -51,6 +44,7 @@ def message_from_string(s, _class=None, strict=False): _class = Message return Parser(_class, strict=strict).parsestr(s) + def message_from_file(fp, _class=None, strict=False): """Read a file and parse its contents into a Message object model. @@ -61,12 +55,3 @@ def message_from_file(fp, _class=None, strict=False): from email.Message import Message _class = Message return Parser(_class, strict=strict).parse(fp) - - - -# Patch encodings.aliases to recognize 'ansi_x3.4_1968' which isn't a standard -# alias in Python 2.1.3, but is used by the email package test suite. -from encodings.aliases import aliases # The aliases dictionary -if not aliases.has_key('ansi_x3.4_1968'): - aliases['ansi_x3.4_1968'] = 'ascii' -del aliases # Not needed any more |