Added docstring for 'wrap()' function.
This commit is contained in:
parent
9c0a99ec1a
commit
46a69b9c7f
|
@ -412,6 +412,11 @@ def fancy_getopt (options, negative_opt, object, args):
|
||||||
WS_TRANS = string.maketrans (string.whitespace, ' ' * len (string.whitespace))
|
WS_TRANS = string.maketrans (string.whitespace, ' ' * len (string.whitespace))
|
||||||
|
|
||||||
def wrap_text (text, width):
|
def wrap_text (text, width):
|
||||||
|
"""wrap_text(text : string, width : int) -> [string]
|
||||||
|
|
||||||
|
Split 'text' into multiple lines of no more than 'width' characters
|
||||||
|
each, and return the list of strings that results.
|
||||||
|
"""
|
||||||
|
|
||||||
if text is None:
|
if text is None:
|
||||||
return []
|
return []
|
||||||
|
|
Loading…
Reference in New Issue