time, calendar, datetime, etc

Kylotan kylotan at hotmail.com
Wed Jul 30 13:26:39 CEST 2003

Is there any chance of these modules becoming somewhat combined in the
future? Right now it seems a little awkward to find the function you
want. The main culprit is 'timegm' which is the only thing I need from
the calendar module but which should probably be in the time module.
And does datetime.timetuple() actually return something equivalent to
a struct_time as used by the time module? At first glance this looks
to be true, but it isn't clearly documented as such.

Personally I think 2 separate modules (1 high level, 1 low level
corresponding to the C api) would suffice, or even to combine it all
into one coherent module. Is there any benefit to the status quo that
I am missing?

PS. I use 'time.strptime(myTime, '%a %b %d %H:%M:%S %Y')' as a
reverse-asctime(), and was surprised that I couldn't find this wrapped
in a function in any of the modules. Maybe such a function would be
considered for future addition?


More information about the Python-list mailing list