[Tim Peters] > >>> "\x123465" # \x12 -> \022, "3456" left alone > '\0223456' > >>> "\x65" > 'e' > >>> "\x1" > ValueError > >>> "\x\x" > ValueError > >>> [?!ng] > I'm quite certain that this should be a SyntaxError, not a > ValueError: > > >>> "\x1" > SyntaxError: two hex digits are required after \x > >>> "\x\x" > SyntaxError: two hex digits are required after \x > > Otherwise, +1. Sounds great. SyntaxError was my original pick too. Guido picked ValueError instead because the corresponding "not enough hex digits" error in Unicode strings for damaged \u1234 escapes raises UnicodeError today, which is a subclass of ValueError. I couldn't care less, and remain +1 either way. On the chance that the BDFL may have changed his mind, I've copied him on this msg, This is your one & only chance to prevail <wink>. just-so-long-as-it's-not-XEscapeError-ly y'rs - tim
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4