Kaydet (Commit) 83cbb8d0 authored tarafından Tim Graham's avatar Tim Graham Kaydeden (comit) GitHub

Fixed #28067 -- Clarified __str__() return type when using python_2_unicode_compatible().

üst 7741d4e8
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment