Octal number problem
Carlos Ribeiro
cribeiro at mail.inet.com.br
Wed Feb 19 21:42:51 EST 2003
On Wednesday 19 February 2003 23:34, Chad Netzer wrote:
> yes; eval("010") == 8
>
> however,
>
> int("010") = 10
I may be mistaken (and someone probably will be more than happy to tell me
why), but this inconsistence alone seems like a good reason to deprecate
octals (if only in Python 3000!). It really makes no sense to have
eval("010") != int("010").
Carlos Ribeiro
cribeiro at mail.inet.com.br
More information about the Python-list
mailing list