strptime not strict enough
Chris Rebert
clp2 at rebertia.com
Wed Dec 16 01:20:52 EST 2009
On Tue, Dec 15, 2009 at 9:47 PM, Tim Roberts <timr at probo.com> wrote:
> Tobias Weber <towb at gmx.net> wrote:
>>
>>despite the directives for leading zero stime.strptime('09121',
>>'%y%m%d') returns the first of December. Shouldn't it raise ValueError?
>
> Python merely calls the strptime function in your C run-time library. If
> it sucks, so will time.strptime.
Er, no, wrong: http://svn.python.org/view/python/trunk/Lib/_strptime.py?view=markup
Cheers,
Chris
--
http://blog.rebertia.com
More information about the Python-list
mailing list