Skip to content

walrus operator in chain expression compiles to invalid python #519

@bj0

Description

@bj0

I tried to do something similar to this:

def some_expensive_function(a) = a*10

def f(a) = (c:=some_expensive_function(a)) :: f(c)

but it compiles to code which throws:

SyntaxError: assignment expression cannot be used in a comprehension iterable expression

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions