News for hackers. Stuff that matters.
Re:Ten Python datetime pitfalls, and what libraries are (not... by ariebovenberg on Sunday February 18, 2024 @04:00PM (#39423280)
Author of the article here—

I actually did start out basically porting Chrono to Python, but decided against it for two reasons:

1. While I really liked handling local/UTC conversions with the "LocalResult" enum in Rust, it translated poorly to Python. Somewhere along the line you'd need to transition from Rust's "errors as values" to Python's exception-oriented world. I actually wish Python would go Rust's way, but I'm not going to swim against the current here...

2. Most modern libraries in other languages choose to disambiguate local datetimes. I felt it was safer to go the road more traveled here.

There are no comments on this comment yet.