You are not logged in Log in Join
You are here: Home » Members » 4AM Productions (Evan Simpson) » PythonMethodWiki » SafeBlock

Log in
Name

Password

 
 
FrontPage » GeneralDescription » GuardedBlock »

SafeBlock

SafeBlock is defined in zbytecodehacks/VSExec.py.

SafeBlock is a subclass of CodeBlock. It forbids all EXEC_* opcodes, DELETE_* opcodes, and STORE_* opcodes except STORE_FAST, STORE_GLOBAL, and STORE_SUBSCR. This prevents the use of the exec statement, del statement, and any assignment statement except bare local, global, or item assignment. Item assignment is allowed so that literal dictionaries can be created, and is further restricted by the AllowMapBuild Munger.

It includes the Printing, PublicNames, and AllowMapBuild Mungers. These redirect the print statement, prevent use of variable and attribute names beginning with underscore, and allow literal dictionaries while preventing item assignment.