diff options
author | Barry Warsaw <barry@python.org> | 2002-07-18 21:29:17 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2002-07-18 21:29:17 (GMT) |
commit | 2d2fc229a05ae4bb65a8d0c1f7a588b73539d361 (patch) | |
tree | 1a8b6f17daf003ab83d191bbb9dd93337eb3ac0c | |
parent | 1693ba8bf83d5d2036931e79b519cddaa352b2f0 (diff) | |
download | cpython-2d2fc229a05ae4bb65a8d0c1f7a588b73539d361.zip cpython-2d2fc229a05ae4bb65a8d0c1f7a588b73539d361.tar.gz cpython-2d2fc229a05ae4bb65a8d0c1f7a588b73539d361.tar.bz2 |
Anthony Baxter's patch to expose the parser's `strict' flag in these
convenience functions. Closes SF # 583188 (python project).
-rw-r--r-- | Lib/email/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/email/__init__.py b/Lib/email/__init__.py index a82ef57..1693c78 100644 --- a/Lib/email/__init__.py +++ b/Lib/email/__init__.py @@ -4,7 +4,7 @@ """A package for parsing, handling, and generating email messages. """ -__version__ = '2.1' +__version__ = '2.2' __all__ = ['Charset', 'Encoders', @@ -32,8 +32,8 @@ __all__ = ['Charset', from email.Parser import Parser as _Parser from email.Message import Message as _Message -def message_from_string(s, _class=_Message): - return _Parser(_class).parsestr(s) +def message_from_string(s, _class=_Message, strict=1): + return _Parser(_class, strict=strict).parsestr(s) -def message_from_file(fp, _class=_Message): - return _Parser(_class).parse(fp) +def message_from_file(fp, _class=_Message, strict=1): + return _Parser(_class, strict=strict).parse(fp) |