There are several 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):
This is stupid for a language that allows you to do the same thing in several different ways: UNLESS, each of the methods did something completely different. Can anyone contrast the three methods above, how do they differ?
source share