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
Changes by Julian Berman julian+python@grayvines.com:
--
nosy: +Julian
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
stage: test needed - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
nosy: +tshepang
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
Python-bugs-list
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)
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
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
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
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.
--
É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
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
Python-bugs-list
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.
Changes by SpaghettiToastBook spaghettitoastb...@gmail.com:
--
nosy: +SpaghettiToastBook
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
15 matches
Mail list logo