Re: Creating a new file object; open() vs file()

2006-05-20 Thread Fredrik Lundh
Ben Finney wrote: >> I see what you mean, but I think that's why I like using open, >> because I like having my functions be verbs instead of nouns. > > Note though that you're calling a class (in this case, type) > constructor, to return a new object. no, he's calling a factory function to get

Creating a new file object; open() vs file() (was: Re: altering an object as you iterate over it?)

2006-05-19 Thread Ben Finney
John Salerno <[EMAIL PROTECTED]> writes: > Paul McGuire wrote: > > > I think it is just part of the objectification trend - "f = > > open('xyzzy.dat')" is sort of a functional/verb concept, so it has > > to return something, and its something non-objecty like a file > > handle - urk! Instead, us