[issue11457] os.stat(): add new fields to get timestamps as Decimal objects with nanosecond resolution
Raymond Hettinger
report at bugs.python.org
Sun Oct 9 17:20:07 CEST 2011
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
[Arfrever Frehtes Taifersar Arahesis]
> I suggest to have low-level, POSIX-compatible,
> (int, int)-based interface in os module and add
> high-level, decimal.Decimal-based interface in
> shutil module.
I agree that this is the cleanest approach.
Ideally, the os module stays as close as possible
to the underlying structures. Also, it is desirable
to keep it fast (not importing a pure python decimal
module as a side-effect of checking the a timestamp
-- making everyone pay the cost for a feature that
few people will want or need).
With respect to the options suggested by MvL,
I support adding new named fields and opposed
to using a flag to indicate a type change (that
would be error-prone).
If new fields as added, their names need to follow
the existing naming convention (st_variable).
-1 on the patch as currently proposed. I don't
think the performance impact is acceptable.
----------
nosy: +rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11457>
_______________________________________
More information about the Python-bugs-list
mailing list