Programming Python 2E: question on smtplib example

Daniel Klein danielk at aracnet.com
Tue May 28 08:50:17 EDT 2002


On page 612 of PP2E, the example has the following line of code...

To = string.split(To, ';')   # allow a list of recipients

,,,and then a few lines down...

text = ('From: %s\nTo: %s\nDate: %s\nSubject: %s\n'
        % (From, string.join(To, ';'), date, Subj))

The question is: Why even do the split() and join() since all this seems to
do is take the 'To' variable on a round trip?

Daniel Klein
 



More information about the Python-list mailing list