ulkb.Theory.reset#
- Theory.reset(arg=None)[source]#
Removes all extensions since arg (inclusive).
If arg is an id, goes back to the extension preceding the one introducing the object with id arg.
If arg is an object, goes back to the extension preceding the one introducing arg.
If arg is a non-negative integer, goes back to the extension preceding the one at offset arg.
If arg is a negative integer, drops the last abs(arg) extensions.
If arg is not given, goes back to the initial state; i.e., makes arg equal to
Theory.prelude_offset
.- Parameters:
arg – Id,
Object
, or int.- Returns:
The number of extensions removed.
- Raises:
LookupError – arg not in theory.