Octal Numbers in Code

I always thought putting a single zero in front of Octal numbers in code was pretty bad, or at least, pretty error-prone. But someone is doing something about it.

In this article, Python 3000 Status Update, Guido van Rossum is putting a new syntax in for Octal numbers and Binary numbers too (see 'Other Significant Changes' towards the bottom).

Not that I ever use them much, but I think it will help. In fact, I said to someone at least a few years ago that '0o....' should be used for Octal numbers :-)

Tags: pythoncode

Posted: 22 June 2007