False positive '"yield" not allowed outside of a function' when using yield in lambda in top-level code #373
Labels
bug
Something isn't working
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Environment data
Expected behaviour
Writing a lambda function containing yield expressions in top-level code should be considered valid syntax.
Actual behaviour
Pylance reports
"yield" not allowed outside of a function
for the yield expression.Code Snippet / Additional information
Can be reproduced simply with
The text was updated successfully, but these errors were encountered: