← Back to team overview

oship-dev team mailing list archive

OSHIP Rev 224 Code Review: issue #04 - Replace while x<n loop by pythonic for item in vocab loop

 

In app.py the Import<terminology> view classes use a C-like construct

n=len(vocab)
x=0
while x<n:
	<add the term to the container>
	x+=1

which IMHO could be replaced by

for term in vocab:
	<add term to the container>


Optionally use enumerate() in order to obtain an index that can be used
to show the progress of the importing in an AJAX-like widget.



Follow ups