[Python-3000-checkins] r56408 - python/branches/py3k-struni/Lib/pydoc.py

collin.winter python-3000-checkins at python.org
Tue Jul 17 02:27:30 CEST 2007


Author: collin.winter
Date: Tue Jul 17 02:27:30 2007
New Revision: 56408

Modified:
   python/branches/py3k-struni/Lib/pydoc.py
Log:
Fix a bug from the map->itertools.imap conversion.

Modified: python/branches/py3k-struni/Lib/pydoc.py
==============================================================================
--- python/branches/py3k-struni/Lib/pydoc.py	(original)
+++ python/branches/py3k-struni/Lib/pydoc.py	Tue Jul 17 02:27:30 2007
@@ -986,8 +986,7 @@
     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)
 


More information about the Python-3000-checkins mailing list