This post originated from an RSS feed registered with Python Buzz
by Jarno Virtanen.
Original Post: My brain and pickle don't mix
Feed Title: Python owns us
Feed URL: http://sedoparking.com/search/registrar.php?domain=®istrar=sedopark
Feed Description: A weblog about Python from the view point of Jarno Virtanen.
There is something deeply wrong in my brain. I just cannot, for the
life of me, remember the correct order of arguments for
pickle.dump().
Just few minutes ago, I wrote these lines in order to test whether I
could get it right this time:
Traceback (most recent call last):
File "", line 9, in ?
File "/usr/lib/python2.2/pickle.py", line 974, in dump
Pickler(file, bin).dump(object)
File "/usr/lib/python2.2/pickle.py", line 110, in __init__
self.write = file.write
AttributeError: 'dict' object has no attribute 'write'
Thank you for reminding me.
What is wrong with me? Sure, I don't use pickleall the time, but I've done this mistake so many times that I
should already have learned it. But no. I once even tried to
intentionally write it wrong, so that I would actually write
it right, but that didn't work out either.
Maybe I need to assign the following for some command line alias: