[Patches] [ python-Patches-598163 ] textwrap.dedent, inspect.getdoc-ish

noreply@sourceforge.net noreply@sourceforge.net
Tue, 01 Oct 2002 23:39:28 -0700


Patches item #598163, was opened at 2002-08-21 12:39
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=598163&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Ville Vainio (vvainio)
Assigned to: Greg Ward (gward)
Summary: textwrap.dedent, inspect.getdoc-ish

Initial Comment:
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).



----------------------------------------------------------------------

>Comment By: Ville Vainio (vvainio)
Date: 2002-10-02 09:39

Message:
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...

----------------------------------------------------------------------

Comment By: Ville Vainio (vvainio)
Date: 2002-09-09 12:40

Message:
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.

----------------------------------------------------------------------

Comment By: Greg Ward (gward)
Date: 2002-09-04 16:43

Message:
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.)

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-09-03 21:57

Message:
Logged In: YES 
user_id=6380

For Greg Ward.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=598163&group_id=5470