Checks if the `other` DeviceSpec is same as the current instance, eg have same value for all the internal fields. Args: other: Another DeviceSpec Returns: Return `True` if `other` is also a DeviceSpec instance and has same value as the current instance. Retu
(self, other)
| 356 | return output |
| 357 | |
| 358 | def __eq__(self, other): |
| 359 | """Checks if the `other` DeviceSpec is same as the current instance, eg have |
| 360 | |
| 361 | same value for all the internal fields. |
| 362 | |
| 363 | Args: |
| 364 | other: Another DeviceSpec |
| 365 | |
| 366 | Returns: |
| 367 | Return `True` if `other` is also a DeviceSpec instance and has same value |
| 368 | as the current instance. |
| 369 | Return `False` otherwise. |
| 370 | """ |
| 371 | return (isinstance(other, self.__class__) and |
| 372 | self.to_string() == other.to_string()) |
| 373 | |
| 374 | def __hash__(self): |
| 375 | return self._hash |