Created
March 19, 2018 20:59
-
-
Save saml/97fc6a2f918e223522d376b73f443141 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def myfunc(): | |
| print('in my func') | |
| with open('testhelper.py', 'r') as f: | |
| yield f | |
| with myfunc() as f: | |
| for line in f: | |
| print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment