Message152314
| Author |
vstinner |
| Recipients |
Alexander.Belopolsky, Arfrever, belopolsky, ericography, jcea, khenriksson, larry, lars.gustaebel, loewis, mark.dickinson, nadeem.vawda, r.david.murray, rhettinger, rosslagerwall, skrah, vstinner |
| Date |
2012年01月30日.08:14:04 |
| SpamBayes Score |
4.5959784e-08 |
| Marked as misclassified |
No |
| Message-id |
<CAMpsgwbC-cGJVWctdqLjTgehNYiBjsAPYRpZQCmKqi+3d-SAcg@mail.gmail.com> |
| In-reply-to |
<1327893719.5.0.977023684576.issue11457@psf.upfronthosting.co.za> |
| Content |
> 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. |
|
History
|
|---|
| 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 |
|