[docs] [issue19980] Improve help('non-topic') response

Jessica McKellar report at bugs.python.org
Mon May 26 19:45:52 CEST 2014


Jessica McKellar added the comment:

@BreamoreBoy, thanks for following up on this!


> I propose the following.  help('') returns help on strings in the same way that help([]) and help({}) returns help on lists and dicts respectively,

Sounds good.

> further help(''.method) returns help on the string method or an attribute error, so this appears to me consistent.

This already happens (which I think you are saying, but it's a bit confusing in reading your message which functionality you are proposing to add and which functionality you are restating that already exists).

> help('doh') returns enhanced output along the lines Terry suggested in msg206157.

Sounds good.

> help('module') gives the path to the module as well as the help output, if any, as I think this could be useful in cases where you're looking for problems and have a stdlib module masked by a file of your own.

I think you are stating the current functionality?

> Note that I've tried looking at the test code and it didn't make much sense to me, pointers welcome.

Do you have specific questions?

Terry suggests that help() tests for functionality using pydoc live in test_pydoc.py, and that help() tests for functionality not using pydoc live in test_site.py.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19980>
_______________________________________


More information about the docs mailing list