mirror of https://github.com/scrapy/scrapy.git
Use chain.from_iterable in python.py
This commit is contained in:
parent
ec98dabfab
commit
214da8e523
|
|
@ -334,10 +334,10 @@ class MutableChain:
|
|||
"""
|
||||
|
||||
def __init__(self, *args):
|
||||
self.data = chain(*args)
|
||||
self.data = chain.from_iterable(args)
|
||||
|
||||
def extend(self, *iterables):
|
||||
self.data = chain(self.data, *iterables)
|
||||
self.data = chain(self.data, chain.from_iterable(iterables))
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
|
|
|||
Loading…
Reference in New Issue