[wingide-users] How do I keep all arguments that WING auto-completes for me after typing the opening parenthesis of a class or function ...
support at wingware.com
Thu Jul 3 15:20:27 EDT 2014
Dietmar Schwertberger via wingide-users wrote:
> 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.
The arg in print() is actually optional (defaults to '') but the
analysis system doesn't seem to know that. That's the underlying bug in
this particular case. Thanks for pointing that out.
In other cases it makes no sense to remove required args because someone
> 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.)
That sounds like a bug. I couldn't replicate it just now so please do
report cases you find that are not acting correctly.
>> 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
> 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.
I agree a preference probably isn't the way to go. The problem is that
both a key binding to exit without removing defaults and some sort of
magical treatment of certain editing operations as meaning the user
wants to leave defaults are things that many will find obscure or
non-intuitive (people vary extremely much in what is intuitive in an IDE).
I'm leaning towards a key binding but I it needs more thought and there
may yet be a better solution.
Thanks to everyone for the feedback!
Wingware | Python IDE
The Intelligent Development Environment for Python Programmers
More information about the wingide-users