From 643adf4d0acc5dbb8cfe90c2dae4e750520a5b0d Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Fri, 6 Nov 2015 15:26:26 +0100 Subject: [PATCH] Simplify some redundant code --- relational/rtypes.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/relational/rtypes.py b/relational/rtypes.py index 90883bb..82cc72c 100644 --- a/relational/rtypes.py +++ b/relational/rtypes.py @@ -60,10 +60,7 @@ class Rstring (str): the following regexp: r'^[\+\-]{0,1}[0-9]+$' ''' - if Rstring.int_regexp.match(self) is None: - return False - else: - return True + return Rstring.int_regexp.match(self) is not None def isFloat(self): '''Returns true if the string represents a float number @@ -71,10 +68,7 @@ class Rstring (str): the following regexp: r'^[\+\-]{0,1}[0-9]+(\.([0-9])+)?$' ''' - if Rstring.float_regexp.match(self) is None: - return False - else: - return True + return Rstring.float_regexp.match(self) is not None def isDate(self): '''Returns true if the string represents a date,