equals method
Leave feedback
On this page
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.
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.
These names call equals too, limited to the overloads listed.
| Alias | Accepts |
|---|---|
equals_rectangle |
equals_rectangle(other) |
equals_object |
equals_object(obj) |
- class
Rectangle
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.