From: Serhiy Storchaka Date: Sat, 8 Oct 2016 19:04:12 +0000 (+0300) Subject: Issue #28376: The type of long range iterator is now registered as Iterator. X-Git-Tag: v3.6.0b2~23^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48b1c3fcfc47b720a721ef887dd495ad667f567f;p=python Issue #28376: The type of long range iterator is now registered as Iterator. Patch by Oren Milman. --- diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index 001f27495d..8bebd69bc7 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 aed3a2990d..a89afa9399 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.