1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# del global def do_del(): global x del x x = 1 print(x) do_del() try: print(x) except NameError: print("NameError") try: do_del() except: # NameError: # FIXME uPy returns KeyError for this print("NameError")