There are several different ways to check if a Python dictionary contains a specific key, i.e.
d = {}
if key in d:
if d.contains(key):
if d.has_key(key):
it's silly for a language to allow you to do the same thing several different ways, UNLESS, each of the methods was doing something entirely different. Could someone please contrast the three techniques above, how are they different?