Help: C char bits operations to python converting

Fredrik Lundh effbot at telia.com
Wed Sep 27 16:32:57 EDT 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