Message95406
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. |
|
Date |
User |
Action |
Args |
2009-11-17 22:13:29 | tim.peters | set | recipients:
+ tim.peters, doerwalter, georg.brandl, pitrou, ezio.melotti, r.david.murray |
2009-11-17 22:13:29 | tim.peters | set | messageid: <1258496009.84.0.200285365909.issue7342@psf.upfronthosting.co.za> |
2009-11-17 22:13:27 | tim.peters | link | issue7342 messages |
2009-11-17 22:13:27 | tim.peters | create | |
|