]> granicus.if.org Git - python/commit
Use with open() as fo: ... instead of try: fo = open(...) finally: fo.close()
authorVictor Stinner <victor.stinner@haypocalc.com>
Sun, 16 May 2010 00:34:40 +0000 (00:34 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sun, 16 May 2010 00:34:40 +0000 (00:34 +0000)
commit8a470d6039ffe85ea2e0f095fd0f0b960f099b94
treefb45d78c7f4c9ae678bc3a1b43807ce373b323d9
parent3bea1ede7d260484f66b1ee4e3e20d65e3bf9bd1
Use with open() as fo: ... instead of try: fo = open(...) finally: fo.close()

fo is not set if the open() fails.
Lib/test/list_tests.py