DO NOT USE file() (was Re: altering an object as you iterate over it?)

Tim Peters tim.peters at
Sat May 20 06:33:20 CEST 2006

[John Salerno, on the difference between `open` and `file`]
> Interesting. What is the difference between them now?

In 2.5 `file` is unchanged but `open` becomes a function:

>>> file
<type 'file'>
>>> open
<built-in function open>

More information about the Python-list mailing list