[Python-ideas] datetime: Support infinity
yawar.amin at gmail.com
Wed Jan 28 04:24:10 CET 2015
On 2015-01-27 18:04, Chris Barker wrote:
> On Tue, Jan 27, 2015 at 2:47 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> > > 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.
Adding datetime.neg_inf() and datetime.pos_inf() should return
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 834 bytes
Desc: OpenPGP digital signature
More information about the Python-ideas