[Python-Dev] File Object Copy

Fredrik Lundh fredrik@pythonware.com
Wed, 12 Jul 2000 15:13:40 +0200

guido wrote:
> > > it's a reasonable way to make your code a bit more reusable
> > > (it's rude to expect every chunk of potentially usable data to
> > > have a filename...).
> > 
> > Of course -- that's why I think most code should use file-like objects.
> Agreed.  The quoted examples are all kludges in my book.  (The API
> designer initially accepted only a filename, then realized this was a
> bad choice, and fixed it in a backwards compatible way instead of
> fixing it right.  There are just as many examples where it's done
> right, I just can't think of any. :-)


personally, I think that inventing new method names just because
the language doesn't happen to support method overloading is a
much bigger kludge ;-)

(just like multiple inheritance, overloading can surely be abused
by overambitious designers, but *not* having it is way too limiting)

otoh, unless someone wants to remove overloading emulation from
the modules I mentioned, this is probably a bit off-topic...

cheers /F