Skip to content

QoL: if parser should accept known symbols for its case #267

Description

@liamhuber

Like

import flowrep as fr

def identity(x):
    return x

@fr.workflow
def macro(x, y, z):
    if x:
        w = identity(y)
    else:
        w = identity(z)
    return w

Currently you need an identity wrapper like if identity(x).

Under the hood, the recipe still expects an operation for the case, and I can tolerate that, I'd be content if it just auto-inserted the identity operation at parsing time so I can write more straightforward python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementCategory: New feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions