Help: C char bits operations to python converting

Fredrik Lundh effbot at telia.com
Wed Sep 27 22:32:57 CEST 2000


Tim Peters wrote:
> def SignExtend(char):
>     return char | -(char & 0x80)

now that was one short vacation...

</F>




More information about the Python-list mailing list