[Tutor] Problem with file()

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Mon Aug 23 03:44:29 CEST 2004



On Sun, 22 Aug 2004, Bernard Lebel wrote:

> All right, thanks everyone.
> I followed all your suggestions and it works fine.

That's wonderful!  But... err.. what was the problem?  *grin*

To tell the truth, I didn't see the actual root of the problem; did the
problem fix itself?  Oh, wait, ok, I see it now.

    http://mail.python.org/pipermail/tutor/2004-August/031431.html

So it was just the rebinding of the file() builtin!  Ok, that makes sense.


Personally, I've been using open() instead of file() in my own code.  (I
like to keep my functions as verbs.)  There was some discussion in another
thread that suggests that open() is still the preferred way to do a file
open:

    http://mail.python.org/pipermail/python-dev/2004-July/045921.html


Talk to you later!



More information about the Tutor mailing list