[Doc-SIG] backslashing

Goodger, David dgoodger@atsautomation.com
Mon, 16 Apr 2001 18:41:41 -0400


[Edward D. Loper]
> >> If you used E<lt> and E<gt> or E{lb} and E{rb} or 
> something like that,
> >> then regexps would generally look how they're supposed to (at least
> >> when you print them).
> > 
> > So would *any other* convention -- when you print them. The point
> > is, what do they look like when you read them?
> 
> Not when you print them with "print foo.__doc__"; only when you use
> some tool to interpret them and print them..

Not following you. This argues in favour of plaintext-transparent markup
like backquotes, not E<lt> etc. Perhaps some examples of what you mean?

> Once you introduce "\" as an escape character, though, all sorts of
> "\"s now need to be escaped..  And I don't really like the convention
> of keeping "\"s if they appear before something that doesn't require
> escaping.. It taxes my brain too much.

Please show (with examples requiring internal escaping) the alternatives.

> I guess I'm trying to go on the principle of keeping the need to
> escape characters to a minimum, because whatever escaping mechanism we
> have, it'll be somewhat ugly/difficult to read.

I think that's inevitable. Please prove me wrong!

However, although I'm sure an escape mechanism is needed, I'm also sure it
will only rarely be needed.

/DG