A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2014-April/133749.html below:

[Python-Dev] pickle self-delimiting

[Python-Dev] pickle self-delimiting [Python-Dev] pickle self-delimitingCharles-François Natali cf.natali at gmail.com
Tue Apr 1 23:56:20 CEST 2014
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140401/0d429978/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4