Skip to content

Commit

Permalink
Improve docstring.
Browse files Browse the repository at this point in the history
modified:   src/ZPublisher/Converters.py
  • Loading branch information
jugmac00 committed Apr 19, 2019
1 parent bdc1d21 commit 398986c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ZPublisher/Converters.py
Expand Up @@ -31,9 +31,12 @@


def field2string(v):
"""Converts value to native strings.
"""Converts a value into a native string.
So always to `str` no matter which Python version you are on.
That means:
- str / byte string for Python 2
- str / "unicode string" for Python 3
"""
if hasattr(v, 'read'):
return v.read()
Expand Down

0 comments on commit 398986c

Please sign in to comment.