def fringe8(xxx_todo_changeme, xxx_todo_changeme1):
    (px, py) = xxx_todo_changeme
    (x1, y1, x2, y2) = xxx_todo_changeme1
    f = [(px + dx, py + dy) for dx, dy in itertools.product((-1, 0, 1),
        repeat=2) if not dx == dy == 0]
f_inrange = [(fx, fy) for fx, fy in f if x1 <= fx < x2 and y1 <= fy < y2]
return f_inrange
Как можно улучшить эту многословную, не питоническую рутину?