Roman Susi wrote:<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
I think it could be cool if callable objects were added<br>
"("<br>
when completed.</blockquote><br><div class="gmail_quote">Facundo Batista wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Leonardo Santagada:<br>

<div class="Ih2E3d"><br>
> Why not make a pep about something bigger then? I think python needs a more<br>
> complete interactive interpreter... something that would work right after<br>
> installing python. I think the language strives to be easy and with a smooth<br>
> learning curve, this could probably help.<br>
<br>
</div>+1.<br>
<br>
Note, though, that it's not as easy as it sounds. For example, note<br>
that the very useful and simple behaviour of doing up-arrow and<br>
bringing the last line, is not handled by Python code, but by the<br>
external library readline.<br>
<br>
My point is: you can propose a lot of things (I surely will love<br>
autocompletion and better block management), but how would you achieve<br>
that in a multiplatform way?</blockquote><div><br>IDLE?<br><br>Which has auto-completion, BTW, and for which I wrote a patch two years ago which adds () after a completed callable, placing the cursor in between these parenthesis, and bringing up the callable's call-tip while it's at it (without obscuring the current line - yay GUI!). The patch was never posted to the Python issue tracker because I thought there was no interest, but it would be easy to do so.<br>
<br>(more rambling ahead...)<br><br>The annoying bit about my implementation was that I had to use the right arrow key in order to move past the closing parenthesis. This could be overcome by just adding the opening '(' as suggested above, or perhaps by making closing the parenthesis by typing ')'  simply "overwrite" the existing ')' character (with good recognition of when you're just typing a ')' in a string or closing an inner pair of parenthesis, of course).<br>
<br>While I was at it, I also made it complete dict keys (only complete-able keys like strings and numbers) and auto-magically add [] after completed dicts (with the cursor placed in between), which I found to be surprisingly useful in interactive work.<br>
<br></div></div><br>- Tal<br><br>P.S. Thanks to Shai Geva for suggesting that I implement the above mentioned features.<br>