New submission from Terry J. Reedy: >>> help(1) # help on int >>> help(b'a') # help on bytes >>> help('a') no Python documentation found for 'a'
The reason for this unhelpful response is that strings are treated differently from all other non-class objects. (msg205861 thought this a bug.) The strings value is matched against strings that would be recognized at the help> prompt given after help(). >>> help('topics') # list of TOPICS >>> help('LISTS') # information about mutable sequences Suggestion: add something more about what to do. Example enhanced response: No Python documentation found for 'a'. Try help('help') for information on recognized strings or help(str) for help on the str class. I believe this could be backported since help() is intented for interactive use only. ---------- assignee: docs@python components: Documentation, Library (Lib) messages: 206157 nosy: docs@python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Improve help('non-topic') response type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19980> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com