From: Michael Orlitzky Date: Wed, 16 Sep 2009 03:05:48 +0000 (-0400) Subject: Added the is_negative_float() method to the StringUtils module. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=44a6a85dbbe51a3e16521be262fba5a291d3c7cf;p=dead%2Fcensus-tools.git Added the is_negative_float() method to the StringUtils module. --- diff --git a/src/StringUtils.py b/src/StringUtils.py index dcb16c1..96e07ea 100644 --- a/src/StringUtils.py +++ b/src/StringUtils.py @@ -12,3 +12,7 @@ def is_float(s): return True except: return False + + +def is_negative_float(s): + return (is_float(s) and (float(s) < 0.0))