evhub / evhub/coconut

Dynamically compile implicit lambdas to the right arity

Open
#416 9 comments 0 reactions 0 assignees View on GitHub
documentation feature
Dominant language
Python
Stars
4.4k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

I just replaced all instances of lambda functions like `() -> ...` by `-> ...` since it seems to be a possible shortcut, but broke my code out of the blue.
It is compiled, however, to something like `lambda _: ...` which conflicts with many parts of my code, where I use `_` for other things (e.g. the `self` reference or a running variable in comprehensions).

Can you modify the code generation in a way that avoids this problem? Either a more unlikely lambda parameter (`__anonymous__function`) or something automatically generated guaranteed not to conflict?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.