> No reason AFAIK. However, the fact that it is self-delimited is implicit
> in the fact that "Bytes past the pickled object's representation are
> ignored": https://docs.python.org/dev/library/pickle.html#pickle.load

I find this sentence worrying: it could lead one to think that load() could
read more bytes than the expected object representation size: this would
make pickle actually non self-delimiting, and could lead to problems when
reading e.g. from a socket, since an extraneous read() could block.

I think it's worth making it clear in the doc, I'll open an issue on the
tracker.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to