Alexander Belopolsky <[email protected]> added the comment:
This strikes me as an implementation artifact. There is no reason for
time.strptime() to validate date triplets. Applications that require valid
dates can use datetime.strptime(). I suggest changing time.strptime()
specification to match POSIX strptime(). My understanding is that POSIX only
requires field by field range checking (%d range 01 to 31, %m range 01 to 12)
and not full structure validation. This would be consistent with the way leap
seconds are currently treated:
>>> time.strptime('60', '%S')[5]
60
----------
assignee: -> belopolsky
stage: -> needs patch
type: behavior -> enhancement
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14157>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com