Issue #20189: Four additional builtin types (PyTypeObject,

PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
This commit is contained in:
Larry Hastings 2014-01-24 06:17:25 -08:00
parent b3c0f4067d
commit 5c66189e88
31 changed files with 851 additions and 508 deletions

View file

@ -925,7 +925,10 @@ class HTMLDoc(Doc):
anchor, name, reallink)
argspec = None
if inspect.isfunction(object) or inspect.isbuiltin(object):
signature = inspect.signature(object)
try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if realname == '<lambda>':
@ -1319,8 +1322,12 @@ location listed above.
skipdocs = 1
title = self.bold(name) + ' = ' + realname
argspec = None
if inspect.isfunction(object) or inspect.isbuiltin(object):
signature = inspect.signature(object)
if inspect.isroutine(object):
try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if realname == '<lambda>':