[Doc-SIG] quoting

Tony J Ibbs (Tibs) tony@lsl.co.uk
Fri, 16 Mar 2001 16:57:42 -0000

Edward D. Loper wrote:
<<<case for why we need quoting in the context of '#' and #'# in STpy>>>

I think that probably *is* the case, exactly stated, with implications
and reasons why STpy is not the same as STNG. Thanks.

OK. I personally am not too happy with '\' for the escape, but I *would*
like a solution to this.

I hereby propose (unilaterally, us together) that we actually adopt the
following proposal:

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
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.

and see if it works implementation-wise (but I don't promise to have it
*working* in the alpha release).

(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.)

Hmm - must go.


Tony J Ibbs (Tibs)      http://www.tibsnjoan.co.uk/
"How fleeting are all human passions compared with the massive
continuity of ducks." - Dorothy L. Sayers, "Gaudy Night"
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)