Return given point reflected around planes in N dimensions.
There must be the same number of planes as dimensions, but the value of each
  plane may be None to indicate no reflection.

def pt_reflect(pt=(0.0, 0.0), plane=[None, None]):
    '''Return given point reflected around planes in N dimensions.
There must be the same number of planes as dimensions, but the value of each
  plane may be None to indicate no reflection.
    '''
    assert isinstance(pt, tuple)
    l_pt = len(pt)
    assert l_pt > 1
    for i in pt:
        assert isinstance(i, float)
    assert isinstance(plane, list)
    l_pl = len(plane)
    assert l_pl == l_pt
    for i in plane:
        assert isinstance(i, float) or i is None

    return tuple([pt[i] if plane[i] is None else (2*plane[i] - pt[i]) for i in range(l_pt)])