Patch #711902: Cause pydoc to show data descriptor __doc__ strings.

This commit is contained in:
Martin v. Löwis 2003-05-03 09:09:02 +00:00
parent e86a59af88
commit e59e2bab8f
5 changed files with 43 additions and 2 deletions

View file

@ -61,6 +61,7 @@ class FesteringGob(MalodorousPervert, ParrotDroppings):
# isbuiltin, isroutine, getmembers, getdoc, getfile, getmodule,
# getsourcefile, getcomments, getsource, getclasstree, getargspec,
# getargvalues, formatargspec, formatargvalues, currentframe, stack, trace
# isdatadescriptor
from test.test_support import TestFailed, TESTFN
import sys, imp, os, string
@ -104,6 +105,8 @@ istest(inspect.ismethod, 'mod.StupidGit.abuse')
istest(inspect.ismethod, 'git.argue')
istest(inspect.ismodule, 'mod')
istest(inspect.istraceback, 'tb')
istest(inspect.isdatadescriptor, '__builtins__.file.closed')
istest(inspect.isdatadescriptor, '__builtins__.file.softspace')
test(inspect.isroutine(mod.spam), 'isroutine(mod.spam)')
test(inspect.isroutine([].count), 'isroutine([].count)')