Weird error message when calling yield from a standard function #6693
Labels
imported
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: parser
I made the mistake of calling yield from a non-generator function. Actually an anonymous function. I would probably have understood my mistake sooner if I'd got a better error message.
It would be great with a better error message so the next generator-newbie doesn't have to struggle as much :)
I got "SyntaxError: yield is a reserved word".
Here is the code that got me the error:
Here is the complete output.
The text was updated successfully, but these errors were encountered: