Skip to content
Browse files

Introduce ``node.interfaces.IOrdered``

  • Loading branch information...
1 parent 881c38f commit a9b3a5b709d37d89576e88fbd6abeda67d9aefed Robert Niederreiter committed May 21, 2012
Showing with 16 additions and 3 deletions.
  1. +6 −2 README.rst
  2. +5 −0 src/node/interfaces.py
  3. +5 −1 src/node/parts/storage.py
View
8 README.rst
@@ -249,7 +249,7 @@ Summary of the test coverage report::
lines cov% module
52 100% node.base
14 100% node.events
- 125 100% node.interfaces
+ 127 100% node.interfaces
23 100% node.locking
11 100% node.parts.__init__
107 100% node.parts.alias
@@ -262,7 +262,7 @@ Summary of the test coverage report::
79 100% node.parts.nodify
109 100% node.parts.order
81 100% node.parts.reference
- 26 100% node.parts.storage
+ 27 100% node.parts.storage
1 100% node.testing.__init__
62 100% node.testing.base
19 100% node.testing.env
@@ -288,6 +288,10 @@ Changes
0.9.7dev
--------
+- Introduce ``node.interfaces.IOrdered`` Marker interface. Set this interface
+ on ``node.parts.storage.OdictStorage``.
+ [rnix, 2012-05-21]
+
- ``node.parts.mapping.ClonableMapping`` now supports ``deepcopy``.
[rnix, 2012-05-18]
View
5 src/node/interfaces.py
@@ -124,6 +124,11 @@ class ILeaf(Interface):
"""
+class IOrdered(Interface):
+ """Marker for nodes containing ordered children.
+ """
+
+
class ICallable(Interface):
"""Provide a ``__call__`` function.
"""
View
6 src/node/parts/storage.py
@@ -4,7 +4,10 @@
extend,
Part,
)
-from node.interfaces import IStorage
+from node.interfaces import (
+ IStorage,
+ IOrdered,
+)
from node.utils import instance_property
from zope.interface import implementer
@@ -43,6 +46,7 @@ def storage(self):
return dict()
+@implementer(IOrdered)
class OdictStorage(Storage):
@default

0 comments on commit a9b3a5b

Please sign in to comment.
Something went wrong with that request. Please try again.