Careful: using an empty list (or any mutable) as default value in the function argument could lead to sneaky bugs.
Try to google python empty list as argument
and see the details.
The right way is to use None
and then create an empty list inside the function:
def make_links(app_table, linked_rows=None):
linked_rows = linked_rows or []
table_row = app_tables.get(app_table).add_row(linked_rows=linked_rows)