Message278192
According to the doc:
For the '?' format character, the return value is either True or False. When packing, the truth value of the argument object is used. Either 0 or 1 in the native or standard bool representation will be packed, and any non-zero value will be True when unpacking.
But it behaves more like & 1 operation. so False for even value, and True for odd value.
unpack fmt '?H' should reqiure buff of length 3, same as 'H?', not 4. |
|
Date |
User |
Action |
Args |
2016-10-06 13:14:23 | Weihong Guan | set | recipients:
+ Weihong Guan |
2016-10-06 13:14:23 | Weihong Guan | set | messageid: <1475759663.29.0.378814371853.issue28377@psf.upfronthosting.co.za> |
2016-10-06 13:14:23 | Weihong Guan | link | issue28377 messages |
2016-10-06 13:14:22 | Weihong Guan | create | |
|