* add print_, exec_ and _reraise helpers for 2-3 compatible code
* consolidate builtins implementation to be compatible with >=2.3 --HG-- branch : trunk
This commit is contained in:
@@ -102,7 +102,7 @@ class WarningsRecorder:
|
||||
|
||||
def pop(self, cls=Warning):
|
||||
""" pop the first recorded warning, raise exception if not exists."""
|
||||
for i, w in py.builtin.enumerate(self.list):
|
||||
for i, w in enumerate(self.list):
|
||||
if issubclass(w.category, cls):
|
||||
return self.list.pop(i)
|
||||
__tracebackhide__ = True
|
||||
|
||||
Reference in New Issue
Block a user