Did I find the right examples for you? yes no

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)
Append-only stack w/ garbage collection.

- Append items to most recent layer until full;  then add a new layer.

- When max layers reached, discard "oldest" layer starting a new one.

- Invariant:  the sequence of (generation, id) increases monotonically.

- Iteration occurs in reverse order of appends, and yields
  (generation, index, object) tuples.

src/a/p/appendonly-1.0.1/appendonly/__init__.py   appendonly(Download)
from zope.interface import implements
from appendonly.interfaces import IAppendStack
class _LayerFull(ValueError):

src/a/p/appendonly-1.0.1/appendonly/tests.py   appendonly(Download)
    def test_class_conforms_to_IAppendStack(self):
        from zope.interface.verify import verifyClass
        from appendonly.interfaces import IAppendStack
        verifyClass(IAppendStack, self._getTargetClass())
    def test_instance_conforms_to_IAppendStack(self):
        from zope.interface.verify import verifyObject
        from appendonly.interfaces import IAppendStack