On Sun, 20 Feb 2005 14:57:14 +, rumours say that Michael Hoffman
[EMAIL PROTECTED] might have written:
[snip: use 'open' in preference to 'file']
To be honest I doubt open will be extended in this manner. I can see
the Pythoneers adding, say, a keyword argument to open to allow a URL
David M. Cooke wrote:
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
George Sakkis wrote:
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.
Exactly the reason the BDFL gave for preferring 'open' - it may be
François Pinard wrote:
[Nick Coghlan]
George Sakkis wrote:
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.
Exactly the reason the BDFL
[Michael Hoffman]
To be honest I doubt open will be extended in this manner.
I did not read Guido's arguments for a while, so I may remember them
wrongly. So, take me with a grain of salt. I would not think Guido is
arguing for the sole sake of arguing. Maybe his plans or visions will
Michael Hoffman wrote:
That said, I still use file() instead of open(). I think that:
for line in file(mytext.txt):
makes a lot more sense than:
for line in open(mytext.txt):
I guess it's because the first option sounds a lot more like English.
Call me a space-waster (or a waste of space ;-) but
François Pinard wrote:
[Michael Hoffman]
To be honest I doubt open will be extended in this manner.
I did not read Guido's arguments for a while, so I may remember them
wrongly.
No, I think you remember them the same way I do.
So, take me with a grain of salt. I would not think Guido is
arguing
Hi Pythoners,
An updated version of the Python Quick Reference is available for Python 2.4
at http://rgruet.free.fr/#QuickRef.
It is a single looonnng html page (30 printed A4 pages) with a choice of 4
different CSS styles; also available in PDF.
Richard
--
Richard Gruet wrote:
Hi Pythoners,
An updated version of the Python Quick Reference is available for Python 2.4
at http://rgruet.free.fr/#QuickRef.
It is a single looonnng html page (30 printed A4 pages) with a choice of 4
different CSS styles; also available in PDF.
Richard
Great news; thanks
On Sat, 19 Feb 2005 13:00:59 +0100, Richard Gruet
[EMAIL PROTECTED] wrote:
Hi Pythoners,
An updated version of the Python Quick Reference is available for Python 2.4
at http://rgruet.free.fr/#QuickRef.
It is a single looonnng html page (30 printed A4 pages) with a choice of 4
different CSS
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
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()
12 matches
Mail list logo