help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to highlight block end in Python-mode indentation


From: Skip Montanaro
Subject: Re: how to highlight block end in Python-mode indentation
Date: Sun, 21 May 2017 07:40:57 -0500

Do you have some solution?


I think Yuri summarized the places to start quite well. In general, it
sounds like a fair amount of code refactoring is in order.

I would caution against trying to do it all at once, however. Assuming you
have unit tests or even just some regression tests you can run, make sure
everything passes, do a little refactoring, verify your tests still pass
(and that they exercise the modified code - if not, write more test cases),
check in the changes, then it's a process of lather, rinse, repeat.

One mistake I make repeatedly, is mixing changes in a commit. Suppose I
want to refactor a chunk of code into a separate function. While doing
that, I notice something unrelated which needs doing too, and do that. Now
my next commit mixes two functional changes to the code base, making it
difficult to back out just one of them later. Small, precise commits are
preferable to big, rambling commits. Such problematic commits are more
tempting to make when you know you have a fair amount of work to do.

Sorry, this is off-topic from your original request. Hopefully these few
posts give you a bit different way to think about the problem you face.

Skip Montanaro


reply via email to

[Prev in Thread] Current Thread [Next in Thread]