[Python-Dev] Triple-quoted strings and indentation (original) (raw)
Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Sun Jul 10 14:25:58 CEST 2005
- Previous message: [Python-Dev] Triple-quoted strings and indentation
- Next message: [Python-Dev] Triple-quoted strings and indentation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum wrote:
On 7/5/05, Andrew Durdin <adurdin at gmail.com> wrote:
I have written a patch that changes the way triple-quoted strings are scanned so that leading whitespace is ignored in much the same way that pep 257 handles it for docstrings. Largely this was for a learning experience in hacking the parser, but it would be very nice IMO if something of this sort could be implemented in a future version of Python. I don't think so. It smells too much of DWIM, which is very unpythonic. EIBTI.
Another idea, which is much more conservative: textwrap.dedent is highly under- rated and hidden. Why not make it builtin or a string method?
Reinhold
-- Mail address is perfectly valid!
- Previous message: [Python-Dev] Triple-quoted strings and indentation
- Next message: [Python-Dev] Triple-quoted strings and indentation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]