def __eq__(self, other):
if not isinstance(other, LocationDescriptor):<EOL><INDENT>return False<EOL><DEDENT>nbr_of_sub_locations = self.nbr_of_sub_locations()<EOL>if nbr_of_sub_locations != other.nbr_of_sub_locations():<EOL><INDENT>return False<EOL><DEDENT>for i in range(nbr_of_sub_locations):<EOL><INDENT>if self._locations_list[i] != other._locations_list[i]:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Detect if another object is equal to this :class:`LocationDescriptor` object.

Args:
    other: object to test.