]> granicus.if.org Git - python/commitdiff
Issue #28376: The type of long range iterator is now registered as Iterator.
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 8 Oct 2016 19:04:12 +0000 (22:04 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 8 Oct 2016 19:04:12 +0000 (22:04 +0300)
Patch by Oren Milman.

Lib/_collections_abc.py
Misc/NEWS

index 001f27495d7169153addc6cce5b580aa0a352b0a..8bebd69bc7f8d6afe872f5e1756b7417e4e022b7 100644 (file)
@@ -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)
index aed3a2990d02ff5f7cfd77f0cb36bcc6c7f9fde9..a89afa9399b00181335c8c46722debd23765bd1c 100644 (file)
--- 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.