diff options
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 3b3f1bd959..f8fafa34e9 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -986,8 +986,7 @@ class TextDoc(Doc): def indent(self, text, prefix=' '): """Indent text by prepending a given prefix to each line.""" if not text: return '' - lines = text.split('\n') - lines = map(lambda line, prefix=prefix: prefix + line, lines) + lines = [prefix + line for line in text.split('\n')] if lines: lines[-1] = lines[-1].rstrip() return '\n'.join(lines) |