Skip to content
  • Damien George's avatar
    py/compile: Fix bug with break/continue in else of optimised for-range. · 4c5f1083
    Damien George authored
    This patch fixes a bug whereby the Python stack was not correctly reset if
    there was a break/continue statement in the else black of an optimised
    for-range loop.
    
    For example, in the following code the "j" variable from the inner for loop
    was not being popped off the Python stack:
    
        for i in range(4):
            for j in range(4):
                pass
            else:
                continue
    
    This is now fixed with this patch.
    4c5f1083