testing/nose: Restructure to split out examples
[swc-testing-nose.git] / testing / nose / exercises / mean / exceptions / mean.py
1 def mean(numlist):
2     try :
3         total = sum(numlist)
4         length = len(numlist)
5     except TypeError :
6         raise TypeError("numlist was not a list of numbers.")
7     except :
8         print "Something unknown happened with the list."
9     return total/length