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 romaia
Recipients
Date 2006-07-03.20:27:42
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 14:41:05adminlinkissue1516613 messages
2007-08-23 14:41:05admincreate