filbert icon indicating copy to clipboard operation
filbert copied to clipboard

Single line while can't handle multiple statements

Open differentmatt opened this issue 11 years ago • 0 comments

This is probably not limited to while loops.

Input:

total = 0
while True: total += 1; break;
print(total)

Output:

var total = 0;
while (true) {
    total = __pythonRuntime.ops.add(total, 1);
}
break;
;
__pythonRuntime.functions.print(total);

differentmatt avatar Sep 17 '14 16:09 differentmatt