On 11/24/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
> tomer filiba wrote:
>
> > back in the day, we said all stream objects would support read() and
> > write(), and streams with limited functionality (readonly, writeonly) would
> > be "queriable" using the following properties:
> > * writable
> > * readable
> > * seekable
>
> Is that really necessary? I can't remember ever writing
> code that didn't already know what kind of stream it
> was expecting.

Agreed that for the distinction between readable/writable it's pretty
silly, and probably just encourages LBYL code ("if not f.readable:
raise IOError;; f.read(...)" :-). But I've written plenty of code that
could make good use of seekability but was able to do without it if
necessary, and I suspect I'm not the only one.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to