Author agthorr
Recipients
Date 2005-09-12.21:41:10
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
In python 2.4.1, the datetime.timedelta type allows for
the multiplication and division by integers.  However,
it raises a TypeError for multiplication or division by
floating point numbers.  This is a counterintutive
restriction and I can't think of any good reason for it.

For example:

>>> import datetime
>>> datetime.timedelta(minutes=5)/2
datetime.timedelta(0, 150)
>>> datetime.timedelta(minutes=5)*0.5
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for *:
'datetime.timedelta' and 'float'
History
Date User Action Args
2007-08-23 14:34:30adminlinkissue1289118 messages
2007-08-23 14:34:30admincreate