You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current ThinkPy parser incorrectly includes statements outside of loop bodies within the loop's AST. This causes premature loop termination when executing statements that should be outside the loop.
Example of the Problem
# Original Codeobjective"Test list operations"task"Lists":
step"Process":
items= []
foriinrange(3):
items=items+ [i]
print(items)
print(items[1])
run"Lists"
Current Parser Behavior
The parser incorrectly includes both print statements in the loop's body in the AST:
Issue Description
The current ThinkPy parser incorrectly includes statements outside of loop bodies within the loop's AST. This causes premature loop termination when executing statements that should be outside the loop.
Example of the Problem
Current Parser Behavior
The parser incorrectly includes both print statements in the loop's body in the AST:
Constraints
The solution must:
Desired Solution
Temporary Hack
Questions to Consider
Impact
This issue affects:
Labels
Priority
High - This affects basic program flow control and execution accuracy.
The text was updated successfully, but these errors were encountered: