using [] and {} as default param value
It's generally not encouraged to use [] and {} as function param default value because they are prone to cause unexpected modifications if the default value is used and modified in the function. The best way is to declare param=None then in the start of the function check if param is None then let param = [] (or {})
In cfn_lambda_handler/cfn_lambda_handler.py there are 3 places of such case,
Currently the code doesn't modify these params so there is no bug but I feel it's better to change these cases to prevent bugs if future changes modify these params.
I think the better explanation is that default arguments are only evaluated once so subject to unexpected behaviour if the function is called once again with defaults.
But yes I agree :)
Yes your explanation is clearer. Actually, a better way to fix is to use () to replace [] until maybe in the future the param needs to be updated somehow (very unlikely)...