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
{{ message }}
Repository navigation
ast.parse(..., mode='single') parses of multiple statements which are then not unparsed #129598
changed the title [-]ast.parse(..., mode='single') parses of multiple statements which are then not unparsed[/-][+]`ast.parse(..., mode='single')` parses of multiple statements which are then not unparsed[/+]on Feb 3, 2025
Activity
tomasr8 commentedon Feb 3, 2025
mode='single'is for Interactive input which always returnsast.Interactive.i = 1; j = 2is a validinteractive_input.It looks like we are missing a specialized
visit_Interactivein the_Unparservisitor:cpython/Lib/ast.py
Lines 666 to 669 in 808071b
Would you like to fix this? Otherwise I can send a fix later
tom-pytel commentedon Feb 3, 2025
Sure, will send something up later.
pythongh-129598: allow multi stmts for ast single with ';'
[-]ast.parse(..., mode='single') parses of multiple statements which are then not unparsed[/-][+]`ast.parse(..., mode='single')` parses of multiple statements which are then not unparsed[/+]gh-129598: ast: allow multi stmts for ast single with ';' (#129620)