[Python-ideas] datetime: Support infinity

Chris Barker chris.barker at noaa.gov
Wed Jan 28 00:04:50 CET 2015


On Tue, Jan 27, 2015 at 2:47 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:

> On Wed, 28 Jan 2015 09:42:16 +1100
> Ben Finney <ben+python at benfinney.id.au> wrote:
>


> So what? Again, the values wouldn't change in Python. It would only be
> the PostgreSQL mapping that would change.
>

infinity times would be useful outside of the PostgreSQL mapping.

> > Adding infinities to the datetime module would probably be possible but
> > > someone has to figure out the arithmetic rules. Do we need "not a time"
> > > when adding infinity to -infinity?
>

not_a_timedelta, I suppose, or simply disallow it.

But if you do allow it -- then following the rules for floating point inf,
-inf, and NaN would make sense.

-Chris


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150127/4ab830bb/attachment.html>


More information about the Python-ideas mailing list