def _coerce_rect(value):
    if isinstance(value, (list, tuple)):
        return Rect(*value)
    msg = "cannot coerce '%s' to a 'Rect'"
    raise TypeError(msg % type(value).__name__)
Coerce a value to a Rect object.
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/layout/dock_layout.py/_coerce_rect