Bugs item #1276437, was opened at 2005-08-30 11:16 Message generated for change (Settings changed) made by oswaldohm You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1276437&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: oswaldo (oswaldohm) >Assigned to: Facundo Batista (facundobatista) Summary: error converting locale number to decimal Initial Comment: Hello, When I try con convert a locale formated number to decimal y generate an error: >>> import locale >>> import decimal >>> locale.setlocale(locale.LC_ALL, "sp") 'Spanish_Spain.1252' >>> n = locale.format("%f", 123456.78, 1) >>> n '123.456,780000' >>> d = decimal.Decimal(n) File "<console>", line 1, in ? File "C:\Python24\Lib\decimal.py", line 571, in __new__ self._sign, self._int, self._exp = context._raise_error(ConversionSyntax) File "C:\Python24\Lib\decimal.py", line 2266, in _raise_error raise error, explanation ''' decimal.InvalidOperation : ''' >>> Thanks ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1276437&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com