def test_resizelist_hint(self): import __pypy__ l2 = [] __pypy__.resizelist_hint(l2, 100) l1 = [1, 2, 3] l1[:] = l2 assert len(l1) == 0
def test_resizelist_hint(self): if self.on_cpython: skip('pypy-only test') import __pypy__ l2 = [] __pypy__.resizelist_hint(l2, 100) l1 = [1, 2, 3] l1[:] = l2 assert len(l1) == 0
def __exit__(self, type, value, tb): if type is None: extended = len(self.list) if extended < self.length_hint: resizelist_hint(self.list, extended)