Alexander Belopolsky <[email protected]> added the comment:
Given
assert(*m > 0);
assert(*d > 0);
at the end of normalize_y_m_d(), it looks like at lest 1 <=*month and 1 <=*day
are redundant.
A closer look also reveals
assert(1 <= *m && *m <= 12);
in the middle of normalize_y_m_d(). This seems to leave only *day <=31
possibly relevant.
I suspect that out of bounds day surviving normalize_y_m_d() is a logical error
in that function that needs to be fixed and an assert() added at the end. The
proposed patch appears to cure the symptom rather than the actual flaw.
----------
nosy: +Alexander.Belopolsky
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7150>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com