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