[Python-Dev] file() vs open(), round 7
Fredrik Lundh
fredrik at pythonware.com
Tue Dec 27 16:51:32 CET 2005
Phillip J. Eby wrote:
> >but that was made at a time when it wasn't clear if "open" or "file" would
> >be the preferred way to open a file. now that we've settled on the verb
> >form, I think "textopen" or "opentext" would be slightly more consistent.
>
> Sorry, I'm confused. Who settled on the verb form? Are you saying Guido's
> 2002 post supports open() instead of file(), or is there some more recent
> reference to this?
see:
http://mail.python.org/pipermail/python-dev/2004-July/045921.html
"I recently saw a checkin that changed a call to open() into a call to
file(), suggesting that using file() is more "politically correct"
than open().
I'm not sure I agree with this."
http://mail.python.org/pipermail/python-dev/2004-July/045967.html
"Anyway, here's my future-proof distinction: use open() as the factory
function, and file for type-testing."
</F>
More information about the Python-Dev
mailing list