[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-08-31 Thread Martin Panter
Martin Panter added the comment: If this goes ahead, would a bytes.dedent() method be also considered? I recently discovered that textwrap.dedent() does not work on bytes() in Python 3. I would have used it for the contents of an input file in a test case. For the record there’s an older issue

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-08-15 Thread Julian Berman
Changes by Julian Berman : -- nosy: +Julian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-05 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Éric Araujo
Éric Araujo added the comment: IMO it’s fine that docstrings continue to live as pure string literals, and documentation tools continue to follow PEP 257’s advice. -- nosy: +eric.araujo ___ Python tracker

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: .dedent() is a no-brainer. JFDI. +1 .indent() I guess makes sense for symmetry, although I've rarely used it. -0 As for docstrings, I can imagine other alternatives, so let's let someone interested in that go through the PEP process. -- _

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: str already have too many methods. Who uses str.swapcase() or str.zfill() now? I'm -0.5 for adding any new str methods. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Nick Coghlan
Nick Coghlan added the comment: I still think the methods are worth adding regardless - I just anticipate a request to allow method calls on docstrings to follow not long after ;) -- ___ Python tracker ___

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-07-01 Thread Nick Coghlan
Nick Coghlan added the comment: It turns out there's one slight wrinkle in this grand plan: it won't work for docstrings without some additional tweaking to allow for method calls in the docstring detection. >>> def f(): ... """example""".lower() ... >>> print(f.__doc__) None >>> import d

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-06-30 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-06-30 Thread SpaghettiToastBook
Changes by SpaghettiToastBook : -- nosy: +SpaghettiToastBook ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue18335] Add textwrap.dedent, .indent, as str methods.

2013-06-30 Thread Terry J. Reedy
New submission from Terry J. Reedy: To end proposals for new syntax to do what they do for triple-quoted strings. Nick Coghlan gave reasons as follows: run time cost small, can be optimized away, would be used more than some other string methods. http://mail.python.org/pipermail/python-ideas/2