[Python-3000] PEP 3101 update

Rudy Rudolph rudyrudolph at excite.com
Tue Jun 13 00:49:45 CEST 2006


Is it possible to support two additional string formatting
features without overly complicating the whole thing?
It would be nice to have align centered and align on decimal point.

Centered would add fill chars both before and after the value.
If an odd number of fill chars must be added, the extra char is
after the value.

Align on decimal is not necessary with 'f' formatting because you can
right align the fractional part and get the same effect. However, with
'g' formatting the number of digits after the point may vary and there
may not even be a decimal point. In this case, a column of numbers
should be aligned at the last digit of the integer part.

If these are desirable, we would need to choose suitable symbols for
align. Either '><' or '|' seems appropriate for centered.

Rudy

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!




More information about the Python-3000 mailing list