This commit is contained in:
2019-12-16 22:02:28 +08:00
parent ae1db6e3ab
commit f8bcfcc9c0
4 changed files with 30 additions and 5 deletions

15
bug.py Normal file
View File

@@ -0,0 +1,15 @@
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'}