Talin <[EMAIL PROTECTED]> writes: > It seems to me that no matter how you slice it, you can't have an > abstract "buffering" layer that is independent of both the layer > beneath and the layer above.
I think buffering makes sense as the topmost layer, and typically only there. Encoding conversion and newline conversion should be performed a block at a time, below buffering, so not only I/O syscalls, but also invocations of the recoding machinery are amortized by buffering. Buffering comes in separate byte and character flavors. Placing buffering below that makes sense only in cases we want to decode as little bytes as possible at a time (accepting the slowdown of encoding one character at a time, but avoiding a syscall per character). I'm not sure whether this is ever necessary. Finding the end of HTTP headers can be done before conversion to text. -- __("< Marcin Kowalczyk \__/ [EMAIL PROTECTED] ^^ http://qrnik.knm.org.pl/~qrczak/ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com