Where is time.strptime()?
Tim Peters
tim_one at email.msn.com
Sat Nov 4 01:34:58 EST 2000
[jschmitt at vmlabs.com]
> I even looked for a 'time.py' in Python20\Lib and didn't find one. Is
> it magic?
Yes, but not deep magic: much of the std Python library is written in
Python (that's what lives under Lib -- I assume you're running under some
flavor of Windows), but some is written in C. The time module happens to be
one of the latter. If you get the full source-code distribution, you'll
find the C source for the time module in Modules/timemodule.c.
If your question is why Windows doesn't have time.strptime, then, like the
docs say, it's only available under "Most modern Unix systems". The Windows
C library doesn't supply it, so Python doesn't either on Windows. IIRC,
supplying strptime everywhere is already a feature request in PEP42. That
will happen if and when someone contributes unencumbered code+docs+tests to
implement it.
timed-out-ly y'rs - tim
More information about the Python-list
mailing list