diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-09-15 19:39:59 -0700 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-09-15 19:39:59 -0700 |
| commit | acc164568a215c3c5e2363855f712291b2a459e1 (patch) | |
| tree | f91454aca1de19dadc61cd892a5b4fa72c7ac32d /Param/Float | |
| parent | 7d0116ba389e061bd609cc999f1c993b7344cf55 (diff) | |
more oop
Diffstat (limited to 'Param/Float')
| -rw-r--r-- | Param/Float/.__init__.py | 0 | ||||
| -rw-r--r-- | Param/Float/__init__.py | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Param/Float/.__init__.py b/Param/Float/.__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Param/Float/.__init__.py diff --git a/Param/Float/__init__.py b/Param/Float/__init__.py new file mode 100644 index 0000000..e18fab4 --- /dev/null +++ b/Param/Float/__init__.py @@ -0,0 +1,11 @@ +from Param import Param + +def ParamFloat(Param): + def __init__(self, value, classname=""): + self._classname = classname + super(ParamFloat).__init__() + try: + self.value = float(value) + except Exception as e: + self.err_warn("Not a float: %s" % str(value)) + self.err_warn(str(e)) |
