> What datatypes can one use as key in a dictionary? Look here for __hash__--that might help: http://www.python.org/doc/current/ref/customization.html > Can I use for example two longs as key (kind of a double key)? If you want to keep it simple, why not just use a tuple? d = {} d[(1,2)] = "foo" // mark -