📜  如何摆脱实例变量python代码示例

📅  最后修改于: 2022-03-11 14:46:47.658000             🧑  作者: Mango

代码示例1
class Test(object):
    def __del__(self):
        print("Object deleted")

    def func(self):
        print("Random function")


obj = Test()
obj.func()
del obj

obj.func()