Cheap Chanel Watches for sale at: http://www.luxuryowner.net/
Chanel Watches collection: http://www.luxuryowner.net/replica-chanel-watches.html Chanel J12 Automatic Watches: http://www.luxuryowner.net/Chanel-J12-Automatic-Watches.html Chanel J12 Quartz Watches: http://www.luxuryowner.net/Chanel-J12-Quartz-Watches.html "MRAB" <pyt...@mrabarnett.plus.com> ??????:mailman.117.1273689672.32709.python-l...@python.org... > robert somerville wrote: >> I am trying to determine how to test whether variors bits are set within >> a byte (or larger flag) , the python 'and' and 'or' do not seem to be >> doing what i want .. does anybody have some sample code showing how to do >> it ?? >> >> e.g. (in "C") >> >> unsigned char a = 6; >> >> is 3rd bit set ?? >> >> a & 4 =, true in this case .... >> > 'and', 'or' and 'not' are Boolean. > > Python borrows its bitwise operators from C: > > & bitwise and > | bitwise or > ^ bitwise xor > ~ bitwise not (ones' complement) > << shift left > >> shift right > > You also need to remember that Python's integers are of (virtually) > unlimited length. -- http://mail.python.org/mailman/listinfo/python-list