mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-118218: Reuse return tuple in itertools.pairwise (GH-118219)
This commit is contained in:
parent
b568c2c1ff
commit
6999d68d28
3 changed files with 40 additions and 2 deletions
|
@ -1821,6 +1821,13 @@ class TestBasicOps(unittest.TestCase):
|
|||
gc.collect()
|
||||
self.assertTrue(gc.is_tracked(next(it)))
|
||||
|
||||
@support.cpython_only
|
||||
def test_pairwise_result_gc(self):
|
||||
# Ditto for pairwise.
|
||||
it = pairwise([None, None])
|
||||
gc.collect()
|
||||
self.assertTrue(gc.is_tracked(next(it)))
|
||||
|
||||
@support.cpython_only
|
||||
def test_immutable_types(self):
|
||||
from itertools import _grouper, _tee, _tee_dataobject
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue