Open
Description
I sometimes get asked why a lambda
function can't be type-checked. And I believe the answer is that the arguments and result of a lambda
can't be inferred by a static type checker.
It might be worth adding something at https://typing.python.org/en/latest/spec/callables.html#callables that tells people that lambda
functions can't be type checked (or if they can, what are the restrictions), and that the workaround is to create a typed function def
that does what the lambda does.