def pop(self, cls=Warning):
for i, w in enumerate(self._list):<EOL><INDENT>if issubclass(w.category, cls):<EOL><INDENT>return self._list.pop(i)<EOL><DEDENT><DEDENT>__tracebackhide__ = True<EOL>raise AssertionError("<STR_LIT>" % cls)<EOL>
Pop the first recorded warning, raise exception if not exists.