open is not obsolete (was Re: understanding self

Jeff Shannon jeff at
Thu Jul 8 03:37:56 CEST 2004

Ville Vainio wrote:

>>>>>>"Jeff" == Jeff Shannon <jeff at> writes:
>    Jeff> But wait -- open() is an obsolete built-in function for
>    Jeff> opening a file.  Which should eye.blink() do -- open and
>    Jeff> close the right eye, or
>I'll just like to point out that open() is in no way obsolete, even if
>it's aliased to "file". ItÃ's probably intop 5% of builtins in terms
>of frequency in existing code, so deprecating it would deprecate
>pretty much all the existing python code.
>IÃ'm sure äll see "print" being deprecated before "open".

Okay, perhaps "legacy" is a better term than "obsolete".  In either 
case, it's recommended that it not be used in new code, even if there is 
no current plan to remove it.  Not that the specifics of this case are 
particularly germane to the point I was making...

Jeff Shannon
Credit International

More information about the Python-list mailing list