# HG changeset patch # User Paul Boddie # Date 1351448423 -3600 # Node ID b57d8f474bf628d1c3c7c4dbb712e84e6ffa25b7 # Parent 408d78d241c2764e825c932a75c38f2d7e429e47 Added docstrings for the Message class. diff -r 408d78d241c2 -r b57d8f474bf6 MoinMessage.py --- a/MoinMessage.py Sun Oct 21 18:41:38 2012 +0200 +++ b/MoinMessage.py Sun Oct 28 19:20:23 2012 +0100 @@ -26,6 +26,13 @@ self.updates = [] def add_update(self, alternatives): + + """ + Add an update fragment to a message, providing alternative forms of the + update content in the given 'alternatives': a list of MIME message + parts, each encoding the content according to different MIME types. + """ + if len(alternatives) > 1: part = MIMEMultipart() for alternative in alternatives: @@ -35,6 +42,9 @@ self.updates.append(alternatives[0]) def get_payload(self): + + "Get the multipart payload for the message." + if len(self.updates) == 1: message = self.updates[0] else: