This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pydoc str.split does not find the method
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: "pydoc str" works but not "pydoc str.translate"
View: 8887
Assigned To: Nosy List: thp
Priority: normal Keywords: patch

Created on 2011-08-01 12:22 by thp, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pydoc_builtin-classmethods.patch thp, 2011-08-01 12:22 Patch against Python 2.6's pydoc.py
Messages (1)
msg141494 - (view) Author: Thomas Perl (thp) Date: 2011-08-01 12:22
If I want to get help on a method on a built-in class (e.g. list or str) I can use the help function in the interactive shell:

>>> help(str.split)
>>> help(list.append)

However, when I try to do the same with the command-line utility "pydoc" it does not work:

$ pydoc str.split

What does work with the pydoc command is that I use the following command and then search for the function in the resulting output:

$ pydoc str # after that, manually search for "split"

I've created a patch against Python 2.6's "pydoc.py" that tries to iteratively look up methods in builtins. This keeps the previous behavior as-is, but will give positive results in the cases listed above.
History
Date User Action Args
2022-04-11 14:57:20adminsetgithub: 56883
2011-08-01 12:40:53r.david.murraysetstatus: open -> closed
type: behavior
superseder: "pydoc str" works but not "pydoc str.translate"
resolution: duplicate
stage: resolved
2011-08-01 12:22:36thpcreate