circuitpython/tests/basics/del_deref.py
Damien George 539681fffd tests: Rename test scripts, changing - to _ for consistency.
From now on, all new tests must use underscore.

Addresses issue #727.
2014-07-05 06:14:29 +01:00

23 lines
352 B
Python

def f():
x = 1
y = 2
def g():
nonlocal x
print(y)
try:
print(x)
except NameError:
print("NameError")
def h():
nonlocal x
print(y)
try:
del x
except NameError:
print("NameError")
print(x, y)
del x
g()
h()
f()