[Patches] [ python-Patches-1726198 ] Line iteration readability

SourceForge.net noreply at sourceforge.net
Sun May 27 08:21:10 CEST 2007


Patches item #1726198, was opened at 2007-05-26 15:13
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1726198&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Joseph Armbruster (joearmbruster)
Assigned to: Nobody/Anonymous (nobody)
Summary: Line iteration readability

Initial Comment:
I noticed there were several places that use the

while 1:

as opposed to the:

for line in fp:

approach to line-reading.  This patch takes care of some of them that I grep'd out.



----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2007-05-27 01:21

Message:
Logged In: YES 
user_id=80475
Originator: NO

The patch is fine.  The first change should probably go a step further and
use enumerate() for the lineno counts.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1726198&group_id=5470


More information about the Patches mailing list