8000 Support walrus operator assignments · Issue #15 · alexmojaki/sorcery · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Support walrus operator assignments #15
Open
@larsblumberg

Description

@larsblumberg

...such as this:

if (some_key := unpack_keys(dict(some_key=42))):
    print(some_key)

currently this raises

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python3.11/site-packages/sorcery/core.py", line 185, in __call__
    assert executing.node, "Failed to find call node"
AssertionError: Failed to find call node

while it would be magical if sorcery could handle this walrus assignment expression, too, wouldn't it?

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

      0