[Python-3000] More PEP 3101 changes incoming
Ron Adam
rrr at ronadam.com
Fri Aug 3 23:18:55 CEST 2007
Guido van Rossum wrote:
> I have no time for a complete response, but a few quickies:
>
> - The more I think about it the, more I think putting knowledge of
> floating point formatting into the wrapper is wrong. I really think we
> should put this into float.__format__ (and int.__format__, and
> Decimal.__format__). I can't find a reason why you don't want this;
> perhaps it is an axiom? I think it needs to be challenged.
I agree.
> - The relative priorities of colon and comma vary by context; e.g. in
> a[i:j, m:n] the colon binds tighter.
>
> - Interpreting X.Y as min.max, while conventional in C, is hard to remember.
>
> - If we're going to deviate from .NET, we should deviate strongly, and
> I propose using semicolon as delimiter.
So ...
'{0:10.20,f.2}'
would become...
'{0:10;20,f.2}'
Works for me.
I think this would be better because then decimal places would be
recognizable right off because they *would* have a decimal before them.
And nothing else would. And min;max would be recognizable right off
because of the semicolon.
And I can't think of anything that would be unique and work better.
Cheers,
Ron
More information about the Python-3000
mailing list