def has_key(self, key):
try:<EOL><INDENT>if type(self.attrs) == dict:<EOL><INDENT>return key in self.attrs<EOL><DEDENT>else:<EOL><INDENT>raise AttributeError    <EOL><DEDENT><DEDENT>except AttributeError:          <EOL><INDENT>raise NotImplementedError<EOL><DEDENT>
Dict-like behaviour