[Python-checkins] r72968 - in python/branches/py3k: Lib/pydoc.py Lib/test/test_pydoc.py Misc/NEWS
r.david.murray
python-checkins at python.org
Wed May 27 22:57:00 CEST 2009
Author: r.david.murray
Date: Wed May 27 22:56:59 2009
New Revision: 72968
Log:
Merged revisions 72966 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72966 | r.david.murray | 2009-05-27 16:07:21 -0400 (Wed, 27 May 2009) | 4 lines
fix issue #6121 by stripping spaces from the argument in the 'help'
function.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/pydoc.py
python/branches/py3k/Lib/test/test_pydoc.py
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Lib/pydoc.py
==============================================================================
--- python/branches/py3k/Lib/pydoc.py (original)
+++ python/branches/py3k/Lib/pydoc.py Wed May 27 22:56:59 2009
@@ -1740,6 +1740,7 @@
def help(self, request):
if type(request) is type(''):
+ request = request.strip()
if request == 'help': self.intro()
elif request == 'keywords': self.listkeywords()
elif request == 'symbols': self.listsymbols()
Modified: python/branches/py3k/Lib/test/test_pydoc.py
==============================================================================
--- python/branches/py3k/Lib/test/test_pydoc.py (original)
+++ python/branches/py3k/Lib/test/test_pydoc.py Wed May 27 22:56:59 2009
@@ -254,6 +254,12 @@
self.assertEqual(expected, result,
"documentation for missing module found")
+ def test_input_strip(self):
+ missing_module = " test.i_am_not_here "
+ result = str(run_pydoc(missing_module), 'ascii')
+ expected = missing_pattern % missing_module.strip()
+ self.assertEqual(expected, result)
+
class TestDescriptions(unittest.TestCase):
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Wed May 27 22:56:59 2009
@@ -34,6 +34,9 @@
Library
-------
+- Issue #6121: pydoc now ignores leading and trailing spaces in the
+ argument to the 'help' function.
+
- Issue #6118: urllib.parse.quote_plus ignored the encoding and errors
arguments for strings with a space in them.
More information about the Python-checkins
mailing list