Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda with void return value rejected #108

Closed
JukkaL opened this issue Feb 5, 2013 · 0 comments · Fixed by #315
Closed

Lambda with void return value rejected #108

JukkaL opened this issue Feb 5, 2013 · 0 comments · Fixed by #315
Labels
bug mypy got something wrong

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Feb 5, 2013

Code like this is rejected, because the lambda has None as the inferred return type:

import typing
x = lambda: print(1) # type: typing.Function[[], None]

The type checker should accept lambdas that don't return a value. Any type for the lambda body should be accepted in this case.

@JukkaL JukkaL added the easy label Jul 14, 2014
etrepum added a commit to etrepum/mypy that referenced this issue Jul 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant