[issue13674] crash in datetime.strftime
STINNER Victor
report at bugs.python.org
Wed Nov 6 16:23:14 CET 2013
STINNER Victor added the comment:
+ if (strchr("y", outbuf[1]) && buf.tm_year < 0)
hum... why not simply outbuf[1] == 'y' ? It would be more explicit and less surprising.
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.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13674>
_______________________________________
More information about the Python-bugs-list
mailing list