Message202239
| Author |
vstinner |
| Recipients |
belopolsky, elixir, ezio.melotti, gvanrossum, r.david.murray, skip.montanaro, terry.reedy, tim.peters, vstinner |
| Date |
2013年11月05日.20:31:16 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAMpsgwY=xps5G6-Bm67REauZfvytAJzj6-M66dG8PHiNbyCMmA@mail.gmail.com> |
| In-reply-to |
<1383666518.52.0.0521934023032.issue19475@psf.upfronthosting.co.za> |
| Content |
2013年11月5日 Alexander Belopolsky <report@bugs.python.org>:
> +1 on adding an option to isoformat(). We already have an optional <sep> argument, so the symmetry with __str__ is not complete. To make this option more useful, rather than implementing always_emit_microseconds=False flag, I would add a keyword argument 'precision' that would take ('hour'|'minute'|'second'|millisecond'|'microsecond') value.
Hour precision is not part of the ISO 8601 standard.
"resolution" is maybe a better name for the new parameter than "precision":
http://www.python.org/dev/peps/pep-0418/#glossary
The new parameter should be added to datetime.datetime.isoformat() but
also datetime.time.isoformat(). |
|