Dynamically compile implicit lambdas to the right arity
Open
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
Assessment
This issue has not been assessed yet.