class documentation
class IRestrictedContext(IContext): (source)
Known subclasses: codetools.contexts.i_context.IDataContext
A context that has certain restrictions on the values it is allowed to contain.
Method | allows |
Determines whether this value is allowed in this context. Only strings are allowed for 'name'. |
Inherited from IContext
:
Method | __contains__ |
Test whether the key is available in the context or not. |
Method | __delitem__ |
Remove the given key with [] access. |
Method | __getitem__ |
Get item with [] access. |
Method | __setitem__ |
Set item with [] access. |
Method | keys |
Returns the list of keys available in the context. |
Determines whether this value is allowed in this context. Only strings are allowed for 'name'. Typically, this is used to limit the types of objects allowed into the context. It could also be used to restrict specific values (ie. the shape of an array) and even on the name... Parameters ---------- value : object name : str, optional Returns ------- allowed : bool