arnodel at googlemail.com
Wed Mar 3 20:44:41 CET 2010
mk <mrkafk at gmail.com> writes:
> All of Python’s immutable built-in objects are hashable, while no
> mutable containers (such as lists or dictionaries) are.
> Well ok, hashable they're not; but apparently at least dict and list
> have id()?
lists and dicts are not hashable, but their types are:
So just use the type as the key to the dictionary you maintain in your
singleton. But the question is what you use your singleton for.
More information about the Python-list