This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年10月06日 13:14 by Weihong Guan, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Screen Shot 2016年10月06日 at 20.59.43.png | Weihong Guan, 2016年10月06日 13:14 | |||
| Messages (3) | |||
|---|---|---|---|
| msg278192 - (view) | Author: Weihong Guan (Weihong Guan) | Date: 2016年10月06日 13:14 | |
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. |
|||
| msg278195 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月06日 14:40 | |
Maybe this is a duplicate of issue22012. |
|||
| msg278236 - (view) | Author: Meador Inge (meador.inge) * (Python committer) | Date: 2016年10月07日 12:21 | |
Looks like a dup to me. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:37 | admin | set | github: 72563 |
| 2016年10月07日 17:12:39 | berker.peksag | set | status: open -> closed superseder: struct.unpack('?', '\x02') returns (False,) on Mac OSX resolution: duplicate stage: resolved |
| 2016年10月07日 12:21:59 | meador.inge | set | nosy:
+ meador.inge messages: + msg278236 |
| 2016年10月06日 14:40:34 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg278195 |
| 2016年10月06日 13:14:23 | Weihong Guan | create | |