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

Use chain.from_iterable in text.py
This commit is contained in:
Takeshi KOMIYA 2020-06-18 00:36:44 +09:00 committed by GitHub
commit 66e55a02d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,7 +223,7 @@ class Table:
for left, right in zip(out, out[1:]) for left, right in zip(out, out[1:])
] ]
glue.append(tail) glue.append(tail)
return head + "".join(chain(*zip(out, glue))) return head + "".join(chain.from_iterable(zip(out, glue)))
for lineno, line in enumerate(self.lines): for lineno, line in enumerate(self.lines):
if self.separator and lineno == self.separator: if self.separator and lineno == self.separator: