Indented multi-line strings
Mikhail V
mikhailwas at gmail.com
Wed May 23 14:36:38 EDT 2018
On Wed, May 23, 2018 at 8:08 PM, Mikhail V <mikhailwas at gmail.com> wrote:
> On Wed, May 23, 2018 at 4:19 PM, Dan Strohl <D.Strohl at f5.com> wrote:
> data = /// sN # and
> data = /// tN
>
> Where N - is the amount of characters, spaces (s) or
> tabs (t).
> This should cover most use cases.
> It implies of course that the user should know himself
> what he is doing.
>
> More concrete example:
>
> def func():
> foobar
> data = /// s2
> first line
> last line
> foobar
>
> will store same data as:
> data = "first linelast line"
oops, I meant it to be:
data = "first line\nlast line"
sorry for possible confusion
>
> (assuming of course no trailing spaces were
> in original lines)
More information about the Python-list
mailing list