[docs]classISPOMixin(MemoryMixin):""" An implementation of the International Stateless Persons Organisation, a mixin which should be applied as a bottom layer for memories which have no state and must redirect certain operations to a parent memory. Main usecase is for memory region classes which are stored within other memories, such as pages. """
[docs]defset_state(self,state):raiseException("Cannot set state on this stateless object")
def_default_value(self,*args,memory=None,**kwargs):try:func=memory._default_valueexceptAttributeErrorase:raiseException("memory kwarg must be passed to this stateless object")fromeelse:returnfunc(*args,**kwargs)def_add_constraints(self,*args,memory=None,**kwargs):try:func=memory._add_constraintsexceptAttributeErrorase:raiseException("memory kwarg must be passed to this stateless object")fromeelse:returnfunc(*args,**kwargs)def_merge_values(self,*args,memory=None,**kwargs):try:func=memory._merge_valuesexceptAttributeErrorasex:raiseException("memory kwarg must be passed to this stateless object")fromexelse:returnfunc(*args,**kwargs)def_merge_labels(self,*args,memory=None,**kwargs):try:func=memory._merge_labelsexceptAttributeErrorasex:raiseException("memory kwarg must be passed to this stateless object")fromexelse:returnfunc(*args,**kwargs)def_update_mappings(self,*args,memory=None,**kwargs):try:func=memory._update_mappingsexceptAttributeErrorasex:raiseException("memory kwarg must be passed to this stateless object")fromexelse:returnfunc(*args,**kwargs)