delattr python

Solutions on MaxInterview for delattr python by the best coders in the world

showing results for - " delattr python"
Antonio
25 Apr 2019
1class test:
2    attr = 1
3
4    def __delattr__(self, item):
5        object.__delattr__(self, item)
6
7ins = test()
8
9print(ins.attr)
10
11del ins.attr
12
13print(ins.attr)