diff -r 37905786b34b Lib/inspect.py --- a/Lib/inspect.py Sun Apr 12 23:24:17 2015 -0500 +++ b/Lib/inspect.py Mon Apr 13 13:20:05 2015 -0400 @@ -2131,9 +2131,12 @@ if type not in obj.__mro__: # We have a class (not metaclass), but no user-defined # __init__ or __new__ for it - if obj.__init__ is object.__init__: + if obj.__new__ is object.__new__ and obj.__init__ is object.__init__: # Return a signature of 'object' builtin. return signature(object) + else: + msg = 'signature not supported for builtin type {!r}'.format(obj) + raise TypeError(msg) elif not isinstance(obj, _NonUserDefinedCallables): # An object with __call__