Python Gotcha with Octal Numbers

Grant Edwards grante at visi.com
Fri Feb 22 11:54:24 EST 2002


In article <Nktd8.1458$N7.276578 at ruti.visi.com>, Grant Edwards wrote:
> In article <Xns91B6DFD6A36CDRASXnewsDFE1 at 130.133.1.4>, Philip Swartzleonard wrote:
> 
>>> Personally, I would like to see octal number entry migrated from 0---
>>> to something like 0o---.  This would bring things more in line with
>>> the entry of hex numbers (0x---)
>>> 
>>> I know it's only a minor thing, but it'd be nice if my numbers behaved
>>> as I expected...
>> 
>> Steve has mentioned that UNIX people are used to it... 
> 
> I'm a Unix person, I'm used to it, and I still think it sucks.
> 
>> i think it's a little deeper than that, b'cause as far as i
>> know, _every_ programming language that has ever supported
>> octal does it this way...
> 
> And I still think it sucks.  :)

I just got bit by the leading-zero thing again about 10 minutes
ago when I changed the minor version number of something from 07
to 08.  Had to skip from 1.07 to 1.10...

-- 
Grant Edwards                   grante             Yow!  With this weapon
                                  at               I can expose fictional
                               visi.com            characters and bring about
                                                   sweeping reforms!!



More information about the Python-list mailing list