The Python 2.x documentation says it all :
When opening a file, it is preferable to use open() instead of calling this constructor [ file() ] directly. file more suitable for type testing (for example, the notation isinstance(f, file) ).
In Python 3.x, file no longer available.
source share