unsigned integer?

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Sat Mar 10 20:46:34 EST 2007


hg wrote:
> Dan Bishop wrote:

>> def unsigned(n):
>>     return n & 0xFFFFFFFF
> 
> or abs(-1) ?

Nah! Bitwise operators are cool. ;)

Though ANDing won't make the int unsigned.

Regards,


Björn

-- 
BOFH excuse #23:

improperly oriented keyboard




More information about the Python-list mailing list