[Python-3000] Octal
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Mar 15 00:39:10 CET 2007
Patrick Maupin wrote:
> how about:
>
> x = int("0x500")
I don't think that should be done by default. The
string passed to int often comes from user input,
and typical users aren't familiar with bases other
than 10, so it's more likely to be a typo if the
string contains non-digits.
Maybe there should be an option for it, though,
such as
x = int("0x500", anybase = True)
or perhaps a different function altogether.
--
Greg
More information about the Python-3000
mailing list