Skip to content

Instantly share code, notes, and snippets.

@munro
Created April 16, 2015 20:33
Show Gist options
  • Save munro/d47ed92db0745f8ad554 to your computer and use it in GitHub Desktop.
Save munro/d47ed92db0745f8ad554 to your computer and use it in GitHub Desktop.
In [3]: def foo(): yield 1; yield 2; return
In [4]: def foo(): yield 1; yield 2; return 3
File "<ipython-input-4-e56b14727cad>", line 1
def foo(): yield 1; yield 2; return 3
SyntaxError: 'return' with argument inside generator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment