]> granicus.if.org Git - python/commitdiff
get_payload(): Document that calling it with no arguments returns a
authorBarry Warsaw <barry@python.org>
Wed, 11 Sep 2002 14:11:35 +0000 (14:11 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 11 Sep 2002 14:11:35 +0000 (14:11 +0000)
reference to the payload.

Lib/email/Message.py

index 326d0b82f2910ba86edc7c4dba0db8727f152732..c018ae702bd42fd3acec7eb12080461b1f1f7cc5 100644 (file)
@@ -150,8 +150,10 @@ class Message:
             self._payload.append(payload)
 
     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 decode is a flag indicating whether the payload should be
@@ -180,7 +182,6 @@ class Message:
         # unchanged.
         return payload
 
-
     def set_payload(self, payload, charset=None):
         """Set the payload to the given value.