4.1. Coherent radix selection

Integer literals may use the prefixes 0b and 0B for binary radix, 0o and 0O for octal radix, 0d and 0D for decimal radix, as well as 0x and 0X for hexadecimal radix.

Viper does not process integer literals with leading zeros as octal, instead, they're considered decimal. In python mode, they're processed as octal for compatibility. In both cases a suppressable warning is issued. (Just don't do it :-) If you find octal in any python sources, replace it with hex and send Guido a patch.

There's no way to suppress the warning at present.

Examples:

  0b11111111 0B11111111
  0o777      0O777
  0d999      0D999
  0xfFf      0xFFf
  0777 # OCTAL in python mode: WARNING generated
  0777 # DECIMAL in viper mode: WARNING generated