diff options
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | documentation/index.rst | 8 |
2 files changed, 11 insertions, 0 deletions
@@ -6,6 +6,9 @@ This file lists the changes in each six version. Development version ------------------- +- Pull request #48 and issue #15: Add the `python_2_unicode_compatible` + decorator. + - Pull request #57 and issue #50: Add several compatibility methods for unittest assertions that were renamed between Python 2 and 3. diff --git a/documentation/index.rst b/documentation/index.rst index 0755043..e0ce4cc 100644 --- a/documentation/index.rst +++ b/documentation/index.rst @@ -437,6 +437,14 @@ string data in all Python versions. :class:`py3:io.BytesIO`. +.. decorator:: python_2_unicode_compatible + + A class decorator that takes a class defining a ``__str__`` method. On + Python 3, the decorator does nothing. On Python 2, it aliases the + ``__str__`` method to ``__unicode__`` and creates a new ``__str__`` method + that returns the result of ``__unicode__()`` encoded with UTF-8. + + unittest assertions >>>>>>>>>>>>>>>>>>> |