Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38197
| From | Albert Hopkins <marduk@letterboxes.org> |
|---|---|
| References | <1931346778.15606854.1360074752203.JavaMail.root@sequans.com> |
| Subject | Re: Best Practice Question |
| Date | 2013-02-05 09:50 -0500 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1369.1360075809.2939.python-list@python.org> (permalink) |
[...] > By the way, did someone ever notice that r'\' fails ? I'm sure there's a > reason for that... (python 2.5) Anyone knows ? > > r'\' > SyntaxError: EOL while scanning single-quoted string > > "Even in a raw string, 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 characters: a backslash and a double quote; r"\" is not a valid string literal (even a raw string cannot end in an odd number of backslashes). Specifically, a raw string cannot end in a single backslash (since the backslash would escape the following quote character). " -- python docs
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Best Practice Question Albert Hopkins <marduk@letterboxes.org> - 2013-02-05 09:50 -0500
csiph-web