class C:
def f():
pass
# del a class attribute
del C.f
try:
print(C.x)
except AttributeError:
print("AttributeError")
# del an instance attribute
c = C()
c.x = 1
print(c.x)
del c.x