@@ -2414,7 +2414,6 @@ def _format_table(fmt, headers, headersaligns, rows, colwidths, colaligns, is_mu
24142414 append_row = _append_basic_row
24152415
24162416 padded_headers = pad_row (headers , pad )
2417- padded_rows = [pad_row (row , pad ) for row in rows ]
24182417
24192418 if fmt .lineabove and "lineabove" not in hidden :
24202419 _append_line (lines , padded_widths , colaligns , fmt .lineabove )
@@ -2424,17 +2423,17 @@ def _format_table(fmt, headers, headersaligns, rows, colwidths, colaligns, is_mu
24242423 if fmt .linebelowheader and "linebelowheader" not in hidden :
24252424 _append_line (lines , padded_widths , colaligns , fmt .linebelowheader )
24262425
2427- if padded_rows and fmt .linebetweenrows and "linebetweenrows" not in hidden :
2426+ if rows and fmt .linebetweenrows and "linebetweenrows" not in hidden :
24282427 # initial rows with a line below
2429- for row , ralign in zip (padded_rows [:- 1 ], rowaligns ):
2428+ for row , ralign in zip (rows [:- 1 ], rowaligns ):
24302429 append_row (
2431- lines , row , padded_widths , colaligns , fmt .datarow , rowalign = ralign
2430+ lines , pad_row ( row , pad ) , padded_widths , colaligns , fmt .datarow , rowalign = ralign
24322431 )
24332432 _append_line (lines , padded_widths , colaligns , fmt .linebetweenrows )
24342433 # the last row without a line below
24352434 append_row (
24362435 lines ,
2437- padded_rows [- 1 ],
2436+ pad_row ( rows [- 1 ], pad ) ,
24382437 padded_widths ,
24392438 colaligns ,
24402439 fmt .datarow ,
@@ -2448,13 +2447,13 @@ def _format_table(fmt, headers, headersaligns, rows, colwidths, colaligns, is_mu
24482447 or fmt .lineabove
24492448 or Line ("" , "" , "" , "" )
24502449 )
2451- for row in padded_rows :
2450+ for row in rows :
24522451 # test to see if either the 1st column or the 2nd column (account for showindex) has
24532452 # the SEPARATING_LINE flag
24542453 if _is_separating_line (row ):
24552454 _append_line (lines , padded_widths , colaligns , separating_line )
24562455 else :
2457- append_row (lines , row , padded_widths , colaligns , fmt .datarow )
2456+ append_row (lines , pad_row ( row , pad ) , padded_widths , colaligns , fmt .datarow )
24582457
24592458 if fmt .linebelow and "linebelow" not in hidden :
24602459 _append_line (lines , padded_widths , colaligns , fmt .linebelow )
0 commit comments