imip-agent

Changeset

1084:537ea3afa544
2016-03-09 Paul Boddie raw files shortlog changelog graph Added docstrings. freebusy-collections
imiptools/data.py (file)
     1.1 --- a/imiptools/data.py	Wed Mar 09 00:08:49 2016 +0100
     1.2 +++ b/imiptools/data.py	Wed Mar 09 00:09:28 2016 +0100
     1.3 @@ -652,9 +652,15 @@
     1.4          out.close()
     1.5  
     1.6  def to_stream(out, fragment, encoding="utf-8"):
     1.7 +
     1.8 +    "Write to the 'out' stream the given 'fragment'."
     1.9 +
    1.10      iterwrite(out, encoding=encoding).append(fragment)
    1.11  
    1.12  def to_string(fragment, encoding="utf-8"):
    1.13 +
    1.14 +    "Return a string encoding the given 'fragment'."
    1.15 +
    1.16      out = StringIO()
    1.17      try:
    1.18          to_stream(out, fragment, encoding)