Skip to content

Auto Var auto-aliasing #2

@DannyWeitekamp

Description

@DannyWeitekamp

Right now variables are defined like :

my_var = Var(Type, "my_var")

But in principle it is possible to use python's inspect module to simplify this to just:

my_var = Var(Type)

And have the alias inferred from the name of the python variable that Var is bound to:

See: https://stackoverflow.com/questions/8875202/can-an-object-inspect-the-name-of-the-variable-its-been-assigned-to

There will probably be edge cases where this is not possible in which case the variables should remain anonymous until a name can be auto-assigned (like x0,x1,x2,...) when the Var is included in an operation or condition

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions