pyiron_base.interfaces.lockable.sentinel

Contents

pyiron_base.interfaces.lockable.sentinel#

pyiron_base.interfaces.lockable.sentinel(meth)[source]#

Wrap a method to fail if read_only is True on the owning object.

Use together with Lockable.

Parameters:

meth (method) – method to call if read_only is False.

Returns:

wrapped method