New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unix: Unexpected behaviour in nested for loops #3157
Comments
Thanks for the report, I can confirm that it's a bug with the optimised for loop. For now, to work around it force the compiler to not generate optimised loops by using an explicit iterator: xrange = range
for foo in range(10):
print(foo)
for bar in xrange(10):
pass
else:
continue
break |
@dpgeorge : My understanding is that it's incorrect handling of "continue" scoping in for's "else" clause: it no longer applies to that "for", but to the enclosing "for". |
No, the else is handled correctly. It was an issue with values remaining on the Python stack when they should have been popped. |
…scoutmakes-azul Addition of Tinkeringtech ScoutMakes Azul nRF52840 based platform to CircuitPython
This arose in this forum post
Outcome under CPython (prints 0-9) and MicroPython (prints 0 only)
The text was updated successfully, but these errors were encountered: