Commit 25c6fc73 authored by Damien George's avatar Damien George
Browse files

tests/basics: Add test for builtin "delattr".

parent 5076e5c3
# test builtin delattr
class A: pass
a = A()
a.x = 1
print(a.x)
delattr(a, 'x')
try:
a.x
except AttributeError:
print('AttributeError')
try:
delattr(a, 'x')
except AttributeError:
print('AttributeError')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment