From f99e244e481c1d4fc9023b3dd286461309baf456 Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Sat, 21 Oct 2017 09:07:40 -0700 Subject: [PATCH] Updated `smart_open()` docstring with pointer to StackOverflow --- pshtt/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pshtt/utils.py b/pshtt/utils.py index 14ba7331..ab672f41 100644 --- a/pshtt/utils.py +++ b/pshtt/utils.py @@ -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: