A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-July/054650.html below:

[Python-Dev] Triple-quoted strings and indentation

[Python-Dev] Triple-quoted strings and indentation [Python-Dev] Triple-quoted strings and indentationSteven Bethard steven.bethard at gmail.com
Wed Jul 6 06:29:22 CEST 2005
On 7/5/05, Andrew Durdin <adurdin at gmail.com> wrote:
>         print """Usage: dostuff <options>
> 
> Options:
>   -c  - blah blah
>   -f <filename>  - do stuff with file "filename"
>   -s  - more blah"""

Isn't the standard idiom for this already:

import textwrap
...
    print textwrap.dedent("""\
        Usage: dostuff <options>

        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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4