[molecule] GenericSpecFunctions: add valid_integer()

This commit is contained in:
Fabio Erculiani
2010-08-01 22:47:33 +02:00
parent 0495f25a81
commit b68e6dfd45
+7
View File
@@ -28,6 +28,13 @@ class GenericSpecFunctions(object):
def ne_list(self, x):
return x
def valid_integer(self, x):
try:
int(x)
except (TypeError, ValueError,):
return False
return True
def always_valid(self, *args):
return True