# HG changeset patch # User Paul Boddie # Date 1457478568 -3600 # Node ID 537ea3afa54460e781050a9c0a83cbe2c6d11d12 # Parent e4d943f37608e65d8281db7cfbe3ba57ad8136ea Added docstrings. diff -r e4d943f37608 -r 537ea3afa544 imiptools/data.py --- a/imiptools/data.py Wed Mar 09 00:08:49 2016 +0100 +++ b/imiptools/data.py Wed Mar 09 00:09:28 2016 +0100 @@ -652,9 +652,15 @@ out.close() def to_stream(out, fragment, encoding="utf-8"): + + "Write to the 'out' stream the given 'fragment'." + iterwrite(out, encoding=encoding).append(fragment) def to_string(fragment, encoding="utf-8"): + + "Return a string encoding the given 'fragment'." + out = StringIO() try: to_stream(out, fragment, encoding)