How can I update an attribute created by a base class’ mutable default argument, without modifying that argument?

This question already has answers here: Why does using `arg=None` fix Python’s mutable default argument issue? (5 answers) Closed last month. I’ve found a strange issue with subclassing and dictionary updates in new-style classes: Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 >>> class a(object): … def __init__(self, props={}): … Read more