Message125117
On Sun, Jan 2, 2011 at 5:35 PM, Georg Brandl <report@bugs.python.org> 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.
Georg,
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
buffer.
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:48 | Alexander.Belopolsky | set | recipients:
+ Alexander.Belopolsky, georg.brandl, belopolsky, wsanchez, vstinner, ned.deily, Trundle, SilentGhost, sandro.tosi, l0nwlf |
2011-01-02 22:53:47 | Alexander.Belopolsky | link | issue8013 messages |
2011-01-02 22:53:46 | Alexander.Belopolsky | create | |
|