aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/message.py
diff options
context:
space:
mode:
authorGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-12-18 02:11:36 +0000
committerGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-12-18 02:11:36 +0000
commitfccb146e3fe437b0df1e9c50d4b8e1080ddb4bd9 (patch)
tree9f2d9fe0267d96a54e541377ffeada3d0bff0d1d /python/google/protobuf/message.py
parentd5cf7b55a6a1f959d1646785f63ca2b62da78079 (diff)
Massive roll-up of changes. See CHANGES.txt.
Diffstat (limited to 'python/google/protobuf/message.py')
-rwxr-xr-xpython/google/protobuf/message.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/python/google/protobuf/message.py b/python/google/protobuf/message.py
index 9a88bdc8..f8398474 100755
--- a/python/google/protobuf/message.py
+++ b/python/google/protobuf/message.py
@@ -99,7 +99,7 @@ class Message(object):
Args:
other_msg: Message to copy into the current one.
"""
- if self == other_msg:
+ if self is other_msg:
return
self.Clear()
self.MergeFrom(other_msg)
@@ -108,6 +108,15 @@ class Message(object):
"""Clears all data that was set in the message."""
raise NotImplementedError
+ def SetInParent(self):
+ """Mark this as present in the parent.
+
+ This normally happens automatically when you assign a field of a
+ sub-message, but sometimes you want to make the sub-message
+ present while keeping it empty. If you find yourself using this,
+ you may want to reconsider your design."""
+ raise NotImplementedError
+
def IsInitialized(self):
"""Checks if the message is initialized.