From e6067d675d813d53074ba3c03f72e3e9029959b3 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Tue, 23 Oct 2018 18:47:25 +0200 Subject: [PATCH] Use generator. --- sphinx/writers/text.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sphinx/writers/text.py b/sphinx/writers/text.py index a1928f9f7..b5392c9bc 100644 --- a/sphinx/writers/text.py +++ b/sphinx/writers/text.py @@ -156,10 +156,7 @@ class Table: line.append(None) def __repr__(self): - out = [] - for line in self.lines: - out.append(repr(line)) - return "\n".join(out) + return "\n".join(repr(line) for line in self.lines) def cell_width(self, cell, source): """Give the cell width, according to the given source (either