diff webcalc/webcalc.py @ 1:12ac99c240ca default tip

* add documentation * add 1..10 autostep feature * bump version
author Jeff Hammel <k0scist@gmail.com>
date Wed, 10 Mar 2010 17:48:11 -0500
parents 1eea6356d2e5
children
line wrap: on
line diff
--- a/webcalc/webcalc.py	Mon Sep 07 15:09:03 2009 -0400
+++ b/webcalc/webcalc.py	Wed Mar 10 17:48:11 2010 -0500
@@ -129,7 +129,13 @@
                 continue
             except ValueError:
                 pass
-            start, step, end = token.split('..')
+            count = token.count('..')
+            assert count in set([1,2])
+            if count == 1:
+                start, end = token.split('..')
+                step = 1.0
+            else: # count == 2
+                start, step, end = token.split('..')
             start = float(start)
             step = float(step)
             end = float(end)