[Python-Dev] Unclear on the way forward with unsigned integers

Thomas Heller thomas.heller@ion-tof.com
Mon, 7 Oct 2002 12:07:11 +0200


> Except Python doesn't *have* unsigned ints, so the only faithful way to
> return one is to make a Python long.  In this specific case, though, I think
> it would be better to pick the bits apart *for* the user -- there's really
> no use for the raw int, signed or unsigned, except after picking it apart.
> 
> > Any suggestions or general advice?  While this case seems quite
> > trivial, I am starting to face this issue more and more, especially
> > as I am seeing these lovely "FutureWarnings" from all my lovely 32
> > bit hexadecimal constants <wink/frown>
> 
[Tim]
> Sticking "L" at the end is usually all it takes.

That removes the warnings for 'x = 0x80000000L'.
Is there a way (other than the -w command-line arg)
to suppress the warnings when doing 'hex(-1)'?
Shouldn't there be a __future__ option?

Thomas