In article <[EMAIL PROTECTED]>, Martin v. Löwis wrote: > In any case, it doesn't matter what encoding the document is in: > read(2) always returns two bytes.
It returns *up to* two bytes. Sorry to be picky but I think it's relevant to the topic because it illustrates how it's difficult to change the definition of file.read() to return characters instead of bytes (if the file is ready to read, there will always be one or more bytes available (or EOF), but there won't always be one or more characters available). -- http://mail.python.org/mailman/listinfo/python-list