fredrik at pythonware.com
Mon Nov 14 21:01:00 CET 2005
Noam Raphael wrote:
> That's a theoretical argument. In practice, if you do it in the
> parser, you have two options:
> 1. Automatically dedent all strings.
> 2. Add a 'd' or some other letter before the string.
> Option 1 breaks backwards compatibility, and makes the parser do
> unexpected things. Option 2 adds another string-prefix letter, which
> is confusing, and it will also be hard to find out what that letter
> means. On the other hand, adding ".dedent()" at the end is very clear,
> and is just as easy.
so is putting the string constant in a global variable, outside the scope
you're in, like you'd do with any other constant.
(how about a new rule: you cannot post to a zombie thread on python-
dev unless they've fixed/reviewed/applied or otherwise processed at least
one tracker item earlier the same day. there are hundreds of items on the
bugs and patches trackers that could need some loving care)
More information about the Python-Dev