[Python-Dev] file() or open()?
orbitz
orbitz at ezabel.com
Wed Jul 7 02:43:05 CEST 2004
I have always used open() myself. does this mean we should continue to
use open()? I only use it because that is what I first started using
and don't know any better.
Guido van Rossum wrote:
>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. While open() and file() are currently
>aliases for the same object, this may not always be the case (it
>certainly wasn't always the case :-). In the future, I could see
>open() become a factory function again that could return an instance
>of a different class depending on the mode argument, the default
>encoding for files, or who knows what; but file will always remain a
>class.
>
>--Guido van Rossum (home page: http://www.python.org/~guido/)
>_______________________________________________
>Python-Dev mailing list
>Python-Dev at python.org
>http://mail.python.org/mailman/listinfo/python-dev
>Unsubscribe: http://mail.python.org/mailman/options/python-dev/orbitz%40drorbitz.ath.cx
>
>
>
More information about the Python-Dev
mailing list