"David M. Cooke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Pete Havens" <[EMAIL PROTECTED]> writes: > > > The is awesome! Thanks. I did notice one thing while reading it. In the > > "File Object" section, it states: > > > > "Created with built-in functions open() [preferred] or its alias > > file()." > > > > ...this seems to be the opposite of the Python documentation: > > > > "The file() constructor is new in Python 2.2. The previous spelling, > > open(), is retained for compatibility, and is an alias for file()." > > Except if you look at the current development docs > (http://www.python.org/dev/doc/devel/lib/built-in-funcs.html) it says > > """ > The file() constructor is new in Python 2.2 and is an alias for > open(). Both spellings are equivalent. The intent is for open() to > continue to be preferred for use as a factory function which returns a > new file object. The spelling, file is more suited to type testing > (for example, writing "isinstance(f, file)"). > """ > > ... which more accurately reflects what I believe the consensus is > about the usage of open vs. file. > > -- > |>|\/|< > /--------------------------------------------------------------------------\ > |David M. Cooke > |cookedm(at)physics(dot)mcmaster(dot)ca
Still the word "open" sounds too general if the meaning is "open a file-like object"; OTOH this could be a good thing if in some future version "open('http://www.python.org')" was e.g. an alias to urllib2.urlopen. George -- http://mail.python.org/mailman/listinfo/python-list