泡菜:为什么这么称呼他们? [英] Pickles: Why are they called that?

查看:107
本文介绍了泡菜:为什么这么称呼他们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很惊讶这对我来说很难找到答案.

这真是个奇怪的名字.为什么将泡菜称为泡菜?
http://en.wikipedia.org/wiki/Pickle_(Python)

我了解腌制"对蔬菜的含义,并且我了解python概念是类似的.但是,为什么选择挑剔"而不是序列化"?这是内心的笑话吗?有历史吗?

解决方案

从动词 腌制 :

用醋,盐水等保存的蔬菜,例如花椰菜,洋葱等

它是Python对象,保留供以后使用.名称是取自Modula-3概念,该语言启发了许多Python功能.另请参见 Module-3 Pickle文档.

我怀疑Guido之所以选择这个名字,是因为:

  • 比他想到的名字好( flatten ,请参见 shelve 上,模块在同一提交中添加到库 .

如果您拥有圭多的时间机器,则可以旅行回到 1994年11月,并问他自己为什么选择这个特定名称.我确实注意到,肯·曼海姆(Ken Mannheimer)已经使用了腌制对象一词,仅仅是在后续讨论中宣布flatten 10天后,可能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?

解决方案

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.

这篇关于泡菜:为什么这么称呼他们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆