diff options
author | Lee Ball <43632885+catleeball@users.noreply.github.com> | 2019-03-27 20:39:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-27 20:39:27 -0700 |
commit | f34dff64a04a453d7e1862d5c0b9d63a0930fb8b (patch) | |
tree | b0b8debfeebe3a12546665479f18c20536d0ad5a | |
parent | afb038367c911bcbf20b4b9929e09abb48f49150 (diff) | |
download | boto-f34dff64a04a453d7e1862d5c0b9d63a0930fb8b.tar.gz |
Updated docstring with string coercion behavior.
-rw-r--r-- | boto/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/boto/utils.py b/boto/utils.py index 242ad7ec..ed782b85 100644 --- a/boto/utils.py +++ b/boto/utils.py @@ -1107,7 +1107,10 @@ def get_utf8able_str(s, errors='strict'): This method is similar to six's `ensure_str()`, except it also makes sure that any bytes passed in can be decoded using the - utf-8 codec (and raises a UnicodeDecodeError if not). + utf-8 codec (and raises a UnicodeDecodeError if not). If the + object isn't a string, this method will attempt to coerce it + to a string with `str()`. Objects without `__str__` property + or `__repr__` property will raise an exception. """ if not isinstance(s, (six.text_type, six.binary_type)): s = str(s) |