Ah. I'm stupid. xD. I'm using a 
for a in iterator: 

but I thought I was using a 
while (a != end_condition):
    <code>
    a = get_next_a().