[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.

File Lib/test/test_pydoc.py (right):

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.


More information about the docs mailing list