diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2010-01-29 18:48:02 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2010-01-29 18:48:02 (GMT) |
commit | da3c83800dafe0c9d3cab46cede1fe02cfb66802 (patch) | |
tree | 6dd6b90abc3b8e71a5079b2aed63fbff77e715dc /taproject.py | |
parent | 2c3095f9d3b0f2bc6377112a55113bf5c3b0029f (diff) |
ifelse
Diffstat (limited to 'taproject.py')
-rw-r--r-- | taproject.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/taproject.py b/taproject.py index f0fb314..298f281 100644 --- a/taproject.py +++ b/taproject.py @@ -174,7 +174,13 @@ def load_block(tw, b): if type(btype) == type((1,2)): btype, value = btype if btype in CONTENT_BLOCKS: - values = [value] + if btype == 'number': + try: + values = [int(value)] + except ValueError: + values = [float(value)] + else: + values = [value] else: values = [] |