消息 [125345]
I am attaching a patch. While working on the patch, I noticed that although time.accept2dyear is documented as boolean, the current code expects int and treats any non-int including True as 0:
>>> time.accept2dyear = True; time.asctime((99,) + (0,)*8)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: year >= 1900 required
>>> time.accept2dyear = 1; time.asctime((99,) + (0,)*8)
'Mon Jan 1 00:00:00 1999'
This is clearly a bug. (Although Y2K note contradicts time.accept2dyear documentation.)
Supporting year < 1900 would be a feature in my view, but I agree with SilentGhost that once we extended support to 5+ digit years, it is odd to keep year >= 1900 restriction. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2011-01-04 18:30:47 | belopolsky | 修改 | recipients:
+ belopolsky, vstinner, Trundle, SilentGhost |
| 2011-01-04 18:30:47 | belopolsky | 修改 | messageid: <1294165847.38.0.45421650534.issue10827@psf.upfronthosting.co.za> |
| 2011-01-04 18:30:45 | belopolsky | 链接 | issue10827 messages |
| 2011-01-04 18:30:45 | belopolsky | 创建 | |
|