File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22
33"""
4- RevisionDict works like an ordinary dictionary with additional revision keeping of changes. It remembers the order that
5- keys were *updated* (in contrast to the ``OrderedDict`` which is remembering the order that keys are *inserted*).
4+ RevisionDict works like an ordinary dictionary with additional revision keeping
5+ of changes. It remembers the order that keys were *updated* (in contrast to the
6+ ``OrderedDict`` which is remembering the order that keys are *inserted*).
67
78Additional functionality compared to ``dict()``:
89
910* ``.revision`` - returning the actual revision as integer (starting with 0)
1011* ``.base_revision`` - revision before oldest item changed (or 0 on empty dict)
11- * ``.key_to_revision(key)`` - return the revision when the given key was changed
12+ * ``.key_to_revision(key)`` - return revision when the given key was changed
1213* ``.checkout(start=0)`` - return a dict with changes since ``start``
1314
1415>>> d=RevisionDict()
49504
5051>>> d.checkout(3) # get all changes starting with rev. 3
5152{'a': 3}
52- >>> tuple(d.keys()) # iterate over keys ( ordered by time of update)
53+ >>> tuple(d.keys()) # iterate over keys ordered by time of update
5354('b', 'c', 'a')
5455"""
5556
You can’t perform that action at this time.
0 commit comments