[Python-ideas] Need way to check if a `datetime.timedelta` is positive

Terry Reedy tjreedy at udel.edu
Sat Nov 5 19:51:34 CET 2011


On 11/5/2011 10:07 AM, Ram Rachum wrote:

> my_timedelta >= datetime.timedelta(0)

IMHO, This *is* the proper way. If doing repeatedly, put
TD0 = datetime.timedelta(0)
at the top.

-- 
Terry Jan Reedy




More information about the Python-ideas mailing list