-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Description
>>> compile(ast.Module([ast.Expr(ast.Constant(value=(1,)))]), "", "exec")
Traceback (most recent call last):
File "<python-input-39>", line 1, in <module>
compile(ast.Module([ast.Expr(ast.Constant(value=(1,)))]), "", "exec")
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: required field "lineno" missing from stmt
The error is coming from the conversion of the AST to a C ast. Should we make the lineno default to something like, say, 1?
Or are we happy with this being an invalid AST?
Metadata
Metadata
Assignees
Labels
No labels