projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a003014
)
replace xrange with enumerate
author
Diane Trout
<diane@ghic.org>
Fri, 20 Mar 2015 23:21:35 +0000
(16:21 -0700)
committer
Diane Trout
<diane@ghic.org>
Fri, 20 Mar 2015 23:21:35 +0000
(16:21 -0700)
htsworkflow/submission/daf.py
patch
|
blob
|
history
diff --git
a/htsworkflow/submission/daf.py
b/htsworkflow/submission/daf.py
index 90993def35d8058618325fdf9d0c114f527e7e19..7f5ed294ef8555efcbcbf26cda24d36c4ee983ca 100644
(file)
--- 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
"""
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)
return len(line)
@@
-152,9
+152,9
@@
def _extract_name_index(line, start=0):
returns length of string if nothing matches
"""
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)
return len(line)