[Python-ideas] Making datetime __str__ and isoformat more consistent
Nick Coghlan
ncoghlan at gmail.com
Sat Nov 2 10:25:29 CET 2013
On 2 November 2013 12:49, MRAB <python at mrabarnett.plus.com> wrote:
> On 02/11/2013 02:17, Alexander Belopolsky wrote:
> +1
>
> Guaranteeing round-trip does seem like a reasonable behaviour to me.
It's been a while since I had to deal seriously with date parsing, but
at the time, emitting microseconds was a fairly surefire way to break
most utilities that nominally supported date parsing. Roundtripping is
good, but interoperability is important too, and as far as I am aware,
microsecond support when parsing is still sketchy with many date
parsing tools.
Ensuring that emitting and consuming microseconds is easy would
definitely be a good thing, but unless general date parsing support
(not just in Python, but in programming utilities in general) has
improved more dramatically in recent years than I believe it has,
emitting microseconds by default would be a backwards compatibility
breach.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list