Annoying octal notation

Ethan Furman ethan at
Thu Aug 27 19:31:04 CEST 2009

Steven D'Aprano wrote:
> A mistake is still a mistake even if it shared with others.
> Treating its with a lead zero as octal was a design error when it was 
> first thought up 


I have to disagree with you on this one.  The computing world was vastly 
different when that design decision was made.  Space was at a premium, 
programmers were not touch-typists, every character had to count, and 
why in the world would somebody who had to use papertape or punch cards 
add a lead zero without a *real* good reason?  I submit that that real 
good reason was to specify an octal literal, and not a decimal literal.

Now many many years have passed, much has changed, and a leading zero 
(like so much else) no longer makes the sense in once did -- especially 
in a very wide-spread and general purpose language like Python.  That 
does not mean it was not a very good decision at the time.


More information about the Python-list mailing list