Message401254
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`. |
|
Date |
User |
Action |
Args |
2021-09-07 12:25:15 | mark.dickinson | set | recipients:
+ mark.dickinson, terry.reedy, steven.daprano, meador.inge, corona10, sobolevn |
2021-09-07 12:25:15 | mark.dickinson | set | messageid: <1631017515.02.0.918227162384.issue45034@roundup.psfhosted.org> |
2021-09-07 12:25:15 | mark.dickinson | link | issue45034 messages |
2021-09-07 12:25:14 | mark.dickinson | create | |
|