4 ms·
The big problem I've had with Python and bit shifting has just been dealing with negative numbers. Python doesn't have a concept of unsigned ints, or even just
by chocolatebunny 10y ago
The big problem I've had with Python and bit shifting has just been dealing with negative numbers. Python doesn't have a concept of unsigned ints, or even just 32bit numbers so I end up having to mask everything by 0xFFFFFFFF. Not really a big deal but maybe that's the issue you were running into?
- r_smart 10y agoThat sounds like it might have been the case. I probably got annoyed and just did it a different way. I'm not really sure though. It's one of those things where it happened awhile ago and made an impression on me, but the details have long since faded, leaving only my opinion :)