Spamming PyPI with stupid packages

Dan Sommers dan at
Tue Jan 3 22:06:49 EST 2012

On Wed, 04 Jan 2012 13:37:24 +1100, Chris Angelico wrote:

> And "import pickle" objectifies pickles ...

Not quite:  "import pickle" merely readies the machinery that objectifies 
pickles.  In order to objectify a pickle, you have to call pickle.loads:

>>> import pickle  # get ready to objectify a pickle, but don't do it yet
>>> x = SomeClass(some_value, some_other_value)
>>> s = pickle.dumps(x)  # now s contains a pickle
>>> y = pickle.loads(s)  # this actually objectifies the pickle known as s


Now back to your regularly scheduled holy war.


More information about the Python-list mailing list