File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3121,8 +3121,9 @@ def py_quit():
31213121 self ._in_py = True
31223122 py_code_to_run = ''
31233123
3124- # Use self.py_locals as the locals() dictionary in the Python environment we are creating, but make
3125- # a copy to prevent pyscripts from editing it. (e.g. locals().clear()). Only make a shallow copy since
3124+ # Make a copy of self.py_locals for the locals dictionary in the Python environment we are creating.
3125+ # This is to prevent pyscripts from editing it. (e.g. locals().clear()). It also ensures a pyscript's
3126+ # environment won't be filled with data from a previously run pyscript. Only make a shallow copy since
31263127 # it's OK for py_locals to contain objects which are editable in a pyscript.
31273128 localvars = dict (self .py_locals )
31283129 localvars [self .py_bridge_name ] = py_bridge
You can’t perform that action at this time.
0 commit comments