[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

Alexander Belopolsky report at bugs.python.org
Tue Mar 1 17:00:34 EST 2016


Alexander Belopolsky added the comment:

Personally, I don't rounding is that useful.  My working assumption is that users will select say timespec='millisecond' only when they know that their time source produces datetime instances with millisecond precision and they don't want to kill more trees by printing redundant 0's.

MAL's objection this this line of arguments was that some time sources have odd resolution (he reported MS SQL's use of 333 ms) and a user may want to have a perfect round-tripping when using a sub-usec timespec and such an odd time source or destination.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19475>
_______________________________________


More information about the Python-bugs-list mailing list