diff -r c2910971eb86 Lib/idlelib/CallTips.py --- a/Lib/idlelib/CallTips.py Mon Jun 11 17:56:08 2012 +0100 +++ b/Lib/idlelib/CallTips.py Tue Jun 12 14:30:08 2012 -0500 @@ -117,7 +117,7 @@ return None # The following are used in both get_argspec and tests -_self_pat = re.compile('self\,?\s*') +_self_pat = re.compile('(?<=\()[^,]*\,?\s*') _default_callable_argspec = "No docstring, see docs." def get_argspec(ob): @@ -182,10 +182,11 @@ def t5(self, ai, *args): "(self, ai, *args)" def t6(self, ai, b=None, *args, **kw): "(self, ai, b=None, *args, **kw)" @classmethod - def cm(cls, a): "(cls, a)" + def cm(cls, a): "(a)" @staticmethod def sm(b): "(b)" def __call__(self, ci): "(ci)" + def notself(notself, ai, b=None): "(notself, ai, b=None)" tc = TC() @@ -231,7 +232,8 @@ for func in (t1, t2, t3, t4, t5, t6, TC,): fdoc = func.__doc__ test(func.__name__, fdoc + "\n" + fdoc) - for func in (TC.t1, TC.t2, TC.t3, TC.t4, TC.t5, TC.t6, TC.cm, TC.sm): + for func in (TC.t1, TC.t2, TC.t3, TC.t4, TC.t5, TC.t6, TC.cm, + TC.sm, TC.notself): fdoc = func.__doc__ test('TC.'+func.__name__, fdoc + "\n" + fdoc)