| Index: third_party/protobuf/python/google/protobuf/message.py
|
| diff --git a/third_party/protobuf/python/google/protobuf/message.py b/third_party/protobuf/python/google/protobuf/message.py
|
| index f8398474f66dac34191c213461562664f35990ff..6f19f85f4fdfc5be7f2db4bbfef24371d16ebf0e 100755
|
| --- a/third_party/protobuf/python/google/protobuf/message.py
|
| +++ b/third_party/protobuf/python/google/protobuf/message.py
|
| @@ -67,6 +67,11 @@ class Message(object):
|
|
|
| DESCRIPTOR = None
|
|
|
| + def __deepcopy__(self, memo=None):
|
| + clone = type(self)()
|
| + clone.MergeFrom(self)
|
| + return clone
|
| +
|
| def __eq__(self, other_msg):
|
| raise NotImplementedError
|
|
|
| @@ -74,9 +79,15 @@ class Message(object):
|
| # Can't just say self != other_msg, since that would infinitely recurse. :)
|
| return not self == other_msg
|
|
|
| + def __hash__(self):
|
| + raise TypeError('unhashable object')
|
| +
|
| def __str__(self):
|
| raise NotImplementedError
|
|
|
| + def __unicode__(self):
|
| + raise NotImplementedError
|
| +
|
| def MergeFrom(self, other_msg):
|
| """Merges the contents of the specified message into current message.
|
|
|
| @@ -215,6 +226,9 @@ class Message(object):
|
| raise NotImplementedError
|
|
|
| def HasField(self, field_name):
|
| + """Checks if a certain field is set for the message. Note if the
|
| + field_name is not defined in the message descriptor, ValueError will be
|
| + raised."""
|
| raise NotImplementedError
|
|
|
| def ClearField(self, field_name):
|
|
|