Message26857
| Author |
connelly |
| Recipients |
| Date |
2005年11月13日.11:17:39 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
The += and *= operators have strange behavior when the
LHS is a Decimal and the RHS is a float (as of
2005年11月13日 CVS decimal.py).
Example:
>>> d = Decimal('1.02')
>>> d += 2.1
>>> d
NotImplemented
A blatant violation of "Errors should never pass silently."
Also, a bad error description is produced for the *=
operator:
>>> d = Decimal('1.02')
>>> d *= 2.9
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: can't multiply sequence by non-int
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 14:36:11 | admin | link | issue1355842 messages |
| 2007年08月23日 14:36:11 | admin | create |
|