Issue 598163: textwrap.dedent, inspect.getdoc-ish - Python tracker (original) (raw)

Created on 2002-08-21 09:39 by vvainio, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
dedent.diff vvainio,2002-08-21 09:39 context diff, contains one new function (dedent)
docpatch.diff vvainio,2002-10-02 06:40 patch libtextwrap.tex
Messages (6)
msg40998 - (view) Author: Ville Vainio (vvainio) Date: 2002-08-21 09:39
Ability to remove indentation from multiline strings (often triple-quoted). Differs from inspect.getdoc by not handling the first line in special manner (often a sensible approach for non-docstring multiline strings) - which should make this function more general (symmetric 'indent' also possible), and more fitting for the textwrap module. Implementation is for the most parts familiar from inspect.getdoc, though I used sring methods instead of the module 'string'. The module 'textwrap' and the function name 'dedent' were suggested on python-dev a while back (by MAL, IIRC).
msg40999 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-03 18:57
Logged In: YES user_id=6380 For Greg Ward.
msg41000 - (view) Author: Greg Ward (gward) (Python committer) Date: 2002-09-04 13:43
Logged In: YES user_id=14422 Looks fine to me. Can you provide a patch for Doc/lib/libtextwrap.tex as well? A patch to Lib/test/test_textwrap.py would be nice too, but I can take care of that if you prefer. (Any other diffs should just be uploaded to this patch report.)
msg41001 - (view) Author: Ville Vainio (vvainio) Date: 2002-09-09 09:40
Logged In: YES user_id=213488 Yes, I'll look into the patches for Doc and test - it just might take a short while (have to access anon cvs at work) - few weeks or so.
msg41002 - (view) Author: Ville Vainio (vvainio) Date: 2002-10-02 06:39
Logged In: YES user_id=213488 Ok, I've added a patch for libtextwrap.tex. You might want to take a look at it for errors, this was my first time writing latex - I just followed the style used elsewhere in the file. Writing the test case might be handled by you in a more time-efficient manner, though I can also take a look at it once I get that linux partition going on my new home machine...
msg41003 - (view) Author: Greg Ward (gward) (Python committer) Date: 2003-05-08 02:14
Logged In: YES user_id=14422 OK, patch accepted and checked in: rev 1.28 of Lib/textwrap.py rev 1.5 of Doc/lib/libtextwrap.tex Tested in rev 1.22 of Lib/test/test_textwrap.py.
History
Date User Action Args
2022-04-10 16:05:36 admin set github: 37069
2002-08-21 09:39:44 vvainio create