[Tutor] Re: FTP Question

alan.gauld@bt.com alan.gauld@bt.com
Fri, 14 Jun 2002 17:05:50 +0100


> specifically closed it), and when this much more experienced and 
> knowledgeable person reviewed my code, he wrote:
> 
> The following code:
>         f = open(HTML_template_file, 'r')
>         HTML_data = f.read()
>         f.close()
>  could just as easily be replace with:
>          f = open(HTML_template_file[, 'r']).read()
>  Matter of personal preference, I guess.

Then he was wrong... it should be:

          HTML_data = open(HTML_template_file[, 'r']).read()

and I assume the [, 'r'] bit is just to show its optionality...

Personally I use the specific assignment but I do suspect 
thats just left over paranoia from my C/C++ days :-)

Alan g.