[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

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

2013-08-15 Thread Julian Berman
Changes by Julian Berman julian+python@grayvines.com: -- nosy: +Julian ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___ ___

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

2013-08-15 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___ ___

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

2013-08-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___ ___

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

2013-07-05 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___ ___

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

2013-07-01 Thread Chris Rebert
Changes by Chris Rebert pyb...@rebertia.com: -- nosy: +cvrebert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___ ___ Python-bugs-list

[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 dis dis.dis(f)

[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 rep...@bugs.python.org

[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 rep...@bugs.python.org

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

2013-07-01 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___ ___ Python-bugs-list mailing

[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 É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 rep...@bugs.python.org

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

2013-07-01 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___ ___ Python-bugs-list

[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.

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

2013-06-30 Thread SpaghettiToastBook
Changes by SpaghettiToastBook spaghettitoastb...@gmail.com: -- nosy: +SpaghettiToastBook ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18335 ___