[Python-Dev] float atime/mtime/ctime - a bad idea? (original) (raw)

Kevin Jacobs jacobs@penguin.theopalgroup.com
Wed, 16 Oct 2002 10:50:14 -0400 (EDT)


On 16 Oct 2002, Martin v. Loewis wrote:

Kevin Jacobs <jacobs@penguin.theopalgroup.com> writes:

> > Sounds good. Unless I hear otherwise, I'll add statfloattimes(bool). > > Please don't! The global setting isn't sufficient since many of us access > many 3rd party modules. Why is that insufficient? As long as you have modules that require int time stamps, you can't switch to float time stamps. If you find you are using such a module, tell the module author about that, and wait for a corrected module.

Why break all modules when only one needs the old behavior? Think about how from future import is set up.

> Why not simply create properies that return the int/float versions > from the same structure and store the float versions?

How can the property know whether to return an int or a float?

By name -- anyone who wants a floating point value can request fst_mtime vs. st_mtime, or whatever.

-Kevin

-- Kevin Jacobs The OPAL Group - Enterprise Systems Architect Voice: (216) 986-0710 x 19 E-mail: jacobs@theopalgroup.com Fax: (216) 986-0714 WWW: http://www.theopalgroup.com