summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-04-14 08:05:58 -0400
committerTim Graham <timograham@gmail.com>2017-04-14 08:06:24 -0400
commit9a93c1a394f4bab9f91f29005d9a042907e13de8 (patch)
tree0a42f49b23fbcf442d0167368c260c36c70e75f5 /docs
parenta14af7f1bb1e990e82df93da19e50859e9cd2398 (diff)
[1.11.x] Fixed #28067 -- Clarified __str__() return type when using python_2_unicode_compatible().
Backport of 83cbb8d080299669de3569941a40789e5d32b009 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/utils.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 18561781c1..6ab00cc9c7 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -199,7 +199,8 @@ The functions defined in this module share the following properties:
Python 2. Under Python 3 it does nothing.
To support Python 2 and 3 with a single code base, define a ``__str__``
- method returning text and apply this decorator to the class.
+ method returning text (use ``six.text_type()`` if you're doing some
+ casting) and apply this decorator to the class.
.. function:: smart_text(s, encoding='utf-8', strings_only=False, errors='strict')