[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

Mark Dickinson report at bugs.python.org
Sun Jul 20 10:32:06 CEST 2014


Mark Dickinson added the comment:

> In practice, I doubt that Python's going to meet such platforms in a hurry.

Hrm; looks like that's not a particularly safe assumption, especially with older compilers that might do a "typedef int _Bool".

>From http://msdn.microsoft.com/en-us/library/tf4dy80a.aspx:

"That means that for Visual C++ 4.2, a call of sizeof(bool) yields 4, while in Visual C++ 5.0 and later, the same call yields 1."

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22012>
_______________________________________


More information about the Python-bugs-list mailing list