[Python-Dev] Unicode byte order mark decoding

"Martin v. Löwis" martin at v.loewis.de
Tue Apr 5 22:52:14 CEST 2005

Walter Dörwald wrote:
> There are situations where the byte stream might be temporarily
> exhausted, e.g. an XML parser that tries to support the
> IncrementalParser interface, or when you want to decode
> encoded data piecewise, because you want to give a progress
> report.

Yes, but these are not file-like objects. In the IncrementalParser,
it is *not* the case that a read operation returns an empty
string. Instead, the application repeatedly feeds data explicitly.
For a file-like object, returning "" indicates EOF.


More information about the Python-Dev mailing list