diff options
Diffstat (limited to 'Lib/email/__init__.py')
| -rw-r--r-- | Lib/email/__init__.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Lib/email/__init__.py b/Lib/email/__init__.py index 74b9b73..8a46fec 100644 --- a/Lib/email/__init__.py +++ b/Lib/email/__init__.py @@ -1,5 +1,6 @@ # Copyright (C) 2001-2004 Python Software Foundation -# Author: barry@python.org (Barry Warsaw) +# Author: Barry Warsaw +# Contact: email-sig@python.org """A package for parsing, handling, and generating email messages.""" @@ -33,25 +34,19 @@ __all__ = [ # Some convenience routines. Don't import Parser and Message as side-effects # of importing email since those cascadingly import most of the rest of the # email package. -def message_from_string(s, _class=None, strict=False): +def message_from_string(s, *args, **kws): """Parse a string into a Message object model. Optional _class and strict are passed to the Parser constructor. """ from email.Parser import Parser - if _class is None: - from email.Message import Message - _class = Message - return Parser(_class, strict=strict).parsestr(s) + return Parser(*args, **kws).parsestr(s) -def message_from_file(fp, _class=None, strict=False): +def message_from_file(fp, *args, **kws): """Read a file and parse its contents into a Message object model. Optional _class and strict are passed to the Parser constructor. """ from email.Parser import Parser - if _class is None: - from email.Message import Message - _class = Message - return Parser(_class, strict=strict).parse(fp) + return Parser(*args, **kws).parse(fp) |
