This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cool-RR
Recipients cool-RR
Date 2012-03-12.13:13:07
SpamBayes Score 1.4537205e-11
Marked as misclassified No
Message-id <1331557988.1.0.944940856764.issue14262@psf.upfronthosting.co.za>
In-reply-to
Content
Please allow using decimals as arguments to `timedelta`, so the following code won't raise an exception:

Python 3.3.0a1 (default, Mar  4 2012, 17:27:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> import decimal
>>> datetime.timedelta(hours=decimal.Decimal(7))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported type for timedelta hours component: Decimal

It's really annoying to have to convert all the arguments to `float` every time I instantiate a `timedelta`.
History
Date User Action Args
2012-03-12 13:13:08cool-RRsetrecipients: + cool-RR
2012-03-12 13:13:08cool-RRsetmessageid: <1331557988.1.0.944940856764.issue14262@psf.upfronthosting.co.za>
2012-03-12 13:13:07cool-RRlinkissue14262 messages
2012-03-12 13:13:07cool-RRcreate