Message29029
When creating a Decimal from a string, leading and
trailing spaces should be allowed, as it happens with
int and float:
>>> int(' 1 ')
1
>>> Decimal(' 1 ')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/decimal.py", line 571, in
__new__
self._sign, self._int, self._exp =
context._raise_error(ConversionSyntax)
File "/usr/lib/python2.4/decimal.py", line 2267, in
_raise_error
raise error, explanation
decimal.InvalidOperation
If we look at decimal.py, the code (regex) is already
there, but commented. |
|
Date |
User |
Action |
Args |
2007-08-23 14:41:05 | admin | link | issue1516613 messages |
2007-08-23 14:41:05 | admin | create | |
|