class AverageList(array.array):

    def __new__(cls, *args, **kw):
        return array.array.__new__(cls, 'd')

def __init__(self, values=()):
    self.extend(values)

def __repr__(self):
    if not len(self):
        return 'Empty'
return repr(math.fsum(self) / len(self))
Subclass Python list to Validate New Items