[Python-ideas] Make undefined escape sequences have SyntaxWarnings
Serhiy Storchaka
storchaka at gmail.com
Thu Oct 11 12:53:00 CEST 2012
On 11.10.12 13:31, Yuval Greenfield wrote:
> http://docs.python.org/release/3.3.0/reference/lexical_analysis.html#string-and-bytes-literals
>
> I'm not sure I understand what this line from the docs means:
>
> \newline Backslash and newline ignored
>
> I understand that row as either "\n" won't appear in the resulting
> string or that I should get "\\newline".
Newline is newline in source code.
>>> "a\
... b"
'ab'
Type <Quote><Key "a"><Backslash><Enter><Key "b"><Quote>. Result is "ab".
More information about the Python-ideas
mailing list