Ugh, and in pointing our your inaccurate code I posted my own:

> >>> f = open('dummy.txt','w')
> >>> f.write(line = 'this doesn't work')
>
>   File "<stdin>", line 1
>     f.write(line = 'this doesn't work')
>                                ^
> SyntaxError: invalid syntax

That should be:

>>> f.write(line = "this doesn't work")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: write() takes no keyword arguments

Sorry about that :)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to