You tell us. What does this code do?

What happened when you stepped through it with a debugger, or at least added some print statements, to figure out when the program's execution differs from...