Re: DO NOT USE file()

2006-05-20 Thread Aahz
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: >"Tim Peters" <[EMAIL PROTECTED]> writes: >> [John Salerno, on the difference between `open` and `file`] >>> >>> Interesting. What is the difference between them now? >> >> In 2.5 `file` is unchanged but `open` becomes a functi

file() and open() separate in Python 2.5 (was: Re: DO NOT USE file())

2006-05-19 Thread Ben Finney
"Tim Peters" <[EMAIL PROTECTED]> writes: > [John Salerno, on the difference between `open` and `file`] > > Interesting. What is the difference between them now? > > In 2.5 `file` is unchanged but `open` becomes a function: > > >>> file > > >>> open > In that case I'll happily use 'file()', si

Re: DO NOT USE file() (was Re: altering an object as you iterate over it?)

2006-05-19 Thread Tim Peters
[Tim Peters] >> In 2.5 `file` is unchanged but `open` becomes a function: >> >> >>> file >> >> >>> open >> [Paul Rubin] > So which one are we supposed to use? Use for what? If you're trying to check an object's type, use the type; if you're trying to open a file, use the function. >>> type(op

Re: DO NOT USE file() (was Re: altering an object as you iterate over it?)

2006-05-19 Thread Paul Rubin
"Tim Peters" <[EMAIL PROTECTED]> writes: > In 2.5 `file` is unchanged but `open` becomes a function: > > >>> file > > >>> open > So which one are we supposed to use? -- http://mail.python.org/mailman/listinfo/python-list

Re: DO NOT USE file() (was Re: altering an object as you iterate over it?)

2006-05-19 Thread John Salerno
Tim Peters wrote: > [John Salerno, on the difference between `open` and `file`] >> Interesting. What is the difference between them now? > > In 2.5 `file` is unchanged but `open` becomes a function: > file > open > So they are still used in the same way though? -- http://mail.python

Re: DO NOT USE file() (was Re: altering an object as you iterate over it?)

2006-05-19 Thread Tim Peters
[John Salerno, on the difference between `open` and `file`] > Interesting. What is the difference between them now? In 2.5 `file` is unchanged but `open` becomes a function: >>> file >>> open -- http://mail.python.org/mailman/listinfo/python-list

Re: DO NOT USE file() (was Re: altering an object as you iterate over it?)

2006-05-19 Thread John Salerno
Aahz wrote: > Python 2.5a2 (trunk:46052, May 19 2006, 19:54:46) > [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. open is file > False > > Per the other comments in this thread, Guido agreed that mak

DO NOT USE file() (was Re: altering an object as you iterate over it?)

2006-05-19 Thread Aahz
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: >Paul McGuire wrote: >> >> 1. open("xxx") still works - not sure if it's even deprecated or not - but >> the new style is to use the file class > >Python 2.3.4 (#4, Oct 25 2004, 21:40:10) >[GCC 3.3.2 (Mandrake Linux 10.0 3.3.