file() and open() separate in Python 2.5 (was: Re: DO NOT USE file())

Ben Finney bignose+hates-spam at benfinney.id.au
Sat May 20 01:53:34 EDT 2006


"Tim Peters" <tim.peters at gmail.com> writes:

> [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>

In that case I'll happily use 'file()', since it meshes nicely with
creating a new instance of any built-in type.

-- 
 \        "None can love freedom heartily, but good men; the rest love |
  `\                        not freedom, but license."  -- John Milton |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list