More string module migrations

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-01-15 00:23:35 +00:00
parent 56d3350d72
commit 5c07db1928
6 changed files with 16 additions and 19 deletions

View File

@@ -35,7 +35,7 @@
// Import some definitions of other classes, etc.
%import _defs.i
%pragma(python) code = "import string"
%pragma(python) code = "import wx"
//---------------------------------------------------------------------------
@@ -762,17 +762,17 @@ public:
%pragma(python) addtoclass = "
def __add__(self, other):
if string.find(other.this, 'wxTimeSpan') != -1:
if isinstance(other, wxTimeSpanPtr):
return self.__add__TS(other)
if string.find(other.this, 'wxDateSpan') != -1:
if isinstance(other, wxDateSpanPtr):
return self.__add__DS(other)
raise TypeError, 'Invalid r.h.s. type for __add__'
def __sub__(self, other):
if string.find(other.this, 'wxDateTime') != -1:
if isinstance(other, wxDateTimePtr):
return self.__sub__DT(other)
if string.find(other.this, 'wxTimeSpan') != -1:
if isinstance(other, wxTimeSpanPtr):
return self.__sub__TS(other)
if string.find(other.this, 'wxDateSpan') != -1:
if isinstnace(other, wxDateSpanPtr):
return self.__sub__DS(other)
raise TypeError, 'Invalid r.h.s. type for __sub__'
"