in Lua 5.2+, there's this string escape that allows you to put
"whitespace" (in particular, including newlines) in a string literal, by
skipping them entirely. now, unlike lua's long strings, python *does*
have escapes in long strings. however, sometimes you have help text:
"switches to toml config format. the old 'repos' " #cont
"table is preserved as 'repos_old'"
and... well yeah you can see what I did to make it work. if I used a
long string here, I'd get a newline and a bunch of indentation in the
middle.
so I propose a \z string escape which lets me write the above as shown
below:
"""switches to toml config format. the old 'repos' \z
table is preserved as 'repos_old'"""
(side note to avoid unnecessary comments: this help text refers to
database tables and migrations. it's not about lua tables.)
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/UOLOQXYDJA7QCXUDM2YCU5MLARKVPYAS/
Code of Conduct: http://python.org/psf/codeofconduct/