(self, key, default=None)
return result
Delete the keyed message and return it, or default.
Delete the keyed message and return it, or default.
Delete the keyed message and return it or default .
def pop(self, key, default=None):
        """Delete the keyed message and return it, or default."""
        try:
            result = self[key]
        except KeyError:
            return default
        self.discard(key)
        return result
def pop ( self , key , default = None ) : try : result = self [ key ] except KeyError : return default self . discard ( key ) return result