(rectangles)
return rectangles.pop(j)
Find a rectangle of minimum area for bisection.
Find a rectangle of minimum area for bisection.
Find a rectangle of minimum area for bisection .
def _depth_first_select(rectangles):
    """Find a rectangle of minimum area for bisection. """
    min_area, j = None, None

    for i, (_, (u, v), (s, t), _, _, _, _) in enumerate(rectangles):
        area = (s - u)*(t - v)

        if min_area is None or area < min_area:
            min_area, j = area, i

    return rectangles.pop(j)
def _depth_first_select ( rectangles ) : min_area , j = None , None for i , ( _ , ( u , v ) , ( s , t ) , _ , _ , _ , _ ) in enumerate ( rectangles ) : area = ( s - u ) * ( t - v ) if min_area is None or area < min_area : min_area , j = area , i return rectangles . pop ( j )