22

I'm surprised this is such a hard answer for me to find.

It's such a strange name. Why are pickles called pickles?
http://en.wikipedia.org/wiki/Pickle_(Python)

I understand what "pickling" means with respect to vegetables and I understand that the python concept is analogous. But, why choose "pickle" instead of "serialization"? Is it an inside joke? Is there a history about it?

3
  • 11
    "Pickling" is process which enables storage and preservation. Dec 5, 2014 at 21:31
  • 5
    "Pickle" is "Pickle" because "Python" is "Python".
    – Matthias
    Dec 5, 2014 at 21:39
  • 1
    And for the same reason that "bug" is called "bug"
    – leela.fry
    Nov 30, 2015 at 16:16

1 Answer 1

36

From the verb to pickle:

vegetables, such as cauliflowers, onions, etc, preserved in vinegar, brine, etc

It is Python objects, preserved for later use. The name was taken from the Modula-3 concept, a language that inspired many Python features. Also see the Module-3 Pickle documentation.

I suspect Guido picked the name because:

  • it is better than the first name he thought of (flatten, see this old usenet post announcing it)
  • funny names are better than drab ones, in tradition with the Monty Python background of the language
  • there is a nice alliteration going on there with the P's (Python Pickles)
  • you put pickles (in jars) on a shelve, a module added to the library in the same commit.

If you ever get hold of Guido's time machine you could travel back to November 1994 and ask him yourself why he picked that specific name. I do notice that Ken Mannheimer already uses the term pickled objects a mere 10 days after the announcement of flatten as part of the follow-up discussion, probably referencing to the Modula-3 inspiration for the concept, and the name must've stuck.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.