utils.py
changeset 10690 c6290d727c0c
parent 10689 49a62b8f6d43
child 10691 af266f27c4d5
--- a/utils.py	Wed Sep 16 15:17:42 2015 +0200
+++ b/utils.py	Wed Sep 16 15:50:42 2015 +0200
@@ -226,9 +226,11 @@
         self.tracewrites = tracewrites
         super(UStringIO, self).__init__(*args, **kwargs)
 
-    def __nonzero__(self):
+    def __bool__(self):
         return True
 
+    __nonzero__ = __bool__
+
     def write(self, value):
         assert isinstance(value, text_type), u"unicode required not %s : %s"\
                                      % (type(value).__name__, repr(value))