James Abbatiello <abb...@gmail.com> added the comment: Since there's no good way to disable the assertion (see issue4804), checking the validity of the argument beforehand looks like an option. The checking that's currently being done in the strftime() implementation looks useful but it is not enough. The checking in the MS implementation of asctime() is very strict and validates the entire date, not just one field at a time. So there's no way to print out non-existant dates like (2009, 2, 31, 0, 0, 0, 0, 0, 0) -> 'Mon Feb 31 00:00:00 2009'.
I don't know if anybody is relying on that kind of behavior. If not then the function could be limited to accept only valid dates. Alternatively we could just not call down to asctime() but instead provide our own implementation using sprintf/strftime. ---------- nosy: +abbeyj _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6608> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com