3 ms·
You want lines, so that you may have multiple statements in your lambda. They've given you multiple statements, but using the semicolon instead. I appreciate t
by scoopertrooper 5y ago
You want lines, so that you may have multiple statements in your lambda. They've given you multiple statements, but using the semicolon instead.
I appreciate that won't work well for all use cases, but it'd eliminate a lot of the pain with the current lambda implementation.
For whatever reason, the Python community declared multiline lambdas as non-pythonic and this project aims to remain pythonic, so they went with semicolons instead.
I'm not a Python developer myself, but if that was the only thing holding you back, then perhaps that reason is now slightly reduced?
- macintux 5y agoIt does seem that if a function can’t fit with this new expanded capability, it probably is complex enough to warrant a name. Assuming that Python’s support for nested functions carries over to Coconut, it seems like a reasonably-complete feature set.