Help with ASCII (UNIX<->DOS)
Peter Hansen
peter at engcorp.com
Wed Sep 26 23:02:55 EDT 2001
Jeff Shannon wrote:
>
> "CeK!" wrote:
> > <...>
> > typ, data = M.fetch(num, '(RFC822)')
> > WriteEmail('%s\n' % (data[0][1]))
> > <...>
> >
> > def WriteEmail(Uname,EData):
>
> <...>
>
> I don't know about any other problems, but it looks like you're defining
> WriteEmail to take two arguments, but you're only calling it with one --
> '%s\n' % data[0][1] (the inner parens are unnecessary) resolves into a
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But nice style, given that it means any time the format string has
another item added to it (extremely comment situation), one can just
add a comma and the next item, rather than having to remember to add
parentheses, and figure out where to place them.
And there'd be nothing wrong with (data[0][1], ) either...
--
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com
More information about the Python-list
mailing list