Last active
December 18, 2015 13:59
-
-
Save mwhooker/5793945 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
| >>> with open('test', 'w') as a: | |
| ... with open('test', 'w') as b: | |
| ... a.write('a') | |
| ... b.write('b') | |
| ... | |
| >>> | |
| [1] + 42274 suspended python | |
| [mwhooker@Wolfe:~/test]$ cat test | |
| a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The file
testwill be left half-finished… Which is a problem if, somewhere, you make the assumption that the file is complete. https://github.com/shazow/unstdlib.py/pull/15/files#L2R9 ensures that either the file is completely written, or completely not written.