How would you open this file?

Dave Hansen iddw at hotmail.com
Thu Feb 23 18:51:46 EST 2006


On Thu, 23 Feb 2006 18:01:32 -0500 in comp.lang.python, Kent Johnson
<kent at kentsjohnson.com> wrote:

[...]
>
>filename = open_file()
>
>By the way 'filename' is a pretty bad name, since it contains a file 
>object, not a string. Maybe call it f instead. ('file' is also a bad 
>name because it is the name of a Python built-in function.)

I write a lot of simple scripts.  Those that have input and/or output
files tend to call them infile and outfile.  Given the name of the
OP's file, perhaps optfile would work for him...

Regards,
                                        -=Dave

-- 
Change is inevitable, progress is not.



More information about the Python-list mailing list