Message368351
I've updated PR 17715 in order to point out exact field that error happened. Also it now only shows type
>>> import ast
>>> expr_without_lineno_but_ok = ast.Expression(body=ast.BinOp(left=ast.Num(n=2), right=ast.Num(n=2), op=ast.Add()))
>>> expr_with_lineno_but_with_wrong_body = ast.Expression(body=[ast.BinOp(left=ast.Num(n=2), right=ast.Num(n=2), op=ast.Add())])
>>> ast.fix_missing_locations(expr_with_lineno_but_with_wrong_body)
<ast.Expression object at 0x7f854123fbb0>
>>> compile(expr_without_lineno_but_ok, "<temp>", "eval")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: required field "lineno" missing from expr
>>> compile(expr_with_lineno_but_with_wrong_body, "<temp>", "eval")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: For field 'body'; expected expr type node, got list |
|
| Date |
User |
Action |
Args |
| 2020-05-07 15:16:43 | BTaskaya | set | recipients:
+ BTaskaya, benjamin.peterson, Ilya Kamenshchikov, pablogsal |
| 2020-05-07 15:16:43 | BTaskaya | set | messageid: <[email protected]> |
| 2020-05-07 15:16:43 | BTaskaya | link | issue38131 messages |
| 2020-05-07 15:16:43 | BTaskaya | create | |
|