Getting at the bits of a 32-bit integer
Jacob H
jacobsmail at postmark.net
Tue Aug 24 14:03:16 EDT 2004
Peter Hansen <peter at engcorp.com> wrote in message news:<L8SdnepkCsRDV7fcRVn-vA at powergate.ca>...
> 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
The truth is that I have zero need to fiddle with individual bits. I
just wanted to know how it was done.
And now I do know!
Jacob
More information about the Python-list
mailing list