Message152314
> I think that one of available types of time values returned by os.stat() should
> allow to directly pass these values to os.futimens() and os.utimensat(), which
> expect (time_sec, time_nsec) tuples.
If we choose to give the possibility to get decimal.Decimal objects,
we should also patch some functions to support Decimal objects, like
datetime.datetime.fromtimestamp() (today, it "just works", because a
Decimal object can be converted to float). We may accept Decimal in
os.futimens() and os.utimensat(), but I am not sure for this
particular case.
To come back to my format solution, we can also support classical C
structures to interact with C functions (in Python or more directly
using ctypes):
- "timeval": (secs, usec) where sec and usec are int
- "timespec": (secs, nsec) where sec and nsec are int
Or we may introduce conversion functions from other types like float,
Decimal or another type. |
|
Date |
User |
Action |
Args |
2012-01-30 08:14:05 | vstinner | set | recipients:
+ vstinner, loewis, rhettinger, jcea, mark.dickinson, belopolsky, lars.gustaebel, larry, nadeem.vawda, Arfrever, r.david.murray, skrah, Alexander.Belopolsky, rosslagerwall, khenriksson, ericography |
2012-01-30 08:14:04 | vstinner | link | issue11457 messages |
2012-01-30 08:14:04 | vstinner | create | |
|