On Thu, 17 Feb 2005, Jonathan Brandmeyer wrote:
On Thu, 2005-02-17 at 10:06 -0800, Nick Rasmussen wrote:
On Wed, 16 Feb 2005, Jonathan Brandmeyer wrote:
Where does pydoc test whether or not to document something as a function?
-Jonathan
for python2.3 it's at pydoc.py:559
for key, value in inspect.getmembers(object, inspect.isroutine): if inspect.isbuiltin(value) or inspect.getmodule(value) is object: if visiblename(key): funcs.append((key, value)) fdict[key] = '#-' + key if inspect.isfunction(value): fdict[value] = fdict[key]
All of the routines have been filtered off already, so do you know why they are then filtering for only builtin types? If I comment out the "if inspect.isbuiltin(value)..." line, it appears to work just fine.
-Jonathan
They have it there so pydoc doesn't document functions pulled in from other modules, there's just special handling for builtins as there's no way to recover source modules from builtin functions, so it documents all builtin functions. -nick