strptime not strict enough
Tim Roberts
timr at probo.com
Sun Dec 20 19:24:00 EST 2009
Chris Rebert <clp2 at rebertia.com> wrote:
>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
Chris is right, I'm wrong. time.strptime is a C function that loads and
runs the version in the _strptime.py module.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list