[Python-3000] Octal (original) (raw)

Patrick Maupin pmaupin at gmail.com
Thu Mar 15 02:33:55 CET 2007


On 3/14/07, Jeff Bauer <jbauer at rubic.com> wrote:

I really didn't want to add to the traffic on this thread, but would like to keep leading zeros from raising a SyntaxError. If this passes, it will look as archaic in retrospect as the original decision to use '/' for integer division. And I'll have to wait until 2017 for this to get rescinded in Python 4000. ;-)

The coders who use octal (including myself) can adapt. There's not a lot of ambiguity when int('042') evaluates to 42.

  1. int('042') will keep evaluating to 42 (it does that right now)

  2. x = 042 will raise a SyntaxError

  3. If this is a huge mistake, we can easily fix it before 2017. It is much easier to stop raising SyntaxErrors if we are sure that it is not going to confuse anybody, than it would be to start raising them if we decided to make x = 042 bind 'x' to the decimal value '42'. In other words, I view this as a two step process. First, stop accepting 042 as an octal number. Next, if we revisit this and there is consensus, we could start accepting 042 as a decimal number. I know this is the most important issue for some people, but as the Romans used to say, let's "make haste slowly."

Regards, Pat



More information about the Python-3000 mailing list