Skip to content

Commit

Permalink
Updated smart_open() docstring with pointer to StackOverflow
Browse files Browse the repository at this point in the history
  • Loading branch information
IanLee1521 committed Oct 21, 2017
1 parent 3225035 commit f99e244
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pshtt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ def debug(message, divider=False):

@contextlib.contextmanager
def smart_open(filename=None):
"""Context manager that can handle writing to a file or stdout"""
"""
Context manager that can handle writing to a file or stdout
Adapted from: https://stackoverflow.com/a/17603000
"""
if filename is None:
fh = sys.stdout
else:
Expand Down

0 comments on commit f99e244

Please sign in to comment.