I would like to make a function that looks like this, but I'm aware that default arguments should never be mutable:
def foo(req_list: list, opt_list: list = []):
...
Without type hinting, I know the way to have an optional parameter default to an empty list is:
def bar(req_list, opt_list=None):
if opt_list == None:
opt_list = []
...
But I'm not sure of the correct way to do this with type hinting.