Re: [Python-Dev] iso8601 parsing

2017-10-24 Thread Elvis Pranskevichus
On Tuesday, October 24, 2017 5:53:58 PM EDT Alexander Belopolsky wrote: > No, but the last time I suggested that that datetime types should > satisfy the same invariants as numbers, namely > T(repr(x)) == x, the idea was met will silence. I, on the other hand, > am not very enthusiastic about name

Re: [Python-Dev] iso8601 parsing

2017-10-24 Thread Alexander Belopolsky
On Tue, Oct 24, 2017 at 5:26 PM, Chris Barker wrote: > On Mon, Oct 23, 2017 at 5:33 PM, Hasan Diwan wrote: >> > can anyone argue that it's not a good idea for datetime ot > be able to read the iso format it puts out? No, but the last time I suggested that that datetime types should satisfy the s

Re: [Python-Dev] iso8601 parsing

2017-10-24 Thread Chris Barker
On Mon, Oct 23, 2017 at 5:33 PM, Hasan Diwan wrote: > If one simply replaces the 'T' with a space and trims it after the '.', > IIRC, it parses fine. > sure, but really, can anyone argue that it's not a good idea for datetime ot be able to read the iso format it puts out??? -CHB > -- H > > O

Re: [Python-Dev] PEP 564: Add new time functions with nanosecond resolution

2017-10-24 Thread Victor Stinner
Warning: the PEP 564 doesn't make any assumption about clock synchronizations. My intent is only to expose what the operating system provides without losing precision. That's all :-) 2017-10-24 13:25 GMT+02:00 Antoine Pitrou : > NTP is layered over UDP. The article shows base case UDP latencies o

Re: [Python-Dev] PEP 564: Add new time functions with nanosecond resolution

2017-10-24 Thread Antoine Pitrou
Le 24/10/2017 à 13:20, Victor Stinner a écrit : >> See https://blog.cloudflare.com/how-to-achieve-low-latency/ > > This article doesn't mention NTP, synchronization or nanoseconds. NTP is layered over UDP. The article shows base case UDP latencies of around 15µs over 10Gbps Ethernet. Regards

Re: [Python-Dev] PEP 564: Add new time functions with nanosecond resolution

2017-10-24 Thread Victor Stinner
2017-10-24 11:22 GMT+02:00 Antoine Pitrou : > What does synchronization have to do with it? If synchronization > matters, then your PEP should be rejected, because current computers > using NTP can't synchronize with a better precision than 230 ns. Currently, the PEP 564 is mostly designed for ha

[Python-Dev] PEP 564: Add new time functions with nanosecond resolution

2017-10-24 Thread Wes Turner
On Tuesday, October 24, 2017, Antoine Pitrou > wrote: > On Tue, 24 Oct 2017 09:00:45 +0200 > Victor Stinner wrote: > > By the way, you mentionned that clocks are not synchronized. That's > another > > revelant point. Even if system clocks are synchronized on a single > > computer, I read that you

Re: [Python-Dev] PEP 564: Add new time functions with nanosecond resolution

2017-10-24 Thread Antoine Pitrou
On Tue, 24 Oct 2017 09:00:45 +0200 Victor Stinner wrote: > By the way, you mentionned that clocks are not synchronized. That's another > revelant point. Even if system clocks are synchronized on a single > computer, I read that you cannot reach nanosecond resolution for a NTP > synchronization eve

Re: [Python-Dev] PEP 564: Add new time functions with nanosecond resolution

2017-10-24 Thread Victor Stinner
Thanks Thomas, it was interesting! You confirmed that time.time_ns() and other system clocks exposed by Python are inappropriate for sub-nanosecond physical experiment. By the way, you mentionned that clocks are not synchronized. That's another revelant point. Even if system clocks are synchronize