[Python-ideas] Idea for new multi-line triple quote literal
Marco Buttu
mbuttu at oa-cagliari.inaf.it
Sat Jul 13 12:44:51 CEST 2013
On 07/13/2013 11:40 AM, Michael Foord wrote:
>
> I use Python since almost 7 years, and I discovered
> textwrap.dedent() right now, by following this thread.
> So in my case if yesterday I had seen there was a method
> str.dedent(), I should have looked at the
> documentation to know its meaning, but if I had seen
> str.unindent(), I shouldn't have looked at the doc at all,
> because the meaning appears to me very clear.
> Maybe this comes either from my poor English or from my lacks in
> Python (or both...), but maybe not, because
> looking for "unindent indentation" , "dedent indentation" or
> "deindent indentation" on Google, we can see people
> use the word "unindent" and not dedent or deindent.
>
> + 1 for unindent()
>
> http://en.wiktionary.org/wiki/unindent
>
>
> Interestingly dedent has an entry on wiktionary, with a note that its
> primary use is Python:
>
> http://en.wiktionary.org/wiki/dedent
>
> So whilst the meaning is obvious to native speakers, it can hardly be
> said to be a term in common usage. (The wiktionary entry suggests it
> is a synonym for "outdent".)
>
> Michael
And by the way, Python itself prefers to use unindent:
>>> def foo():
... """foo"""
... pass
File "<stdin>", line 3
pass
^
IndentationError: unindent does not match any outer indentation level
--
Marco Buttu
INAF Osservatorio Astronomico di Cagliari
Loc. Poggio dei Pini, Strada 54 - 09012 Capoterra (CA) - Italy
Phone: +39 070 71180255
Email: mbuttu at oa-cagliari.inaf.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130713/b9060fcd/attachment.html>
More information about the Python-ideas
mailing list