Files
msw/bug.py
2019-12-16 22:02:28 +08:00

16 lines
240 B
Python

class A:
def __init__(self, arg=None):
if arg is None:
self.arg = {}
def set(self):
self.arg['something'] = 'something'
a1 = A()
a1.set()
a2 = A()
print(a2.arg)
# output is {'something': 'something'}