Should I use a dictionary?

Danyel Fisher danyelf at ics.uci.edu
Wed Jun 27 02:39:48 EDT 2001


> >This method should able be very fast if you convert the data to a
> >straight int first.
>
> Thanks. This suits me perfectly. I get the date in the format "2001-01-01
> 13:12", so that would be "200101011312" with no risk for confusion.

True. But you may still wish to consider UNIX standard date/time:
it will make your data interprable in other contexts, should you need to.
(The worst case scenario is that someone, maintaining your code, sees
numerical dates and tries to understand them as standard time integers).

Any strong reason why you don't use time.strptime()?

Danyel,
who got caught by this once or twice





More information about the Python-list mailing list