From 7e9777356b3481a783591da3a4dd72b77ea8e801 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Fri, 20 Mar 2015 16:21:35 -0700 Subject: [PATCH] replace xrange with enumerate --- htsworkflow/submission/daf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htsworkflow/submission/daf.py b/htsworkflow/submission/daf.py index 90993de..7f5ed29 100644 --- a/htsworkflow/submission/daf.py +++ b/htsworkflow/submission/daf.py @@ -140,9 +140,9 @@ def _consume_whitespace(line, start=0): returns length of string if it can't find anything """ - for i in xrange(start, len(line)): - if line[i] not in string.whitespace: - return i + for i, c in enumerate(line[start:]): + if c not in string.whitespace: + return i+start return len(line) @@ -152,9 +152,9 @@ def _extract_name_index(line, start=0): returns length of string if nothing matches """ - for i in xrange(start, len(line)): - if line[i] in string.whitespace: - return i + for i, c in enumerate(line[start:]): + if c in string.whitespace: + return i+start return len(line) -- 2.30.2