[Python-Dev] Go \x yourself (original) (raw)
M.-A. Lemburg mal@lemburg.com
Mon, 07 Aug 2000 11:15:08 +0200
- Previous message: [Python-Dev] Go \x yourself
- Next message: [Python-Dev] (s)re crashing in regrtest (was SRE 0.9.8 benchmarks)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Greg Ewing wrote:
BDFL: > No, problems with literal interpretations traditionally raise > "runtime" exceptions rather than syntax errors. E.g. What about using an exception that's a subclass of both ValueError and SyntaxError?
What would this buy you ?
Note that the contents of a literal string don't really have anything to do with syntax. The \x escape sequences are details of the codecs used for converting those literal strings to Python string objects.
Perhaps we need a CodecError which is subclass of ValueError and then make the UnicodeError a subclass of this CodecError ?!
-- Marc-Andre Lemburg
Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
- Previous message: [Python-Dev] Go \x yourself
- Next message: [Python-Dev] (s)re crashing in regrtest (was SRE 0.9.8 benchmarks)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]