Merge pull request #4635 from cool-RR/patch-1

Use chain.from_iterable in python.py
This commit is contained in:
Andrey Rahmatullin 2020-06-17 18:54:10 +05:00 committed by GitHub
commit 89e900e013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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