Merge pull request #28562 from SSaishruthi:update_doc_may9
PiperOrigin-RevId: 247640792
This commit is contained in:
commit
877db42f49
@ -356,6 +356,18 @@ class DeviceSpecV2(object):
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
|
"""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.
|
||||||
|
Return `False` otherwise.
|
||||||
|
"""
|
||||||
return (isinstance(other, self.__class__) and
|
return (isinstance(other, self.__class__) and
|
||||||
self.to_string() == other.to_string())
|
self.to_string() == other.to_string())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user