mirror of
https://github.com/uutils/coreutils.git
synced 2026-10-16 02:48:27 -07:00
docs: avoid mutable default argument in print_row
This commit is contained in:
1 parent
3faaf4b9c9
commit
7157ce71ee
1 file changed
+2
-2
@@ -216,8 +216,8 @@ def merge_tables(old, new):
|
||||
|
||||
|
||||
def render_md(fd, table, headings: str, row_headings: Target):
|
||||
def print_row(lst, lens=[]):
|
||||
lens = lens + [0] * (len(lst) - len(lens))
|
||||
def print_row(lst, lens=None):
|
||||
lens = (lens or []) + [0] * (len(lst) - len(lens or []))
|
||||
for e, lmd in zip(lst, lens):
|
||||
fmt = "|{}" if lmd == 0 else "|{:>%s}" % len(header[0])
|
||||
fd.write(fmt.format(e))
|
||||
|
||||
Reference in new issue
Block a user