[Python-checkins] python/dist/src/Lib/email MIMEMultipart.py, 1.3, 1.3.20.1 (original) (raw)

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Sun May 9 14:00:04 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32290

Modified Files: Tag: release23-maint MIMEMultipart.py Log Message: SF patch # 884030 by Amit Aronovitch; fixes the _subpart argument to match documented semantics.

Index: MIMEMultipart.py

RCS file: /cvsroot/python/python/dist/src/Lib/email/MIMEMultipart.py,v retrieving revision 1.3 retrieving revision 1.3.20.1 diff -C2 -d -r1.3 -r1.3.20.1 *** MIMEMultipart.py 30 Sep 2002 21:24:00 -0000 1.3 --- MIMEMultipart.py 9 May 2004 18:00:02 -0000 1.3.20.1


*** 1,4 **** ! # Copyright (C) 2002 Python Software Foundation ! # Author: barry at zope.com (Barry Warsaw)

"""Base class for MIME multipart/* type messages. --- 1,4 ---- ! # Copyright (C) 2002-2004 Python Software Foundation ! # Author: barry at python.org (Barry Warsaw)

"""Base class for MIME multipart/* type messages.


*** 12,16 **** """Base class for MIME multipart/* type messages."""

! def init(self, _subtype='mixed', boundary=None, *_subparts, **_params): """Creates a multipart/* type message.

--- 12,17 ---- """Base class for MIME multipart/* type messages."""

! def init(self, _subtype='mixed', boundary=None, _subparts=None, ! **_params): """Creates a multipart/* type message.


*** 25,29 ****

      _subparts is a sequence of initial subparts for the payload.  It

! must be possible to convert this sequence to a list. You can always attach new subparts to the message by using the attach() method.

--- 26,30 ----

      _subparts is a sequence of initial subparts for the payload.  It

! must be an iterable object, such as a list. You can always attach new subparts to the message by using the attach() method.


*** 33,37 **** MIMEBase.MIMEBase.init(self, 'multipart', _subtype, **_params) if _subparts: ! self.attach(*list(_subparts)) if boundary: self.set_boundary(boundary) --- 34,39 ---- MIMEBase.MIMEBase.init(self, 'multipart', _subtype, **_params) if _subparts: ! for p in _subparts: ! self.attach(p) if boundary: self.set_boundary(boundary)



More information about the Python-checkins mailing list