#25 Warn about octal literals.

open
nobody
None
5
2005-01-14
2005-01-14
Simon Brunning
No

It would be useful if PyChecker warned you when you
specify an octal literal and where the value would
differ from what you might expect if you didn't
*realise* that you were specifying an octal literal.

x = 04 # This doesn't need a warning: 04 == 4
#x = 09 # This doesn't need a warning: it will fail to
compile
x= 012 # This *does* need a warning: 012 == 10

Discussion

  • Logged In: YES
    user_id=559878

    Good one..