Skip to content

Instantly share code, notes, and snippets.

@munro
Created March 23, 2012 22:11
Show Gist options
  • Save munro/2175562 to your computer and use it in GitHub Desktop.
Save munro/2175562 to your computer and use it in GitHub Desktop.
Yield Foo
def bar():
return 'bar!'
def foo(v):
return 'foo! ' + v
def meow():
yield foo((yield bar()))
a = meow()
print(a.send(a.next() + 'yield'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment