On Mon, Aug 8, 2011 at 12:26 PM, Chris Angelico <ros...@gmail.com> wrote:
> On Mon, Aug 8, 2011 at 5:08 PM, Verde Denim <tdl...@gmail.com> wrote: > > and it returns - > > "TypeError" with no other information... > > It appears to be generated from the line > > > > msg = ("From: %s\r\nTo: %s\r\n\r\n" > > % (fromaddr, ", ".join(toaddrs))) > > > > But I'm not sure why... > > > > I transcribed pieces manually from your code into Python 2.4.5 and > didn't get an error. What did you enter at the From: and To: prompts? > > I'm running 2.6.5 on a debian base... It didn't seem to matter what is input - I tried using a single recipient as well as multiples (separated by comma). Output appears as - # python send_my_msg.py From: m...@me.com To: y...@you.com Enter Message, end with ^D: Traceback (most recent call last): File "send_my_msg.py", line 12, in <module> % (fromaddr, ", ".join(toaddr))) TypeError > As a side point: Does anyone else feel that it's potentially confusing > to have a function whose parameter has the same name as the function > itself? This is straight from the example. > > ChrisA > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list