create a text file
Max Erickson
maxerickson at gmail.com
Tue May 30 17:14:28 EDT 2006
Fredrik Lundh <fredrik at pythonware.com> wrote:
> Max Erickson wrote:
>
>>> # w is for writing
>>> myfile = open('theoutfile',w)
>>
>> That won't work, the second argument to open needs to be a string:
>
> w = 'w'
>
> </F>
>
Is it inappropriate to call the w on the left side of the equal's sign
a string? I.e., w refers to a string(object) that contains 'w'?
My goal was to point out that the code would not work as posted.
max
More information about the Python-list
mailing list