From 48b1c3fcfc47b720a721ef887dd495ad667f567f Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 8 Oct 2016 22:04:12 +0300 Subject: Issue #28376: The type of long range iterator is now registered as Iterator. Patch by Oren Milman. --- Lib/_collections_abc.py | 2 ++ Misc/NEWS | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index 001f274..8bebd69 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -41,6 +41,7 @@ dict_itemiterator = type(iter({}.items())) list_iterator = type(iter([])) list_reverseiterator = type(iter(reversed([]))) range_iterator = type(iter(range(0))) +longrange_iterator = type(iter(range(1 << 1000))) set_iterator = type(iter(set())) str_iterator = type(iter("")) tuple_iterator = type(iter(())) @@ -234,6 +235,7 @@ Iterator.register(dict_itemiterator) Iterator.register(list_iterator) Iterator.register(list_reverseiterator) Iterator.register(range_iterator) +Iterator.register(longrange_iterator) Iterator.register(set_iterator) Iterator.register(str_iterator) Iterator.register(tuple_iterator) diff --git a/Misc/NEWS b/Misc/NEWS index aed3a29..a89afa9 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ Release date: TBA Core and Builtins ----------------- +- Issue #28376: The type of long range iterator is now registered as Iterator. + Patch by Oren Milman. + - Issue #28376: The constructor of range_iterator now checks that step is not 0. Patch by Oren Milman. -- cgit v0.12