[Python-Dev] str.dedent

Sokolov Yura falcon at intercable.ru
Mon Nov 21 08:02:04 CET 2005


>>/     msg = textwrap.dedent('''\
>/>/         IDLE's subprocess can't connect to %s:%d.  This may be due \
>/>/         to your personal firewall configuration.  It is safe to \
>/>/         allow this internal connection because no data is visible on \
>/>/         external ports.''' % address)
>/>/
>/
>Unfortunately, it won't help, since the 'dedent' method won't treat
>those spaces as indentation.
>

So that it would be usefull to implicit parser dedent on string with 'd' prefix

/     msg = d'''\
//         IDLE's subprocess can't connect to %s:%d.  This may be due \
//         to your personal firewall configuration.  It is safe to \
//         allow this internal connection because no data is visible on \
//         external ports.''' % address/




More information about the Python-Dev mailing list