Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support walrus operator assignments #15

Open
larsblumberg opened this issue Jan 11, 2023 · 0 comments
Open

Support walrus operator assignments #15

larsblumberg opened this issue Jan 11, 2023 · 0 comments

Comments

@larsblumberg
Copy link

larsblumberg commented Jan 11, 2023

...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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant