Author petr.viktorin
Recipients ammar2, benjamin.peterson, cstratak, gregory.p.smith, mark.dickinson, meador.inge, petr.viktorin, skrah, vstinner
Date 2020-03-12.10:30:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> So I vote for not handling incorrectly packed values and removing
"and any non-zero value will be True when unpacking" from the docs,
which does not seem to make any sense for _Bool.

I disagree. I don't think struct module's job is to be faithful to _Bool semantics.

Up to this point, "?" worked for bytes with "only 0 is false" semantics, in a reliable and documented way. I don't see a reason to let that continue.

You're right about trap representations, but IMO floats are much more tied to hardware (and serious users of float are aware of the pitfalls), while _Bool semantics are governed by the whims of the compiler.

Also, the "@" prefix is specifically documented to select native Byte order, Size, and Alignment; not how the bit-pattern is interpreted.
Date User Action Args
2020-03-12 10:30:20petr.viktorinsetrecipients: + petr.viktorin, gregory.p.smith, mark.dickinson, vstinner, benjamin.peterson, skrah, meador.inge, cstratak, ammar2
2020-03-12 10:30:20petr.viktorinsetmessageid: <>
2020-03-12 10:30:20petr.viktorinlinkissue39689 messages
2020-03-12 10:30:20petr.viktorincreate