"""
动态删除属性
"""


class Person(object):
    def __init__(self, name, age):
        self.name = name
        self.age = age


p1 = Person('zzq', 27)
del p1.name
delattr(p1, 'age')

156e62abf05f0233c8998f73ddae5c6dc365ee03
<mask token>


class Person(object):
    <mask token>


<mask token>

<mask token>


class Person(object):

    def __init__(self, name, age):
        self.name = name
        self.age = age


<mask token>

<mask token>


class Person(object):

    def __init__(self, name, age):
        self.name = name
        self.age = age


<mask token>
del p1.name
delattr(p1, 'age')

<mask token>


class Person(object):

    def __init__(self, name, age):
        self.name = name
        self.age = age


p1 = Person('zzq', 27)
del p1.name
delattr(p1, 'age')

"""
动态删除属性
"""


class Person(object):
    def __init__(self, name, age):
        self.name = name
        self.age = age


p1 = Person('zzq', 27)
del p1.name
delattr(p1, 'age')
