面向对象
三大特征:
封装
继承
多态
class Person:
"""
抽象的人类
"""
def __init__(self, name):
"""
返回的值就是self ,也是下面的赋值p1
:param name:
"""
print("111", name)
self.name = name
print(self)
def __del__(self):
"""
清除函数
:return:
"""
print("222")
p1 = Person("jake")
print(p1)
print(p1.name)
p2 = Person("jani")
print(p2.name)