From a0c711c0d2995d41252477d180dba7e6aa4bec79 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 11 Mar 2003 19:45:01 +0000 Subject: [PATCH] Make _DeprecatedNonBool a little more friendly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_extras.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index d3b1e018c7..7889be9640 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -642,7 +642,10 @@ class _DeprecatedNonBool: 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')