[Python-3000] Draft PEP for Requiring Lowercase Literal Modifiers
Mike Klaas
mike.klaas at gmail.com
Tue Mar 20 02:47:36 CET 2007
> Semantic Changes
> ================
>
> The behavior of the 'int' builtin when passed a radix of 0 will be changed to
> follow the above grammar. This change is to maintain the specified behavior
> [5]_ that a radix of 0 mirrors the literal syntax. The behavior of this
> function will otherwise not be altered. In particular, the behavior of
> accepting the prefix '0X' when a radix of 16 is specified will be kept for
> backwards compatibility and easier parsing of data files.
And float()? Will this break?
In [9]: float('%E' % 3e-10)
Out[9]: 3e-10
Changes like this don't do much for me. Sure, lowercase modifiers are
prettier, but why remove the general functionality and leave in a few
special cases, especially when functionality to display numbers in
those formats exists?
numeric literals: -0
string literals: +0
-Mike
More information about the Python-3000
mailing list