김준환 <[email protected]> added the comment:
No, I know `textwrap.dedent` as a convenience function used for code
readability. But to have the result I want, I currently need to do something
like this:
If it's a method inside a class, it's even more ugly.
Class A:
def get_something_string():
return textwrap.dedent("""\
test text2
test text3
test text4""")
x = f"""\
test text1
{A.get_something_string()}
test text5
test text6"""
The duplicate use of dedent is to show an example.
Thought I needed a consistent dedent for every line while using the string
formatting feature.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46992>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com