def __getitem__(self, key):
try:<EOL><INDENT>return dict.__getitem__(self, key)<EOL><DEDENT>except KeyError:<EOL><INDENT>value = self[key] = type(self)()<EOL>return value<EOL><DEDENT>
x.__getitem__(y) <==> x[y]