New submission from Stefan Krah: Making the _decimal part of #17705 a separate issue. I noticed that decimal.py does not allow a newline as a fill character:
Python 3.3.0rc2+ (default:50dd7426b880, Sep 25 2012, 15:52:28) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.modules['_decimal'] = None >>> from decimal import * >>> format(Decimal(123), "\n<10") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.3/decimal.py", line 3768, in __format__ spec = _parse_format_specifier(specifier, _localeconv=_localeconv) File "/usr/local/lib/python3.3/decimal.py", line 6176, in _parse_format_specifier raise ValueError("Invalid format specifier: " + format_spec) ValueError: Invalid format specifier: <10 The feature isn't particularly useful, but it would be easiest for _decimal to support it rather than having another special case. Are you okay with the decimal.py patch? ---------- assignee: skrah components: Extension Modules files: decimal_newline_fillchar.diff keywords: patch messages: 187119 nosy: Jason.Michalski, Julian, eric.smith, mark.dickinson, skrah priority: normal severity: normal stage: needs patch status: open title: _decimal: allow NUL fill character type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29892/decimal_newline_fillchar.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17768> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com