Author Alexander.Belopolsky
Recipients Alexander.Belopolsky, SilentGhost, Trundle, belopolsky, georg.brandl, l0nwlf, ned.deily, sandro.tosi, vstinner, wsanchez
Date 2011-01-02.22:53:46
SpamBayes Score 7.48856e-07
Marked as misclassified No
Message-id <>
In-reply-to <>
On Sun, Jan 2, 2011 at 5:35 PM, Georg Brandl <> wrote:
> Both asctime() and ctime() fixed to remove newline no matter how many
> digits the year has in r87657.  I also took the liberty of making the error
> messages consistent.


I disagree with your solution.  According to relevant standards,
asctime is undefined for year > 9999.  A compliant implementation can
do anything in this case including not null-terminating the internal
buffer.  With your change, time.strftime  will happily replace the
first unrelated '\n' with '\0' that it will find beyond the internal

I was considering raising an ValueError if '\n' is not found at 24th
position, but this (or a precondition check solution) should wait
until 3.3.
Date User Action Args
2011-01-02 22:53:48Alexander.Belopolskysetrecipients: + Alexander.Belopolsky, georg.brandl, belopolsky, wsanchez, vstinner, ned.deily, Trundle, SilentGhost, sandro.tosi, l0nwlf
2011-01-02 22:53:47Alexander.Belopolskylinkissue8013 messages
2011-01-02 22:53:46Alexander.Belopolskycreate