[Python-3000] Fwd: Re: Fwd: Re: Fwd: Re: Octal
monpublic at gmail.com
Sat Mar 17 03:47:22 CET 2007
Oops, posted from the wrong email address (sorry Georg):
To switch this into a positive idea from a negative one, I am
-1 on using 't'
-.5 on having octal literals at all, since int('0755',8) does the job nicely
+1 on 'o' if we must have them in the language, since the first letter of
the radix name is easier to grok than an obscure third letter that doesn't
even have the pronunciation excuse that 'x' carries in English.
On 3/16/07, CM <monpublic at gmail.com> wrote:
> On 3/15/07, Georg Brandl <g.brandl at gmx.net> wrote:
> > Thomas Wouters schrieb:
> > >
> > >
> > > On 3/15/07, *Raymond Hettinger* <python at rcn.com <mailto:python at rcn.com
> > >>
> > > wrote:
> > >
> > > My worry focuses on new-timers and SyntaxErrors. The worst part of
> > > the new user experience is encountering a SyntaxError.
> > >
> > >
> > > Please. I already said it would be a SyntaxError *with explanation*.
> > > It's pretty easy to make a syntax error that goes "Did you mean 0t6065
> > > or 6065?". This would not be a syntax error handled by the parser, the
> > > tokenizer really doesn't care about leading 0's and ast.c's
> > parsenumber
> > > (which would be the spot to raise it) has all the necessary
> > information.
> > Until now, I skipped the octal thread. Now I read this and wondered,
> > "what the
> > hell is 0t6065 supposed to mean" and only from the context I gathered
> > that it
> > would be an octal literal...
> > Seriously, nobody, even coming from another language, will be able to
> > look at it
> > and say, "yes, that's an octal literal."
> I agree wholeheartedly with this. The argument that 'x' is the third
> character of 'hexadecimal', so 't' would have some kind of nice symmetry
> doesn't hold. One of the reasons that 'x' is such a nice label to remember
> is that its *pronunciation* (at least in English) matches that of the word
> 'hex'. The letter 't' has no real resemblance to the word 'octal', except
> that it happens to be a letter in the word.
> Then again, we all had to learn that '0x' meant 'hex' once, so maybe 't'
> isn't that big of a stretch. I do think that addressing the pronunciation
> would be a good idea, though. I wonder if the '0' prefix was meant to be
> pronounced "aught" in the beginning....
> - C
> > _______________________________________________
> > Python-3000 mailing list
> > Python-3000 at python.org
> > http://mail.python.org/mailman/listinfo/python-3000
> > Unsubscribe:
> > http://mail.python.org/mailman/options/python-3000/monpublic%40gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-3000