[issue11793] raw strings

2011-04-07 Thread R. David Murray
R. David Murray added the comment: To a pythonista, the perl behavior is counter-intuitive :) That said, the behavior of r'\' *is* somewhat counter-intuitive. See issue 1271 for a fairly thorough exploration of why it is the way it is. -- nosy: +r.david.murray __

[issue11793] raw strings

2011-04-07 Thread chaos
chaos <846909...@qq.com> added the comment: Sorry for my poor english and thank you for the answer. Since I'm a perler, I think this is counterintuitive. (In perl: print '\'; #print \ print '\''; #error print "\""; #print " print "\"; #error ) -- __

[issue11793] raw strings

2011-04-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is by design and documented: http://docs.python.org/reference/lexical_analysis.html """ String quotes can be escaped with a backslash, but the backslash remains in the string; for example, r"\"" is a valid string literal consisting of two character

[issue11793] raw strings

2011-04-07 Thread chaos
chaos <846909...@qq.com> added the comment: I think it should be >>> print(r'\') \ >>> print(r'\'') SyntaxError: EOL while scanning string literal >>> -- ___ Python tracker ___

[issue11793] raw strings

2011-04-07 Thread chaos
New submission from chaos <846909...@qq.com>: >>> print(r'\') SyntaxError: EOL while scanning string literal >>> print(r'\'') \' >>> -- messages: 133199 nosy: chaos priority: normal severity: normal status: open title: raw strings type: compile error versions: Python 3.2