Simplify some redundant code

This commit is contained in:
Salvo 'LtWorf' Tomaselli 2015-11-06 15:26:26 +01:00
parent b5dfeaa629
commit 643adf4d0a

View File

@ -60,10 +60,7 @@ class Rstring (str):
the following regexp: the following regexp:
r'^[\+\-]{0,1}[0-9]+$' r'^[\+\-]{0,1}[0-9]+$'
''' '''
if Rstring.int_regexp.match(self) is None: return Rstring.int_regexp.match(self) is not None
return False
else:
return True
def isFloat(self): def isFloat(self):
'''Returns true if the string represents a float number '''Returns true if the string represents a float number
@ -71,10 +68,7 @@ class Rstring (str):
the following regexp: the following regexp:
r'^[\+\-]{0,1}[0-9]+(\.([0-9])+)?$' r'^[\+\-]{0,1}[0-9]+(\.([0-9])+)?$'
''' '''
if Rstring.float_regexp.match(self) is None: return Rstring.float_regexp.match(self) is not None
return False
else:
return True
def isDate(self): def isDate(self):
'''Returns true if the string represents a date, '''Returns true if the string represents a date,