diff options
| author | Tim Graham <timograham@gmail.com> | 2017-04-14 08:05:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-14 08:05:58 -0400 |
| commit | 83cbb8d080299669de3569941a40789e5d32b009 (patch) | |
| tree | e4abb98b550c1b1b6e30c418e9e5dd04c182e73b /docs/ref/utils.txt | |
| parent | 7741d4e8787809b38df970aa11df8bdad4f22dd8 (diff) | |
Fixed #28067 -- Clarified __str__() return type when using python_2_unicode_compatible().
Diffstat (limited to 'docs/ref/utils.txt')
| -rw-r--r-- | docs/ref/utils.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index c9ab5e3975..19e8361a67 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') |
