This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Word "alias" used in confusing way to compare open() and file()
Type: enhancement Stage:
Components: Documentation Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: Devin Jeanpierre, christian.heimes, georg.brandl, gvanrossum, loewis, nnorwitz, orsenthil, vmlinuz
Priority: low Keywords:

Created on 2007-12-27 04:28 by Devin Jeanpierre, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg59007 - (view) Author: Devin Jeanpierre (Devin Jeanpierre) * Date: 2007-12-27 04:28
I was slightly misled by the wording of part of the docs 
(http://docs.python.org/lib/bltin-file-objects.html):
"file() is new in Python 2.2. The older built-in open() is an alias 
for file()."

I actually thought it meant that open was an alias of file, so 
that 'open is file'. However, 
>>> open is file
False

I feel that "alias" is the wrong word to use here, though I don't know 
a suitable replacement.
msg59010 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2007-12-28 00:04
> I feel that "alias" is the wrong word to use here, though I don't know 
> a suitable replacement.

Should we say, "The older built-in open() serves the same purpose as file."
msg59044 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-12-30 16:27
Notice that file *was* open up to Python 2.4; this was changed with
#1479181 - so "open" is newer than file, in a sense. Assigning to Neal,
who committed the original change.
msg59046 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-12-30 17:52
open() is preferred over file(), too. In Python 2.5 open() returns a
file instance but in 3.0 file is removed.
msg59080 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-01-02 02:43
Looks like a doc change that Georg could easily apply.
msg59387 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-06 15:43
I had already cleaned this up in the trunk.
History
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 46043
2008-01-06 15:43:52georg.brandlsetstatus: open -> closed
resolution: out of date
messages: + msg59387
2008-01-02 02:43:56gvanrossumsetpriority: low
assignee: nnorwitz -> georg.brandl
messages: + msg59080
nosy: + georg.brandl, gvanrossum
2007-12-30 17:52:39christian.heimessetnosy: + christian.heimes
messages: + msg59046
2007-12-30 16:27:21loewissetassignee: nnorwitz
messages: + msg59044
nosy: + nnorwitz, loewis
2007-12-28 00:04:04orsenthilsetnosy: + orsenthil
messages: + msg59010
2007-12-27 04:31:55vmlinuzsetnosy: + vmlinuz
2007-12-27 04:28:40Devin Jeanpierrecreate