def func(): value = "not-none" while True: if value is None: print("None") break