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 skrah
Recipients mark.dickinson, skrah
Date 2010-01-12.20:18:34
SpamBayes Score 5.250511e-07
Marked as misclassified No
Message-id <1263327517.52.0.041459928833.issue7684@psf.upfronthosting.co.za>
In-reply-to
Content
It should not be possible to pass coefficients when constructing infinities from tuples. Otherwise it looks like infinities can have payloads (which they can't).

Example:

>>> import decimal, cdecimal
>>> d = decimal.Decimal((0, (4, 5, 3, 4), 'F'))
>>> d
Decimal('Infinity')

>>> d = cdecimal.Decimal((0, (4, 5, 3, 4), 'F'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cdecimal.InvalidOperation: [<class 'cdecimal.ConversionSyntax'>]


Also, the non-coefficient of infinities should preferably be represented as an empty tuple:

>>> decimal.Decimal("Infinity").as_tuple()
DecimalTuple(sign=0, digits=(0,), exponent='F')
>>> cdecimal.Decimal("Infinity").as_tuple()
(0, (), 'F')
History
Date User Action Args
2010-01-12 20:18:37skrahsetrecipients: + skrah, mark.dickinson
2010-01-12 20:18:37skrahsetmessageid: <1263327517.52.0.041459928833.issue7684@psf.upfronthosting.co.za>
2010-01-12 20:18:35skrahlinkissue7684 messages
2010-01-12 20:18:34skrahcreate