Steve Holden schrieb:
> Duncan Booth wrote:
>> "Neal Norwitz" <[EMAIL PROTECTED]> wrote in 
>> news:[EMAIL PROTECTED]:
>> 
>>> I just checked in a whitespace normalization change that was way too
>>> big.  Should this task be automated?
>> 
>> IMHO, changing whitespace retrospectively in a version control system is a 
>> bad idea.
>> 
>> How much overhead would it be to have a checkin hook which compares each 
>> modified file against the output of running reindent.py over the same file 
>> and rejects the checkin if it changes anything? (With of course an 
>> appropriate message suggesting the use of Reindent.py before reatttempting 
>> the checkin).
>> 
>> That way the whitespace ought to stay normalized so you shouldn't need a 
>> separate cleanup step and you won't be breaking diff and blame for the 
>> sources (and if the reindent does ever break anything it should be more 
>> tracable).
> 
> +1
> 
> Enforcing whitespace correctness on checkin has the added advantage that 
> we will be able to screw another 1% out of uncle Timmy, who will no 
> longer have to make his repeated whitespace correction checkins and will 
> therefore have time for more productive tasks.

As I said, this might be a pain for users of editors which don't strip
indentation whitespace intelligently; e.g. if you write

def foo():
     print 1

     print 2

there might be 4 spaces left on line 3.

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to