[Python-Dev] New Subscriber Introduction

Brett Cannon bac@OCF.Berkeley.EDU
Tue, 25 Jun 2002 11:43:45 -0700 (PDT)


[M.-A. Lemburg]

> Just curious: have you taken a look at the mxDateTime parser ?
>
> It has a slightly different approach than strptime() but also
> takes a lot of load from the programmer in terms of not requiring
> a predefined format.

No.  I originally wrote strptime a year ago and it was initially just a
 hack.  It just has been fleshed out by me over the past year.  Just last
month was when I realized how I could figure out all the locale info on my
own after having taken a break from it.  I also wanted to avoid any
possible license issues so I just did completely from scratch.

As for your comment about not requiring a predefined format, I don't quite
follow what you mean.  Looking at mxDateTime's strptime, the only
difference in the possible parameters is the optional default for
mxDateTime.  Otherwise both mxDateTime's and my implementation have
exactly the same parameter requirements:
mxDateTime.strptime(string,format_string[,default])
strptime.strptime(data_string, format)

with string == data_string and format_string == format.

-Brett C.