Getting at the bits of a 32-bit integer

Peter Hansen peter at engcorp.com
Tue Aug 24 01:00:07 EDT 2004


Grant Edwards wrote:

>>If you're new to Python and you are twiddling bits, the odds
>>favor the new user falsely importing old paradigms from other
>>languages,
> 
> Probably so.

Especially as the OP didn't say he was trying to break apart
Ethernet headers, serial data streams, or suchlike.  He just
seems to want to grab a few bits for his own purposes, and
like Jeremy I doubt that the need is real (though also like
he I admit the possibility it could be!) and am quite curious
to hear from the OP again...

-Peter



More information about the Python-list mailing list