Describe the bug
Currently only global variables can be assigned new values. (status quo: see comments below)
To Reproduce
from pyopm.core import ObjectPattern
def myfunc():
x = 5
p = ObjectPattern({'obj': {'bind': {'x': None}}})
m = p.match(dict())
with m:
print(x)
myfunc()
will print 5, because the locals cannot be updated (__enter__ -> _start_block).
Expected behavior
myfunc() should result in {} being printed.
Screenshots
None
Additional context
python 3.8.2
Describe the bug
Currently only global variables can be assigned new values.(status quo: see comments below)To Reproduce
will print
5, because the locals cannot be updated (__enter__ -> _start_block).Expected behavior
myfunc()should result in{}being printed.Screenshots
None
Additional context
python 3.8.2