[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-04-01 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. If you have a more concrete proposal, either re-open this or bring it up on python-ideas. -- resolution: -> rejected stage: -> resolved status: pending -> closed ___ Python tracker

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-27 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread 김준환
김준환 added the comment: x does not change. sorry. I also haven't figured out the implementation in my head yet. I want to provide some functionality to provide consistent indentation while using formatting . For example """ test {multi_line_text} """.format(multi_line_text,

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: I’m sorry, I don’t understand your proposal. Please answer my question about what “x” would be equal to under your proposed change. -- ___ Python tracker

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread 김준환
김준환 added the comment: Sorry, Can't edit comments Please see the code example below ``` Class A: def get_something_string(): return textwrap.dedent("""\ test text2 test text3 test text4""") textwrap.dedent(f"""\ test text1 {A.get_something_string()} test

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread 김준환
김준환 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

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: What would x be equal to here: def get_something_string(): return textwrap.dedent("""\ test text2 test text3 test text4""") x = f"""\ test text1 {get_something_string()} test text5 test text6""" ? With

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread 김준환
김준환 added the comment: "<<" This marks that line. ignore it -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: What would the presence of "<<" do? You haven't described your proposal. -- ___ Python tracker ___

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread 김준환
김준환 added the comment: If it's only for version 3.11, what do you think of the default behavior of the dedent method being changed? The method description says: > Remove any common leading whitespace from every line in `text`. ``` def get_something_string(): return textwrap.dedent("""\

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: What is the flag you mention? What would it do? This sounds like a new feature, which can only go in to 3.11. -- nosy: +eric.smith ___ Python tracker

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread 김준환
김준환 added the comment: Sorry, it's an indent , not an intent . -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46992] If use textwrap.dedent with string formatting, may get unintended sentences.

2022-03-11 Thread 김준환
New submission from 김준환 : If use textwrap.dedent with string formatting, may get unintended sentences. For example, a sentence like this: ``` import textwrap def get_something_string(): return textwrap.dedent("""\ test text2 test text3 test text4""")