Author: Armin Rigo <ar...@tunes.org> Branch: py3k Changeset: r87332:e00dbe634410 Date: 2016-09-22 18:11 +0200 http://bitbucket.org/pypy/pypy/changeset/e00dbe634410/
Log: Functions and methods that are actually "built-in" on CPython might end up with FunctionType or MethodType. We need to work harder to be sure to exclude them here. diff --git a/lib-python/3/idlelib/CallTips.py b/lib-python/3/idlelib/CallTips.py --- a/lib-python/3/idlelib/CallTips.py +++ b/lib-python/3/idlelib/CallTips.py @@ -144,7 +144,8 @@ fob = ob_call else: fob = ob - if isinstance(fob, (types.FunctionType, types.MethodType)): + if (isinstance(fob, (types.FunctionType, types.MethodType)) and + hasattr(fob.__code__, 'co_code')): # PyPy: not on <builtin-code> argspec = inspect.formatargspec(*inspect.getfullargspec(fob)) if (isinstance(ob, (type, types.MethodType)) or isinstance(ob_call, types.MethodType)): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit