Message150553
> I assume this is left over from the PEP 393 changes.
Correct.
> I'm not sure such a restriction needs to exist any more.
The restriction was introduced to simplify the implementation. maxchar has to be computed exactly in format_string_internal(), format_int_or_long_internal(), format_float_internal() and format_complex_internal().
For format_string_internal(), the following change is enough (untested):
if (lpad != 0 || rpad != 0)
maxchar = Py_MAX(maxchar, format->fill_char);
For number formatting functions, spec->n_lpadding, spec->n_spadding and spec->n_rpadding have to be checked. Something like:
if (spec->n_lpadding || spec->n_spadding || spec->n_rpadding)
maxchar = Py_MAX(maxchar, format->fill_char); |
|
Date |
User |
Action |
Args |
2012-01-03 22:59:53 | vstinner | set | recipients:
+ vstinner, loewis, mark.dickinson, eric.smith, benjamin.peterson, ezio.melotti, skrah |
2012-01-03 22:59:53 | vstinner | set | messageid: <1325631593.36.0.0505643403688.issue13706@psf.upfronthosting.co.za> |
2012-01-03 22:59:52 | vstinner | link | issue13706 messages |
2012-01-03 22:59:52 | vstinner | create | |
|