[Python-3000] More PEP 3101 changes incoming

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Aug 15 02:02:35 CEST 2007


Ron Adam wrote:
> 
> Greg Ewing wrote:
 >
> > How does this work with formats where the number of
> > digits before the decimal can vary, but before+after
> > is constant?
> 
> I think this is what you're looking for.
> 
>    f>15,.3   #15 field width, 3 decimal places, right aligned.

No, I'm talking about formats such as "g" where the
number of significant digits is fixed, but the position
of the decimal point can change depending on the magnitude
of the number. That wouldn't fit into your before.after
format.

>> Also, my feeling about the whole of this is that
>> it's too complicated.
>
> it's because we are doing a lot in a very little space.

Yes, and I think you're trying to do a bit too much.
The format strings are starting to look like line
noise.

--
Greg


More information about the Python-3000 mailing list