[Python-Dev] Triple-quoted strings and indentation (original) (raw)
Steven Bethard steven.bethard at gmail.com
Wed Jul 6 06:29:22 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 ]
On 7/5/05, Andrew Durdin <adurdin at gmail.com> wrote:
print """Usage: dostuff
Options: -c - blah blah -f - do stuff with file "filename" -s - more blah"""
Isn't the standard idiom for this already:
import textwrap
...
print textwrap.dedent("""
Usage: dostuff
Options:
-c - blah blah
-f <filename> - do stuff with file "filename"
-s - more blah""")
STeVe
You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy
- 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 ]