@@ -2549,7 +2549,6 @@ def _format_table(
2549
2549
append_row = _append_basic_row
2550
2550
2551
2551
padded_headers = pad_row (headers , pad )
2552
- padded_rows = [pad_row (row , pad ) for row in rows ]
2553
2552
2554
2553
if fmt .lineabove and "lineabove" not in hidden :
2555
2554
_append_line (lines , padded_widths , colaligns , fmt .lineabove )
@@ -2559,18 +2558,18 @@ def _format_table(
2559
2558
if fmt .linebelowheader and "linebelowheader" not in hidden :
2560
2559
_append_line (lines , padded_widths , colaligns , fmt .linebelowheader )
2561
2560
2562
- if padded_rows and fmt .linebetweenrows and "linebetweenrows" not in hidden :
2561
+ if rows and fmt .linebetweenrows and "linebetweenrows" not in hidden :
2563
2562
# initial rows with a line below
2564
- for row , ralign in zip (padded_rows [:- 1 ], rowaligns ):
2563
+ for row , ralign in zip (rows [:- 1 ], rowaligns ):
2565
2564
if row != SEPARATING_LINE :
2566
2565
append_row (
2567
- lines , row , padded_widths , colaligns , fmt .datarow , rowalign = ralign
2566
+ lines , pad_row ( row , pad ) , padded_widths , colaligns , fmt .datarow , rowalign = ralign
2568
2567
)
2569
2568
_append_line (lines , padded_widths , colaligns , fmt .linebetweenrows )
2570
2569
# the last row without a line below
2571
2570
append_row (
2572
2571
lines ,
2573
- padded_rows [- 1 ],
2572
+ pad_row ( rows [- 1 ], pad ) ,
2574
2573
padded_widths ,
2575
2574
colaligns ,
2576
2575
fmt .datarow ,
@@ -2584,13 +2583,13 @@ def _format_table(
2584
2583
or fmt .lineabove
2585
2584
or Line ("" , "" , "" , "" )
2586
2585
)
2587
- for row in padded_rows :
2586
+ for row in rows :
2588
2587
# test to see if either the 1st column or the 2nd column (account for showindex) has
2589
2588
# the SEPARATING_LINE flag
2590
2589
if _is_separating_line (row ):
2591
2590
_append_line (lines , padded_widths , colaligns , separating_line )
2592
2591
else :
2593
- append_row (lines , row , padded_widths , colaligns , fmt .datarow )
2592
+ append_row (lines , pad_row ( row , pad ) , padded_widths , colaligns , fmt .datarow )
2594
2593
2595
2594
if fmt .linebelow and "linebelow" not in hidden :
2596
2595
_append_line (lines , padded_widths , colaligns , fmt .linebelow )
0 commit comments