[Python-ideas] Syntax for dedented strings

Dag Odenhall dag.odenhall at gmail.com
Fri Aug 19 14:50:33 CEST 2011


On Tue, 2011-08-16 at 22:33 +0100, Michael Foord wrote:
> How about *another* string prefix for dedented strings:
> 
> class Thing(object):
>     d"""
>     This text will be,
>     nicely dedented,
>     thank you very much.
>     """"

+1, I do the textwrap.dedent dance a lot in unit tests.




More information about the Python-ideas mailing list