[issue15443] datetime module has no support for nanoseconds
Antoine Pitrou
report at bugs.python.org
Tue Jul 15 15:26:27 CEST 2014
Antoine Pitrou added the comment:
Le 14/07/2014 22:53, Tim Peters a écrit :
>
> That consumes exactly 10 bytes today. Add nanoseconds, and it will
take at least 11 (if 4 bits are insanely squashed into the bytes
currently devoted to microseconds), and more likely 12 (if nanoseconds
are sanely given their own 2 bytes).
That doesn't have to be. For example you could use the MSB of the
microseconds field to store a "datetime pickle flags" byte, which could
tell the unserializer whether a nanoseconds (or attoseconds :-)) field
follows or not.
Remember that existing pickles must remain readable, so there must be
some kind of version field anyway.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15443>
_______________________________________
More information about the Python-bugs-list
mailing list