def dist(a, b):
    return sum((i-j)**2 for i, j in zip(a, b))
def get_except(self, func, *args):
        try:
            func(*args)
        except Exception as detail:
            return detail.__class__, str(detail)