class documentation

class RestrictedValues(DataContext): (source)

View In Hierarchy

Only allow some values.

Method allows Determines whether this value is allowed in this context. Only strings are allowed for 'name'.

Inherited from DataContext:

Method __contains__ Undocumented
Method __delitem__ Undocumented
Method __eq__ Don't allow objects of different classes to be equal.
Method __getitem__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Method __ne__ Undocumented
Method __repr__ Undocumented
Method __setitem__ Undocumented
Method __str__ Undocumented
Method checkpoint Make a shallow copy of the context.
Method keys Returns the list of keys available in the context.
Class Variable name Undocumented
Class Variable subcontext Undocumented

Inherited from ListenableMixin (via DataContext):

Method deferred_events Context manager that sets defer_events to False
Instance Variable defer_events Undocumented
Method _add_deferred_event Defer this event.
Method _defer_events_changed Undocumented
Method _defer_events_changed_refire Undocumented
Method _fire_event Fire an ItemsModifiedEvent.
Class Variable _deferred_events Undocumented

Inherited from PersistableMixin (via DataContext):

Static Method load Unpickle the context from a file
Method save Pickle the data context out to a file
def allows(self, value, name=None): (source)

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