[Python-ideas] datetime: Support infinity
Antoine Pitrou
solipsis at pitrou.net
Wed Jan 28 02:25:13 CET 2015
On Wed, 28 Jan 2015 11:46:38 +1100
Steven D'Aprano <steve at pearwood.info> wrote:
>
> The obvious question is "What does Postgresql do?"
>
> Same for use-cases, which Antoine asked for. The primary use-case is to
> improve compatibility with Postgresql while still treating the full
> range of dates up to and including date.max as regular dates.
>
> I'm not convinced that numpy is the right library to follow here. Unless
> there are cases where you would perform calculations with Not-A-Time, an
> exception would probably be better suited.
I should add that I mentioned Numpy as a datapoint, but
knowledgeable people I talked to generally agreed that Numpy's
datetime64/timedelta64 design isn't very good (actually, it has an
even wonkier feature that's only exposed internally AFAIK). So
"Not-A-Time" need not necessarily be implemented in the stdlib ;)
Regards
Antoine.
More information about the Python-ideas
mailing list