def mean(enum, count=0, sum=0):
    """returns the mean of enumeration enum, 
       count and sum are initial counts and the initial sum.
       This works for enumerations, even where len() is not defined"""
    for e in enum:
        count += 1
        sum += e
    return sum / count
