Bug report
Bug description:
import time
import threading
class TestClass(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.abort = threading.Event()
def run(self):
exec('var = 1')
print(var)
while True:
if self.abort.is_set():
self.abort.clear()
break
time.sleep(0.5)
obj = TestClass()
obj.start()
obj.abort.set()
bug.py
Above script also attached for convenience. Produces output:
NameError: name 'var' is not defined. Did you mean: 'vars'?
CPython versions tested on:
3.14
Operating systems tested on:
Windows
Bug report
Bug description:
bug.py
Above script also attached for convenience. Produces output:
NameError: name 'var' is not defined. Did you mean: 'vars'?
CPython versions tested on:
3.14
Operating systems tested on:
Windows