Open lukefisklennon opened 6 years ago
I second this. I think we are really talking about anonymous functions, which is a big limitation of python.
@abalter Thanks for the clarification, that's what I meant.
so true @lukefisklennon
I agree!
The only reasonable arguments for this project to exist.
I second this. Anonymous functions are the most annoying aspect of the default python parser If you could do
dict = {
"fn": lambda x, y {
# multi
# line
# fn
}
}
It would be absolutely glorious.
If enough people second this I could give it a go myself. I'd probably parse the function and transpile it into an actual declaration, as python just does not support multi line lambdas.
dict = {
"fn": lambda x, y {
# multi
# line
# fn
}
}
------------
def _anon_uuid(x, y):
# multi
# line
# fn
dict = {
"fn": _anon_uuid
}
Hi there!
One of my main gripes about Python is not being able to write multiline lambdas. I had an idea to create a Python preprocessor that allows braces (and found this before making it myself) to allow multiline lambdas, but also to generally improve readability.
I'm just wondering if Bython supports multiline lambdas, or plans to in the future.
Thanks so much!