[<<] Industrie Toulouse

Sometimes, our brains will just think in reverse of the code and tools we use, and there seems to be nothing we can do about it. Jarno Virtanen writes that he can remember the order of arguments for pickle.dump(). I've had the same problem with the Unix ln utility. Whenever I do ln -s, I get the remaining arguments in the wrong order. I became convinced that it was written into the command that whatever you do the first time is incorrect, no matter what order you put the arguments in. Because for YEARS, I never did it right the first time. Fortunately, I (think) I now know how to use it. I think.

Jarno also notes a difference between the cPickle and Pickle modules. Pickle (the original Python based pickle module) has far less documentation than it's optimized C based sibling:

Python 2.2.3 (#1, Jul  3 2003, 12:12:07) 
[GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> help(pickle.dump)
Help on function dump in module pickle:

dump(object, file, bin=0)

>>> import cPickle
>>> help(cPickle.dump)
Help on built-in function dump:

dump(...)
    dump(object, file, [binary]) --Write an object in pickle format to the given 
      file

    If the optional argument, binary, is provided and is true, then the
    pickle will be written in binary format, which is more space and
    computationally efficient.