[Python-Dev] str with base
Bob Ippolito
bob at redivi.com
Fri Jan 20 03:11:19 CET 2006
On Jan 19, 2006, at 4:17 PM, Thomas Wouters wrote:
> On Fri, Jan 20, 2006 at 06:56:23AM +1000, Nick Coghlan wrote:
>
>> I'm not aware of anyone that would miss octal literals,
>
> Except anyone who uses os.chmod. I would be mighty sad if we
> removed octal
> and hexadecimal literals for 'cleanliness' reasons alone.
I have a LOT of code that has hex literals, and a little code with
oct literals (as you say, just os.chmod). I'm -1 on removing hex and
oct, and +0 on adding binary.
As a point of reference, both Perl and Ruby support 0b110 binary
literal syntax
$ ruby -e 'print 0b110, "\n"'
6
$ perl -e 'print 0b110 . "\n"'
6
-bob
More information about the Python-Dev
mailing list