open() is alive and well (Re: open is not obsolete)

Jeff Shannon jeff at ccvcorp.com
Thu Jul 8 20:18:47 CEST 2004


Greg Ewing wrote:

> Jeff Shannon wrote:
>
>> Okay, perhaps "legacy" is a better term than "obsolete".  In either 
>> case, it's recommended that it not be used in new code
>
>
> In a recent exchange on python-dev, Guido has made it clear
> that this is NOT the case -- he wants people to continue
> using open(), since it might not remain a synonym for
> file() in the future. He has acknowledged that the
> documentation needs clarification on this.


Okay, I was following the implication in the documentation, and IIRC 
some conversation I'd seen (presumably based off of that same 
implication).  This thread is the first indication I've seen since 
Python 2.2 came out that file() *wasn't* the preferred way to open 
files... (Not that I've even been following *this* newsgroup steadily in 
that time.)  I'll keep this in mind from now on. 

(But preferences regarding file() and open() are *still* not germane to 
the point I was making about explicit 'self'. ;) )

Jeff Shannon
Technician/Programmer
Credit International




More information about the Python-list mailing list