[Python-Dev] proposal: add basic time type to the standard library

M.-A. Lemburg mal@lemburg.com
Tue, 26 Feb 2002 23:18:22 +0100


Guido van Rossum wrote:
> 
> > FWIW, mxDateTime exposes these values as attributes -- there
> > is no call overhead.
> 
> Good, I think this is the way to go.  (Of course there will be some
> C-level call overhead if we make these properties.)

Right.
 
> > > Serious question: what do you tend to do with time values?  I imagine
> > > that once we change strftime() to accept an abstract time object,
> > > you'll never need to call either timetuple() or year() -- strftime()
> > > will do it for you.
> >
> > Depends on the application space. Database applications
> > will call .timetuple() very often and use strftime() hardly
> > ever.
> 
> What does a database app with the resulting tuple?

It puts the values into struct fields for year, month, day, etc.
(Databases usually avoid using Unix ticks since these cause
the known problems with dates prior to 1970)

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/