def pop(self):
it = iter(self)<EOL>try:<EOL><INDENT>value = next(it)<EOL><DEDENT>except StopIteration:<EOL><INDENT>raise KeyError<EOL><DEDENT>self.discard(value)<EOL>return value<EOL>
Return the popped value.  Raise KeyError if empty.