diff options
author | Collin Winter <collinw@gmail.com> | 2007-07-17 00:27:30 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-07-17 00:27:30 (GMT) |
commit | 72e110c1cdf1ab187b0799cca788748484556028 (patch) | |
tree | 21da6d99695f1942d369963eaf20cc7e2fc0f831 /Lib | |
parent | 2698631d57cc1c28078a7c77f2c419ec185aa3bf (diff) | |
download | cpython-72e110c1cdf1ab187b0799cca788748484556028.zip cpython-72e110c1cdf1ab187b0799cca788748484556028.tar.gz cpython-72e110c1cdf1ab187b0799cca788748484556028.tar.bz2 |
Fix a bug from the map->itertools.imap conversion.
Diffstat (limited to 'Lib')
-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 3b3f1bd..f8fafa3 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) |