[wingide-users] How do I keep all arguments that WING auto-completes for me after typing the opening parenthesis of a class or function ...

Dietmar Schwertberger maillist at schwertberger.de
Wed Jul 2 17:21:05 EDT 2014

Am 02.07.2014 22:18, schrieb Wingware Support:
> Dietmar Schwertberger via wingide-users wrote:
>> How about this:
>>  - if the user just types on, the arguments are discarded
>>  - if the user uses the tab key, the behavious is like now
>>  - if the user does something else, e.g. move the cursor, all 
>> arguments and defaults are kept (thats also the way PyCrust handles 
>> things)
> The first two we already do.  The third one seems a bit obscure to me 
> and hard to decide when to do it.  Maybe if Tab is never pressed but I 
> think that it will confuse people if that is the default behavior.
Actually, the third one is there already, but only for the arguments 
without defaults.
The current implementation is somewhat strange, because with Python 3 it 
leaves me e.g. with "print(stream)" which is not too useful, especially 
as "stream" is still there if I just hit "(", ")" and Enter, which is a 
clear contradiction to the first option.

But back to the question: for a start "something else" could be 
restricted to "hits arrow or end key".

Really, I think that the current auto-editing behaviour is sometimes too 
automagic. There is a case where Wing always tries to auto-indent even 
if I just out-dented with a backspace. I need to document and report 
this... (It's with nested if/elses.)

> An alternative is just to have a preference to turn off removal of 
> unaltered defaults and maybe add a refactoring operation that removes 
> unaltered defaults from any invocation so that can still be done when 
> wanted.
That sounds too obscure. I don't think that anyone would figure that out 
and also it would be a lot of work to implement. The default 
implementation should be intuitive enough. Also, I would expect that 
most people want to decide per function call whether they want to keep 
the arguments or not. Personally, I want to keep them in maybe one call 
out of 10 or 20 or 30. Keeping them always makes code unreadable.



More information about the wingide-users mailing list