removes answers accidentally added. These were flotsam/jetsam from live coding in...
authorKaty Huff <katyhuff@gmail.com>
Wed, 30 Jan 2013 14:56:03 +0000 (08:56 -0600)
committerW. Trevor King <wking@tremily.us>
Fri, 1 Nov 2013 04:13:01 +0000 (21:13 -0700)
python/testing/mean.py

index e95841aac79eeb6f2e0a3c87163315cdd64cec18..7b419d6e1e869080a99431fa87c917a7ba0fb977 100644 (file)
@@ -4,8 +4,6 @@ def mean(numlist):
         length = len(numlist)
     except TypeError :
         raise TypeError("The list was not numbers.")
-    except ZeroDivisionError :
-        raise ZeroDivisionError("Does your list have elements in it?")
     except :
         print "Something unknown happened with the list."
-    return float(total)/float(length)
+    return total/length