[docs] Improve help('non-topic') response (issue 19980)
zachary.ware at gmail.com
zachary.ware at gmail.com
Tue Jun 3 19:12:56 CEST 2014
Other than fixing the test (see comment), this looks pretty good to me.
http://bugs.python.org/review/19980/diff/12043/Lib/test/test_pydoc.py
File Lib/test/test_pydoc.py (right):
http://bugs.python.org/review/19980/diff/12043/Lib/test/test_pydoc.py#newcode210
Lib/test/test_pydoc.py:210: 'Use help(str) for help on the str class.')
Define this as
"""
os.linesep.join(['No Python...',
'Use help("...',
'Use help(str...',
])
"""
to avoid the line ending error you're seeing (which is coming from the
fact that run_pydoc() runs Python in a subprocess, which means output
from it has the system line endings). See test_capi's
test_forced_io_encoding for another example like this.
http://bugs.python.org/review/19980/
More information about the docs
mailing list