[ python-Bugs-1032960 ] Confusing description of strict option for
email.Parser
SourceForge.net
noreply at sourceforge.net
Sat Oct 9 23:29:50 CEST 2004
Bugs item #1032960, was opened at 2004-09-22 16:50
Message generated for change (Comment added) made by bwarsaw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1032960&group_id=5470
Category: Documentation
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Andrew Bennetts (spiv)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: Confusing description of strict option for email.Parser
Initial Comment:
The docs at
http://www.python.org/dev/doc/devel/lib/node534.html say:
"Normally, when things like MIME terminating boundaries
are missing, or when messages contain other formatting
problems, the Parser will raise a MessageParseError.
However, when lax parsing is enabled, the Parser will
attempt to work around such broken formatting ..."
Which strongly suggests that the 'strict' flag defaults
to True. However, it later says:
"The strict flag defaults to False since lax parsing
usually provides the most convenient behavior."
I suggest the paragraph be reworded to avoid giving the
impression that strict is True by default. Perhaps
something like:
"The optional strict flag specifies whether strict or
lax parsing should be performed. When things like MIME
terminating boundaries are missing, or when messages
contain other formatting problems, the Parser will
raise a MessageParseError if the strict flag is True.
Otherwise, it uses lax parsing, and the Parser will
attempt to work around such broken formatting to
produce a usable message structure (this doesn't mean
MessageParseErrors are never raised; some ill-formatted
messages just can't be parsed). The strict flag
defaults to False since lax parsing usually provides
the most convenient behavior."
----------------------------------------------------------------------
>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2004-10-09 17:29
Message:
Logged In: YES
user_id=12800
I've improved the docs for the Python 2.3 version; it should
show up in Python 2.3.5.
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw)
Date: 2004-10-09 17:22
Message:
Logged In: YES
user_id=12800
Changing group to Python 2.3, since the 'strict' argument is
deprecated in Python 2.4.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1032960&group_id=5470
More information about the Python-bugs-list
mailing list