josh> Shouldn't datetime have strptime?

Sure, but it's not quite as trivial to implement as was strftime() support.
While strftime() is a C library function and thus easily called from within
the datetime C code, strptime() is implemented in Python as part of the time
module for portability (strptime(3) is not universally available).  You'd
need to import the time module, call its strptime() function with the input
string and format, then use the tuple it returns to initialize a new
datetime object.

If someone wants to get their feet wet with extension module programming
this might be a good place to start.  Mostly, I think nobody who has
needed/wanted it so far has the round tuits available to spend on the task.

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to