[Python-ideas] Idea for new multi-line triple quote literal
Antoine Pitrou
solipsis at pitrou.net
Mon Jul 1 12:21:17 CEST 2013
Le Mon, 1 Jul 2013 20:16:02 +1000,
Nick Coghlan <ncoghlan at gmail.com> a
écrit :
> On 1 Jul 2013 20:01, "Serhiy Storchaka"
> <storchaka at gmail.com> wrote:
> >
> > 01.07.13 04:47, Nick Coghlan написав(ла):
> >
> >> 4. I dedent and indent long strings more often than I capitalize,
> >> center, tab expand, or perform various other operations which
> >> already grace the str type as methods.
> >
> >
> > The str type already has many rarely used methods, so let's add a
> > couple
> more. It doesn't look good argument.
>
> I almost left that point out, as I kinda feel the same way. OTOH, I
> want indent pretty much every time I write a script that invokes
> other command line tools, and I'm serious about the possibility of
> having the compiler implicitly dedent docstrings once the method
> support exists to make it practical.
I think dedent() is quite useful too. OTOH, I don't think there's much
point in indent() as a str method (except for consistency). Also,
indent() may want more options and knobs than dedent() has, and
therefore would be better implemented in pure Python.
Regards
Antoine.
More information about the Python-ideas
mailing list