mk <mrk...@gmail.com> writes: [...] > hashable > .. > 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: >>> hash(dict) 4296155808 >>> hash(list) 4296151808 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. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list