open is not obsolete (was Re: understanding self
jeff at ccvcorp.com
Thu Jul 8 03:37:56 CEST 2004
Ville Vainio wrote:
>>>>>>"Jeff" == Jeff Shannon <jeff at ccvcorp.com> 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...
More information about the Python-list