Microsoft MakeCode

Python serialization - inlining of functions not very readable?

I am pretty excited because I just turned on python serialization for the BuildBee MakeCode pxt
image

image

So far it seems to be working well. It gets a little weird for my blocks that take a function though
image

image

image

Any suggestions how to clean this up? When I do typescript it has the ability to use lambda expressions, so the code looks tidier

Python’s lambda expressions aren’t as good cause braces don’t exist, so you are kinda stuck with nested functions. Also I believe the lambda statement doesn’t work in PXT at all currently.