Hi,
I'm parsing some python code and I found this:
{p: eval(f"e{p}", dict(e=e, p=p)) for p in paths}
From what I understood it is to create a dictionary with the values of paths as keys and the result of the eval as values.
The SmaCC parser is generating in this a FunctionCallExpression with (f"e{p}", dict(e=e, p=p)) as arguments and p: eval as receiver.
I have the impression that the receiver is wrong and should just be eval? Maybe I'm wrong but it's my impression
Hi,
I'm parsing some python code and I found this:
{p: eval(f"e{p}", dict(e=e, p=p)) for p in paths}From what I understood it is to create a dictionary with the values of paths as keys and the result of the eval as values.
The SmaCC parser is generating in this a FunctionCallExpression with
(f"e{p}", dict(e=e, p=p))as arguments andp: evalas receiver.I have the impression that the receiver is wrong and should just be
eval? Maybe I'm wrong but it's my impression