Compare source code

Tim Harig usernet at ilthio.net
Fri Nov 5 14:19:05 EDT 2010


On 2010-11-05, Alain Ketterlin <alain at dpt-info.u-strasbg.fr> wrote:
> Terry Reedy <tjreedy at udel.edu> writes:
>
>> If you add the normally redundant information in the form of explicit
>> dedents (anything starting with '#' and distinguishable from normal
>> comments), then it is not too hard to re-indent even after all indents
>> have been removed.
>
> I actually use such a trick in emacs, not with comments but with "pass"
> (emacs' python mode knows that pass end return end the current block).
> It's extrememly useful in heavily nested code, or if I need to paste
> some piece of code from one level to another. This lets my editor's
> auto-indenter do the right thing. And I see immediately if/when I did
> the nesting wrong.

Thank-you for your tip.  It is nice to know that some people are thinking
of ways to work around the trade-offs rather then just asserting that we
shouldn't use tools that happen to collide with Python.



More information about the Python-list mailing list