equals method

On this page

equals

Compares the bounds with another rectangle.

def equals(self, other):
    ...
Parameter Type Description
other Rectangle The rectangle to compare with.

Returns: bool: True when position and size match; otherwise False.

equals

Compares this rectangle with another object.

def equals(self, obj):
    ...
Parameter Type Description
obj Any The object to compare with.

Returns: bool: True when obj is a matching Rectangle; otherwise False.

Aliases

These names call equals too, limited to the overloads listed.

Alias Accepts
equals_rectangle equals_rectangle(other)
equals_object equals_object(obj)

See Also

On this page