Message202271
| Author |
tim.golden |
| Recipients |
Ramchandra Apte, belopolsky, flox, gladman, patrick.vrijlandt, tim.golden, vstinner |
| Date |
2013年11月06日.16:19:42 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<527A6C15.7090602@timgolden.me.uk> |
| In-reply-to |
<1383751394.62.0.474557070523.issue13674@psf.upfronthosting.co.za> |
| Content |
On 06/11/2013 15:23, STINNER Victor wrote:
> + if (strchr("y", outbuf[1]) && buf.tm_year < 0)
>
> hum... why not simply outbuf[1] == 'y' ? It would be more explicit
> and less surprising.
Ummm. I have no idea what I was thinking about there. I think it was
somehow connected with the strchr check a few lines earlier. Anyhow,
fixed now, thanks.
> For the unit test, it would be nice to test also asctime(), even if
> time.asctime() doesn't use asctime() of the C library. And it's
> better to run tests on all platforms. Only test_y_before_1900()
> should behave differently on other platforms, but it would be nice to
> run test_y_before_1900() on platforms supporting "%y" with year <
> 1900. In my experience, other operating systems have also their own
> issues. For example, time.strftime() has a specific test to Windows,
> but also Solaris and AIX.
I'm not sure where time.asctime comes into it. The implementation
doesn't use time.strftime, but even if it did, I don't see the need to
add a test under this issue: the unit test for strftime should be enough
to cover any direct or indirect use of the function.
I'm happy to open up the other tests.
TJG |
|