newbie file writing
Steve Holden
sholden at bellatlantic.net
Tue Mar 7 10:55:09 EST 2000
Adrian Eyre wrote:
>
[Original code giving TypeError]
> Change it to something like:
>
> tempinbox = server.retr(numMsgs)
> if not tempinbox is None:
> assert type(tempinbox) == type("")
> open('inbox', 'w').write(tempinbox)
>
> -----------------------------------------------------------------
> Adrian Eyre <a.eyre at optichrome.com> - http://www.optichrome.com
It would be more readable if the test were
if tempinbox is not None:
But the logic hasn't changed at all.
regards
Steve
--
"If computing ever stops being fun, I'll stop doing it"
More information about the Python-list
mailing list