[Python-Dev] Octal literals

James Y Knight foom at fuhm.net
Fri Feb 3 02:39:01 CET 2006


On Feb 2, 2006, at 10:36 PM, Bengt Richter wrote:
> So long as we have a distinction between int and long, IWT int will  
> be fixed width
> for any given implementation, and for interfacing with foreign  
> functions it will
> continue to be useful at times to limit the type of arguments being  
> passed.

We _don't_ have a distinction in any meaningful way, anymore. ints  
and longs are almost always treated exactly the same, other than the  
"L" suffix. I expect that suffix will soon go away as well. If there  
is code that _doesn't_ treat them the same, there is the bug. We  
don't need strange new syntax to work around buggy code.

Note that 10**14/10**13 is also a long, yet any interface that did  
not accept that as an argument but did accept "10" is simply buggy.  
Same goes for code that says it takes a 32-bit bitfield argument but  
won't accept 0x80000000.

James


More information about the Python-Dev mailing list