Roger Serwy <roger.se...@gmail.com> added the comment:

The reoganization in i12510.test.diff will make back-porting to 2.7 slightly 
more difficult since old and new style classes exist. I do agree with your 
reasoning for re-factoring the code. (Also, as an extremely minor point, 
running reindent.py adjusts "pos = 70".)

I applied the patch and it works under 11.04 Ubuntu. All the tests pass and the 
behavior of the CallTip gives reasonable results when used interactively.

I did manage to find a corner-case where a CallTip should arise:
    >>> class A:
            def __init__(self, a=None):
                print('init')
            def __call__(self, b=None):
                print('call')
                
    >>> c = A(

Gives "(a=None)" as the call-tip. However, once the object is created, giving 
the __call__ argument doesn't work, i.e. 

    >>> c(

doesn't give a call-tip. This behavior is also the same without the patch.

I'll keep playing with the patch to see what else needs improving with 
CallTips. We might as well fix it completely.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12510>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to