Skip to content

Instantly share code, notes, and snippets.

@harlowja
Last active November 11, 2018 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harlowja/b0d3e41782d2aabb0b6081c93a65348e to your computer and use it in GitHub Desktop.
Save harlowja/b0d3e41782d2aabb0b6081c93a65348e to your computer and use it in GitHub Desktop.
def not_indented(fh):
fh.write("b")
def close_it_and_call(filename, mode, func):
with open(filename, mode) as fh:
func(fh)
def main():
close_it_and_call("blob", "w", not_indented)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment