Christoph Anton Mitterer <cales...@scientia.org> added the comment:
btw, just something for the record: I think the example given in msg109117 above is wrong: Depending on the read size it will produce different results, given how split() works: Imagine a byte sequence: >>> b"\0foo\0barbaz\0\0abcd".split(b"\0") [b'', b'foo', b'barbaz', b'', b'abcd'] Now the same sequence, however with a different read size (here a shorter one): >>> b"\0foo\0barbaz\0".split(b"\0") [b'', b'foo', b'barbaz', b''] >>> b"\0abcd".split(b"\0") [b'', b'abcd'] => it's the same bytes, but in the 2nd case one get's an extra b''. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue1152248> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com