unsigned integer?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sat Mar 10 18:59:01 EST 2007


En Sat, 10 Mar 2007 20:26:13 -0300, Paul Rubin  
<"http://phr.cx"@NOSPAM.invalid> escribió:

> "Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> writes:
>> Try again with "%u". Passing i or ui makes no difference, both push
>> the  same value on the stack. C relies on the format string to
>> interpret the  arguments.
>
> If you use %u you get a very large positive value, not +3.

Exactly, and that's the right value. (unsigned int)(-3) isn't +3.

-- 
Gabriel Genellina




More information about the Python-list mailing list