def setdefault(self, key, default=None):
try:<EOL><INDENT>return self[key]<EOL><DEDENT>except KeyError:<EOL><INDENT>self[key] = default<EOL><DEDENT>return default<EOL>
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D