Guido van Rossum added the comment:
You should not be using readline() for that use case. (Note that *no* sequence
of characters can be guaranteed not to occur in a binary protocol like pickle.)
--
resolution: -> not a bug
status: open -> closed
___
New submission from Alan Cristhian:
I use pickle to serialize data. The pickle.dumps() methods sometimes introduce
the b"\n" character:
>>> import pickle
>>> tuple_with_10 = (10,)
>>> result = pickle.dumps(tuple_with_10, protocol=4)
>>> result
b'\x80\x04\x95\x05\x00\x00\x00\