homepage

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 hac.man
Recipients hac.man
Date 2012年09月07日.22:47:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347058075.63.0.395926246222.issue15882@psf.upfronthosting.co.za>
In-reply-to
Content
I think I may have found a problem with the code that constructs Infinity from tuples in the C _decimal module.
# pure python (3.x or 2.x)
>>> decimal.Decimal( (0, (0, ), 'F'))
Decimal('Infinity')
# _decimal
>>> decimal.Decimal( (0, (0, ), 'F'))
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]
Also, there is no unit test coverage for constructing these special values from tuples either. I have provided some that pass with the existing pure python code and with the modifications to the _decimal C code.
The unit tests can be applied to Python 2.7.x as well, if desired. They would go in the ExplicitConstructionTest.test_explicit_from_tuples() method.
History
Date User Action Args
2012年09月07日 22:47:55hac.mansetrecipients: + hac.man
2012年09月07日 22:47:55hac.mansetmessageid: <1347058075.63.0.395926246222.issue15882@psf.upfronthosting.co.za>
2012年09月07日 22:47:55hac.manlinkissue15882 messages
2012年09月07日 22:47:54hac.mancreate

AltStyle によって変換されたページ (->オリジナル) /