def pop(self, key, default=NONE):
if key in self:<EOL><INDENT>self._list_remove(key)<EOL>return self._pop(key)<EOL><DEDENT>else:<EOL><INDENT>if default is NONE:<EOL><INDENT>raise KeyError(key)<EOL><DEDENT>else:<EOL><INDENT>return default<EOL><DEDENT><DEDENT>
If *key* is in the dictionary, remove it and return its value,
else return *default*. If *default* is not given and *key* is not in
the dictionary, a KeyError is raised.