From: Collin Winter Date: Tue, 17 Jul 2007 00:27:30 +0000 (+0000) Subject: Fix a bug from the map->itertools.imap conversion. X-Git-Tag: v3.0a1~629 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72e110c1cdf1ab187b0799cca788748484556028;p=thirdparty%2FPython%2Fcpython.git Fix a bug from the map->itertools.imap conversion. --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 3b3f1bd959da..f8fafa34e9a2 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)