[Doc-SIG] quoting

Edward D. Loper edloper@gradient.cis.upenn.edu
Fri, 16 Mar 2001 12:07:13 EST

> 1. The only special quoting circumstances are putting a single quote
> within '..' and a hash within #..#.
> 2. The only place that STpy supports use of an escape character is in
> those places.
> 3. '\'' shall mean the same as a literal string containing single quote.
> 4. #\## shall mean the same as a Python literal string containing a
> single hash.
> 5. Within either of those literal string contexts, that is the *only
> time* that backslash is special. Thus it is sufficient to write #\#\\##
> to get a Python literal string containing a hash, a backslash and a
> hash.
> 6. If this is too confusing, don't do it. If you do do it, use a net. Or
> a bouncy castle. And in any case, don't blame us.

I think we should add that '\\' is a single backslash and #\\# is too.
Otherwise, there's no way to end a literal with a backslash..

> (Of course, the *other* escape tradition is simple-doubling - which
> would give us #### to get a single hash. Which is *very* confusing, and
> I don't want to go near it with an RE.)

I agree that we shouldn't use that.