@@ -2549,7 +2549,6 @@ def _format_table(
25492549 append_row = _append_basic_row
25502550
25512551 padded_headers = pad_row (headers , pad )
2552- padded_rows = [pad_row (row , pad ) for row in rows ]
25532552
25542553 if fmt .lineabove and "lineabove" not in hidden :
25552554 _append_line (lines , padded_widths , colaligns , fmt .lineabove )
@@ -2559,18 +2558,18 @@ def _format_table(
25592558 if fmt .linebelowheader and "linebelowheader" not in hidden :
25602559 _append_line (lines , padded_widths , colaligns , fmt .linebelowheader )
25612560
2562- if padded_rows and fmt .linebetweenrows and "linebetweenrows" not in hidden :
2561+ if rows and fmt .linebetweenrows and "linebetweenrows" not in hidden :
25632562 # 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 ):
25652564 if row != SEPARATING_LINE :
25662565 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
25682567 )
25692568 _append_line (lines , padded_widths , colaligns , fmt .linebetweenrows )
25702569 # the last row without a line below
25712570 append_row (
25722571 lines ,
2573- padded_rows [- 1 ],
2572+ pad_row ( rows [- 1 ], pad ) ,
25742573 padded_widths ,
25752574 colaligns ,
25762575 fmt .datarow ,
@@ -2584,13 +2583,13 @@ def _format_table(
25842583 or fmt .lineabove
25852584 or Line ("" , "" , "" , "" )
25862585 )
2587- for row in padded_rows :
2586+ for row in rows :
25882587 # test to see if either the 1st column or the 2nd column (account for showindex) has
25892588 # the SEPARATING_LINE flag
25902589 if _is_separating_line (row ):
25912590 _append_line (lines , padded_widths , colaligns , separating_line )
25922591 else :
2593- append_row (lines , row , padded_widths , colaligns , fmt .datarow )
2592+ append_row (lines , pad_row ( row , pad ) , padded_widths , colaligns , fmt .datarow )
25942593
25952594 if fmt .linebelow and "linebelow" not in hidden :
25962595 _append_line (lines , padded_widths , colaligns , fmt .linebelow )
0 commit comments