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.

Author mark.dickinson
Recipients corona10, mark.dickinson, meador.inge, sobolevn, steven.daprano, terry.reedy
Date 2021-09-07.12:25:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631017515.02.0.918227162384.issue45034@roundup.psfhosted.org>
In-reply-to
Content
The out-of-range error messages for unsigned short and short have been fixed, thanks to Nikita Sobolev. They resulted from a rather odd use of the Py_STRINGIFY macro, which meant that not only were the messages obscure, but they differed from system to system: e.g., on my machine I get: "struct.error: ushort format requires 0 <= number <= (32767 *2 +1)", and "struct.error: short format requires (-32767 -1) <= number <= 32767", complete with the weird spacing.

There's still room for normalising the other messages and/or converting the limits to hex if anyone wants to provide a PR.

I'm unsure about using hex universally: while `0xffffffffffffffff` (or even better, `0xffff_ffff_ffff_ffff`) is definitely more useful than `18446744073709551615`, I think I'd still find `-128` more immediately readable than `-0x80`.
History
Date User Action Args
2021-09-07 12:25:15mark.dickinsonsetrecipients: + mark.dickinson, terry.reedy, steven.daprano, meador.inge, corona10, sobolevn
2021-09-07 12:25:15mark.dickinsonsetmessageid: <1631017515.02.0.918227162384.issue45034@roundup.psfhosted.org>
2021-09-07 12:25:15mark.dickinsonlinkissue45034 messages
2021-09-07 12:25:14mark.dickinsoncreate