changeset 10:81d68388ec97

some nonsense about how this model is full of holes and how it should be better
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 10 Dec 2012 17:14:49 -0800
parents 0affca1f4dc0
children 7b8e40eda563
files wsgraph/model.py
diffstat 1 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/wsgraph/model.py	Mon Dec 10 17:10:50 2012 -0800
+++ b/wsgraph/model.py	Mon Dec 10 17:14:49 2012 -0800
@@ -6,20 +6,27 @@
 
     @abstractmethod
     def node(self, name, **values):
-        """get or set a node"""
+        """
+        get or set a node
+
+        When setting a node, a value of `None` will pop the value from
+        the nodal values
+        """
 
     @abstractmethod
     def nodes(self):
         """returns a list of all nodes"""
 
     @abstractmethod
+    def edge(self, node1, node2, **values):
+        """
+        get or set edge from node1 to node2
+        """
+
+    @abstractmethod
     def edges(self):
         """returns a list of all edges"""
 
-    @abstractmethod
-    def edge(self, node1, node2, **values):
-        """returns edge from node1 to node2"""
-
     def __getitem__(self, key):
         """
         if key is a basestring, return the node of that name;