[Python-checkins] r61123 - in python/trunk: Lib/decimal.py Lib/test/test_decimal.py Misc/NEWS
Eric Smith
eric+python-dev at trueblade.com
Fri Feb 29 14:26:10 CET 2008
Mark Dickinson wrote:
> Raymond Hettinger <python <at> rcn.com> writes:
>
>> Wow, the decimal module has grown to 5500 lines.
>>
>> Raymond
>>
>
> It would be really great if the code for parsing the
> format specifier and padding and aligning the
> formatted value could be put elsewhere in the
> std. lib.; it's really not decimal specific, and
> it could be potentially useful to other modules.
Similarly, the C code to do the same thing could be made visible. Both
of these could be used by non-builtin numeric types that want to
implement __format__.
> Any suggestions for places to move it to?
No particular suggestion, but if we create (for example) a formatlib, we
could also create a _formatlib to hold the C implementations, and we
would harmonize the interfaces. Although the fact that it's needed by
the builtin types float and int make it tough to put it all in a
loadable module.
More information about the Python-checkins
mailing list