Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Simplify MutableChain

Eugenio Lacuestaa05eaeed73a4
diff --git a/scrapy/utils/python.py b/scrapy/utils/python.py
index 7971b4dde..1a6bab990 100644
--- a/scrapy/utils/python.py
+++ b/scrapy/utils/python.py
@@ -403,8 +403,7 @@ class MutableChain(object):
def __iter__(self):
return self.data.__iter__()
- def __next__(self): # py3
- return self.data.__next__()
+ def __next__(self):
+ return next(self.data)
- def next(self): # py2
- return self.data.next()
+ next = __next__