diff --git a/wxPython/src/mac/wx.py b/wxPython/src/mac/wx.py index c3e2bb5cc4..7c619bf625 100644 --- a/wxPython/src/mac/wx.py +++ b/wxPython/src/mac/wx.py @@ -1603,6 +1603,12 @@ class _DeprecatedNonBool: import warnings warnings.warn("Use Python's %s instead" % self.__txt, DeprecationWarning, 3) return self.__val + def __nonzero__(self): + return self.__int__() + def __repr__(self): + if self.__val: text = "True" + else: text = "False" + return "_DeprecatedNonBool: %s" % text TRUE = true = _DeprecatedNonBool(True, 'True') FALSE = false = _DeprecatedNonBool(False, 'False')