[Tutor] Smtplib module

Sheila King sheila@thinkspot.net
Sat, 20 Oct 2001 18:47:15 -0700


On Sun, 21 Oct 2001 11:23:26 +1000, "Glen Wheeler" <wheelege@tsn.cc>
wrote about Re: [Tutor] Smtplib module:

:>>> d = ['1', 2, 3]
:>>> print d
:['1', 2, 3]
:>>> print str(d)
:['1', 2, 3]
:>>> d = {1:2, 3:4}
:>>> print d
:{3: 4, 1: 2}
:>>> print str(d)
:{3: 4, 1: 2}
:>>>

OH! You know what...I don't actually use the "print" command in the code
where I use this technique. I use a command like

f.write(response)

where f is an opened file object. So, in that case I DO have to convert
response to a string. With print, of course, it doesn't matter.

:  Just having a quick squiz at the doc's reveals "If this method does not
:throw an exception, it returns a dictionary, with one entry for each
:recipient that was refused.".  So if it throws an exception, look in the
:docs to find otu more about it, if not then you will get a dict back for
:each one which was refused.

No, it returns a SINGLE dictionary with an entry for each recipient that
was refused, not a dict for each one that was refused. Read the quote
you just wrote.

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/