[issue23084] nanosecond support

2014-12-18 Thread Ethan Furman
Ethan Furman added the comment: Just keep the word nanasecond in there somewhere, as that is the motivating purpose behind the patch. -- ___ Python tracker ___ _

[issue23084] nanosecond support

2014-12-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Would anyone object if I rename this issue to "Expose C struct timespec in time module"? The current title is way too broad. -- ___ Python tracker _

[issue23084] nanosecond support

2014-12-18 Thread STINNER Victor
STINNER Victor added the comment: > C implementation of datetime.now() does not rely on float time, so this is > only an issue for the Python implementation. Ah yes, but there is another technical issue that I'm trying to address in the issue #22117: datetime.datetime.now() is implemented with

[issue23084] nanosecond support

2014-12-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > it would be possible for datetime.datetime.now() > to avoid the float time. C implementation of datetime.now() does not rely on float time, so this is only an issue for the Python implementation. Moreover, as long as datetime keeps its microsecond reso

[issue23084] nanosecond support

2014-12-18 Thread STINNER Victor
STINNER Victor added the comment: See the issue #22117 which basically implement the PEP 410, but only for private C API. The idea is to avoid loss of precision caused by the float type when it is possible. For example, it would be possible for datetime.datetime.now() to avoid the float time.

[issue23084] nanosecond support

2014-12-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > time() could be used to produce them How? -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue23084] nanosecond support

2014-12-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > .. the intent is not for better sleep support, but simply > to be able to create and record time data which contains nano-seconds. Can you describe a specific use-case? What's the advantage of the proposed time.struct_timespec over say >>> timespec =

[issue23084] nanosecond support

2014-12-18 Thread Ethan Furman
Ethan Furman added the comment: I haven't reviewed the patch yet, but I believe the intent is not for better sleep support, but simply to be able to create and record time data which contains nano-seconds. python-dev discussion here: https://mail.python.org/pipermail/python-dev/2014-Decembe

[issue23084] nanosecond support

2014-12-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See also discussion in #9079, #14127 and #14180. At some point there was some resistance to use capsule mechanism to share code within stdlib and the functions that were shared between time and datetime modules were moved to the core. I am -1 on adding

[issue23084] nanosecond support

2014-12-18 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +belopolsky, ethan.furman, lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue23084] nanosecond support

2014-12-18 Thread mdcb
Changes by mdcb : -- hgrepos: -289 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mai

[issue23084] nanosecond support

2014-12-18 Thread mdcb
New submission from mdcb: nanosecond support has been discussed at length on python-dev and issue 15443. POSIX.1b defines a struct timespec that is commonly used in C, and seems a good candidate to add core nanosecond support. kernel's time-related structs typically end up in the time module.