Conventional way of dealing with optional list arguments is the following:
def func(list_of_vals = None):
if list_of_vals is None:
list_of_vals = []
...
I wounder if the following (shorter) version has any pitfalls? why nobody do that? is it considered more obscure?
list_of_vals = list_of_vals or []
l
as a variable name, that's bad. – Icy