Code(code, scope=None, **kwargs)¶
TypeErrorif code is not an instance of
strin python 3) or scope is not
Noneor an instance of
Scope variables can be set by passing a dictionary as the scope argument or by using keyword arguments. If a variable is set as a keyword argument it will override any setting for that variable in the scope dictionary.
- scope (optional): dictionary representing the scope in which code should be evaluated - a mapping from identifiers (as strings) to values
- **kwargs (optional): scope variables can also be passed as keyword arguments
Scope dictionary for this instance.