[Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes? (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Tue Feb 24 10:21:41 CET 2015
- Previous message: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?
- Next message: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 24.02.15 11:09, Nick Coghlan wrote:
Oh, I like that idea, especially the variant that includes a search friendly phrase like "embedded escapes" in the error message. And unlike changing the handling of string literals generally, the impact would be isolated to a few exception repr implementations.
It can require changing code in tens of places like
PyErr_Format(FooError, "File %R is not valid FOO", filename)
or
raise FooError("File %r is not valid FOO" % (filename,))
.
And of course 'c:\test.txt' is valid name on Unix.
- Previous message: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?
- Next message: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]