Commit fbcde75c authored by Barry Warsaw's avatar Barry Warsaw

get_payload(): Document that calling it with no arguments returns a

reference to the payload.
parent 51a0ae3f
...@@ -150,8 +150,10 @@ class Message: ...@@ -150,8 +150,10 @@ class Message:
self._payload.append(payload) self._payload.append(payload)
def get_payload(self, i=None, decode=0): def get_payload(self, i=None, decode=0):
"""Return the current payload exactly as is. """Return a reference to the payload.
The payload is typically either a list object or a string. If you
mutate the list object, you modify the message's payload in place.
Optional i returns that index into the payload. Optional i returns that index into the payload.
Optional decode is a flag indicating whether the payload should be Optional decode is a flag indicating whether the payload should be
...@@ -180,7 +182,6 @@ class Message: ...@@ -180,7 +182,6 @@ class Message:
# unchanged. # unchanged.
return payload return payload
def set_payload(self, payload, charset=None): def set_payload(self, payload, charset=None):
"""Set the payload to the given value. """Set the payload to the given value.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment