Author: Brian Kearns <[email protected]>
Branch: stdlib-2.7.8
Changeset: r73115:bfc017df0694
Date: 2014-08-28 14:32 -0400
http://bitbucket.org/pypy/pypy/changeset/bfc017df0694/
Log: further hacks for pypy compat
diff --git a/lib-python/2.7/idlelib/CallTips.py
b/lib-python/2.7/idlelib/CallTips.py
--- a/lib-python/2.7/idlelib/CallTips.py
+++ b/lib-python/2.7/idlelib/CallTips.py
@@ -170,7 +170,7 @@
fob = ob.im_func
if ob.im_self is not None:
arg_offset = 1
- elif type(ob_call) == types.MethodType:
+ elif type(ob_call) == types.MethodType and
hasattr(ob_call.im_func.func_code, 'co_code'):
# a callable class instance
fob = ob_call.im_func
arg_offset = 1
@@ -200,7 +200,7 @@
lines = (textwrap.wrap(argspec, _MAX_COLS, subsequent_indent=_INDENT)
if len(argspec) > _MAX_COLS else [argspec] if argspec else [])
- if isinstance(ob_call, types.MethodType):
+ if isinstance(ob_call, types.MethodType) and
hasattr(ob_call.im_func.func_code, 'co_code'):
doc = ob_call.__doc__
else:
doc = getattr(ob, "__doc__", "")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit