Skip to content

SmaCC Python, management of dictionary creation #39

Description

@jecisc

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions