>>> A non-seekable stream is not all that uncommon in network processing. >> Right. But what is the relationship to XML encoding autodetection? > > It pops up whenever you need to detect the encoding of the > incoming XML data on the network connection, e.g. in XML RPC > or data upload mechanisms.
No, it doesn't. For XML-RPC, you pass the XML payload of the HTTP request to the XML parser, and it deals with the encoding. > It is also not always feasible to load all data into memory, so > some form of buffering must be used. Again, I don't see the use case. For XML-RPC, it's very feasible and standard procedure to have the entire document in memory (in a processed form). > This approach is also needed if you want to stack stream codecs > (not sure whether this is still possible in Py3, but that's how > I designed them for Py2). The design of the Py2 codecs is fairly flawed, unfortunately. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com