Message346324
It is a *syntax* error. You have written bad syntax, just as the error message says. Your \xXX code is too short, only 1 hex digit instead of 2. I disagree that this should be a value error: it isn't a bad value, it is bad syntax.
I don't know what the context of the BDFL pronouncement in PEP 223 was, but I think it was decided later that Guido wrong because the error in Python 2.4 and 2.5 was UnicodeDecodeError and then changed to SyntaxError in 2.6 (probably to match Python 3, I guess).
In Python 3, both unicode and bytes strings give a syntax error for this error. |
|
Date |
User |
Action |
Args |
2019-06-23 14:03:05 | steven.daprano | set | recipients:
+ steven.daprano, shihai1991 |
2019-06-23 14:03:05 | steven.daprano | set | messageid: <1561298585.48.0.287091579652.issue37377@roundup.psfhosted.org> |
2019-06-23 14:03:05 | steven.daprano | link | issue37377 messages |
2019-06-23 14:03:05 | steven.daprano | create | |
|