On 9/11/06, Greg Ewing <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > > All sorts of things are different when reading stdin vs. opening a > > filename. e.g. stdin may be a pipe. > > Which suggests that if anything is going to try > to guess the encoding, it would be better for it > to start reading from the actual stream you're > going to use and buffer the result, rather than > rely on being able to open it separately.
Right. The filename is useless. The stream may or may not be seekable (sometimes even stdin is!). Having a buffering layer in between would make it possible to peek ahead in the buffer. -- --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
