[wingide-users] Indentation bug with 'pass'?
Wing IDE Support
support at wingware.com
Wed Mar 30 17:31:51 EST 2005
On Thu, 31 Mar 2005, Rene Pijlman wrote:
> def a(b):<Enter>
> pass<Enter>
>
> The indentation level drops back to that of 'def' and when I
> type Tab, Wing refuses to move the cursor to the indentation
> level of 'pass'.
Indeed, we seem to be treating 'pass' like 'return' and others
that end a block. Does it really make sense to say 'pass' and
not end a block?
On Wed, 30 Mar 2005, Peter Mott wrote:
> I get the same mildly irritating behaviour with:
>
> def a(b):
> #Comment
> return b
We pay attention to comment indent because it's what is wanted
more often than not if entering multi-line comments (otherwise,
Wing would stubbornly auto-indent to the wrong level for each
subsequent comment line).
For the above, I'd recommend using a docstring if the comment
is documentation for the function or indenting the comment if
it describes what a particular block of code in the function
does. If there's a compelling reason not to do that, we can
of course consider making this more configurable (but more
configurability is not always a good thing ;-)
Stephan Deibel
--
Wingware
Wing IDE for Python
Advancing Software Development
www.wingware.com
More information about the wingide-users
mailing list