[issue10947] imaplib: Internaldate2tuple and ParseFlags require (and latter returns) bytes arrays; should allow/return str
Alexander Belopolsky
report at bugs.python.org
Thu Jan 20 00:00:48 CET 2011
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
David,
Can you weigh in on this?
I am -1 on improving Internaldate2tuple(). I think the module should provide a function that would return an aware datetime object instead of a timetuple.
The proposed patch will make error reporting from Internaldate2tuple() inconsistent: invalid bytes result in None return while non-ASCII characters in strings would raise an encoding error. While I don't like the "if not mo: return None" logic, if compatibility with 2.x is the goal, encoding errors should be caught and converted to return None.
----------
nosy: +belopolsky, r.david.murray
type: behavior -> feature request
versions: +Python 3.3 -Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10947>
_______________________________________
More information about the Python-bugs-list
mailing list