On Saturday 26 May 2007, Joseph Armbruster wrote:
 > I noticed that one of the parts of ConfigParser was not using "for line
 > in fp" style of readline-ing :-)  So, this will reduce the SLOC by 3
 > lines and improve readability.  However, I did a quick grep and this
 > type of practice appears in several other places.

Before the current iteration support was part of Python, there was no way to 
iterate over a the way there is now; the code you've dug up is simply from 
before the current iteration support.  (As I'm sure you know.)

Is there motivation for these changes other than a stylistic preference for 
the newer idioms?  Keeping the SLOC count down seems pretty minimal, and 
unimportant.  Making the code more understandable is valuable, but it's not 
clear how much this really achieves that.

In general, we try to avoid making style changes to the code since that can 
increase the maintenance burden (patches can be harder to produce that can be 
cleanly applied to multiple versions).

Are there motivations we're missing?


  -Fred

-- 
Fred L. Drake, Jr.   <fdrake at acm.org>
_______________________________________________
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