Closed
Description
See #2567 (comment):
A lambda
should always be at least least inferred as Callable
(with a specific number of arguments). We know as much about it as we do about an unannotated def
. This is really strange:
def f(x): return x
g = lambda x: x
reveal_type(f)
reveal_type(g)
Gives
__tmp__.py:3: error: Revealed type is 'def (x: Any) -> Any'
__tmp__.py:4: error: Revealed type is 'Any'
I think they should reveal the same type.
Metadata
Metadata
Assignees
Labels
No labels