class documentation
class ICheckpointable(Interface): (source)
Known subclasses: codetools.contexts.i_context.IDataContext
A context which can be copied.
Method | checkpoint |
Make a shallow copy of the context. |
Make a shallow copy of the context. Technically, this is actually a fairly deep copy. All of the object structure should be replicated, but the actual dictionary storage will be shallowly copied:: copy = context.shallow_copy() copy[key] is context[key] for key in context.keys() These semantics are useful for saving out checkpointed versions of the context for implementing an undo/redo stack. They may not be useful for other purposes. Returns ------- copy : IContext