Alan Gauld wrote:
> And file has been removed again in Python v3....
In fact open is now an alias for io.open and no longer simply returns
a file object - in fact the file type itself is gone too!
A pity, there are cases where I found file() more intuitive than
open and vice versa so liked having both available. The fact that it
looked like creating an instance of a class seemed to fit well
in OO code.
But having both of them is a violation of "There should be one-- and
preferably only one --obvious way to do it."
I think python's duck typing culture makes it very rare that you want to
test whether a file is an impostor.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor