Skip to content

Instantly share code, notes, and snippets.

@zobar
Created September 13, 2013 15:05
Show Gist options
  • Save zobar/6551928 to your computer and use it in GitHub Desktop.
Save zobar/6551928 to your computer and use it in GitHub Desktop.
def with_resource():
print 'SETUP RESOURCE'
yield
print 'CLEANUP RESOURCE'
a = with_resource()
a.next()
a.next()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment