Fix Python – Why is the empty dictionary a dangerous default value in Python? [duplicate]
This question already has answers here:
“Least Astonishment” and the Mutable Default Argument
(32 answers)
How can I update an attribute created by a base class’ mutable default argument, without modifying that argument? [duplicat….