[Python-3000] Fwd: Re: Fwd: Re: Octal (original) (raw)

Nicko van Someren nicko at nicko.org
Thu Mar 15 10:29:26 CET 2007


On 14 Mar 2007, at 23:08, Guido van Rossum wrote:

IOW, the only thing I'm unsure about is whether int('0012', 0) should return 10 or complain like eval('0012') would. Perhaps it's best to say that int('0012', 0) is a safer way to parse Python int literals, and that would make it an error.

The current documentation for the int() says "If radix is zero ...
the interpretation is the same as for integer literals." I very much
think that this should remain true.

Nicko


More information about the Python-3000 mailing list