Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:
On Fri, Sep 9, 2011 at 4:50 PM, Larry Hastings <rep...@bugs.python.org> wrote: .. > I think a pair of integers is a poor API. It ties the value of the > fractional part to nanoseconds. What happens > when a future filesystem implements picosecond resolution? If history repeats, struct stat will grow new st_xtimesuperspec fields, st_xtimespec will become a macro expanding to st_xtimesuperspec.tv_picosec and we will get a request to support that in os.stat(). I don't see why this conflicts with stat_result.st_xtimespec returning a (sec, nsec) tuple. If we will ever have to support higher resolution, stat_result will grow another member with a (sec, picosec) or whatever will be appropriate value. > And then later goes to femtoseconds? Same thing. > Or some platform chooses another divisor (2**32)? Unlikely, but C API will dictate Python API if this happens. ---------- nosy: +Alexander.Belopolsky _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11457> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com