[Python-Dev] Checking input range in time.asctime and time.ctime

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Jan 4 17:12:11 CET 2011


On Mon, Jan 3, 2011 at 7:47 PM, Guido van Rossum <guido at python.org> wrote:
> Given the rule garbage in -> garbage out, I'd do the most useful
> thing, which would be to produce a longer output string (and update
> the docs).

I did not know that GIGO was a design rule, but after thinking about
it some more, I agree.  It is very unlikely that a Python program
would care about precise length of the string produced by
time.asctime() and these strings are not well suited for passing
timestamps to other programs that may care.  (Use of asctime()
timestamps in internet protocols has been long deprecated and surely
won't be in use in 10-th millennium :-)


More information about the Python-Dev mailing list