Tim Peters <tim.pet...@gmail.com> added the comment:

This behavior is intentional and is documented in the
datetime.isoformat() docs:

"""
Return a string representing the date and time in ISO 8601 format,
YYYY-MM-DDTHH:MM:SS.mmmmmm or, if microsecond is 0, YYYY-MM-DDTHH:MM:SS 
...
"""

It was Guido's idea ;-)  The point is that __str__ is supposed to
produce "nice" output, and ".0000000" was thought to be more annoying
than useful, since the common case is that datetime objects don't use
microseconds.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7342>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to