Message162324
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. |
|
Date |
User |
Action |
Args |
2012-06-05 03:09:21 | roger.serwy | set | recipients:
+ roger.serwy, terry.reedy, ned.deily, python-dev, Roy.Fox |
2012-06-05 03:09:21 | roger.serwy | set | messageid: <1338865761.05.0.581057142604.issue12510@psf.upfronthosting.co.za> |
2012-06-05 03:09:20 | roger.serwy | link | issue12510 messages |
2012-06-05 03:09:19 | roger.serwy | create | |
|