def pow(a,b):
    """
    Takes the elements of a and raises them to the b-th power
    """
    try:
        return vector(map(lambda x: x**b, a))
    except:
        try:
		return vector(map(lambda x,y: x**y, a, b))
	except:
		raise TypeError, 'vector::FAILURE in pow'

    Takes the elements of a and raises them to the b-th power
    
recipes/Python/52272_vector_list_based_vector_class_supporting/recipe-52272.py