Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Add a frozendict builtin type

Antoine Pitrousolipsis at pitrou.net
Tue Feb 28 12:53:27 CET 2012


On Tue, 28 Feb 2012 12:45:54 +0100Victor Stinner <victor.stinner at haypocalc.com> wrote:> > I think you need to elaborate on your use cases further, ...>> A frozendict can be used as a member of a set or as a key in a dictionary.>> For example, frozendict is indirectly needed when you want to use an> object as a key of a dict, whereas one attribute of this object is a> dict.It isn't. You just have to define __hash__ correctly.> frozendict helps also in threading and multiprocessing.How so?RegardsAntoine.


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp