We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec6cfc3 commit 7abfd77Copy full SHA for 7abfd77
exercise/object_test.py
@@ -9,7 +9,7 @@ def __init__(self, name, age):
9
10
# __new__:用于创建对象
11
def __new__(cls, *args, **kwargs):
12
- print('__new__被调用只需了,cls的id值为{0}'.format(id(cls)))
+ print('__new__被调用了,cls的id值为{0}'.format(id(cls)))
13
obj = super().__new__(cls)
14
print('创建的对象的id为{0}'.format(id(obj)))
15
return obj
0 commit comments