<div dir="ltr">Hey David,<div><br></div><div>hm, that's actually a nice way to solve this too I guess, besides the additional import and "string literal".</div><div><br></div><div>but as I answered to robert before (did it wrong with who to answer, correct it just now so the mailing-list has the answer, too) was, that I don't have a string literal in mind for this.</div><div><br></div><div>Like I don't see a reason why this couldn't be the default thing for all string literals?</div><div><br></div><div>again, the Idea is just to use the closing quotes to determine the indentation length ...</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-31 18:51 GMT+02:00 David Mertz <span dir="ltr"><<a href="mailto:mertz@gnosis.cx" target="_blank">mertz@gnosis.cx</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>I can currently write:</div><div dir="auto"><br></div><div dir="auto">from textwrap import dedent as d</div><div dir="auto"><div dir="auto" style="font-family:sans-serif">print(d("""</div><span class=""><div dir="auto" style="font-family:sans-serif"> I am </div><div dir="auto" style="font-family:sans-serif"> A Line</div><div dir="auto" style="font-family:sans-serif">"""))</div><div dir="auto" style="font-family:sans-serif"><br></div></span><div dir="auto" style="font-family:sans-serif">It doesn't feel like these hypothetical d-strings are with new syntax.</div><div><div class="h5"><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Sat, Mar 31, 2018, 11:49 AM Robert Vanden Eynde <<a href="mailto:robertve92@gmail.com" target="_blank">robertve92@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>So yes, currently you just do :</div><div dir="auto"><br></div><div dir="auto">import textwrap</div><div dir="auto"><br></div><div dir="auto">print(textwrap.dedent("""</div><div dir="auto"> I am </div><div dir="auto"> A Line</div><div dir="auto">"""))</div><div dir="auto"><br></div><div dir="auto">So you'd want a string litteral ?</div><div dir="auto"><br></div><div dir="auto"><div dir="auto" style="font-family:sans-serif">print(d"""</div><div dir="auto" style="font-family:sans-serif"> I am </div><div dir="auto" style="font-family:sans-serif"> A Line</div><div dir="auto" style="font-family:sans-serif">""")</div><br><div class="gmail_quote" dir="auto"><div dir="ltr">Le sam. 31 mars 2018 à 17:06, Ryan Gonzalez <<a href="mailto:rymg19@gmail.com" rel="noreferrer" target="_blank">rymg19@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="font-family:Arial,Myriad,'Liberation Sans',sans-serif;font-size:12pt">
<div dir="auto">I have to admit, regardless of how practical this is, it would surely get rid of a ton of textwrap.dedent calls all over the place...</div><div dir="auto"><br></div>
<div id="m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-original" style="font-family:sans-serif;font-size:12pt;color:black">
<div class="m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-original-body">
<div style="color:black">
<p style="color:black;font-size:10pt;font-family:Arial,sans-serif;margin:8pt 0">On March 31, 2018 9:50:43 AM Marius Räsener <<a href="mailto:m.raesener@gmail.com" rel="noreferrer noreferrer" target="_blank">m.raesener@gmail.com</a>> wrote:</p>
<blockquote type="cite" class="gmail_quote" style="margin:0 0 0 0.75ex;border-left:1px solid #808080;padding-left:0.75ex">
<div dir="ltr">Hey List,<div><br></div><div>this is my very first approach to suggest a Python improvement I'd think worth discussing.</div><div><br></div><div>At some point, maybe with Dart 2.0 or a little earlier, Dart is now supporting multiline strings with "proper" identation (tried, but I can't find the according docs at the moment. probably due to the rather large changes related to dart 2.0 and outdated docs.)</div><div><br></div><div>What I have in mind is probably best described with an Example:</div><div><br></div><div>print("""</div><div> I am a</div><div> multiline</div><div> String.</div><div> """)</div><div><br></div><div>the closing quote defines the "margin indentation" - so in this example all lines would get reduces by their leading 4 spaces, resulting in a "clean" and unintended string.</div><div><br></div><div>anyways, if dart or not, doesn't matter - I like the Idea and I think python3.x could benefit from it. If that's possible at all :)</div><div><br></div><div>I could also imagine that this "indentation cleanup" only is applied if the last quotes are on their own line? Might be too complicated though, I can't estimated or understand this...</div><div><br></div><div>thx for reading,</div><div>Marius</div><div><br></div></div>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a class="m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-autolink m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-autowrap" href="mailto:Python-ideas%40python.org" rel="noreferrer noreferrer" target="_blank">Python-ideas@python.org</a><br>
<a class="m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-autolink m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-autowrap" href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a class="m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-autolink m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-autowrap" href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
<br>
</blockquote>
</div>
</div>
</div><div dir="auto"><br></div>
<div id="m_7234460319472805859m_-1330721433698983786m_-8727507100914765042aqm-signature" style="font-size:12pt;color:black"><div dir="auto">--</div><div dir="auto">Ryan (ライアン)</div><div dir="auto">Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else</div><div dir="auto"><a href="https://refi64.com/" rel="noreferrer noreferrer" target="_blank">https://refi64.com/</a></div></div><div dir="auto"><br></div></div>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" rel="noreferrer noreferrer" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</blockquote></div></div></div>
______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" rel="noreferrer" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
</blockquote></div></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/<wbr>codeofconduct/</a><br>
<br></blockquote></div><br></div>