Rev 2233: Add docstring. in file:///data/jelmer/bzr-svn/mappings/

Jelmer Vernooij jelmer at samba.org
Mon Dec 8 02:55:15 GMT 2008


At file:///data/jelmer/bzr-svn/mappings/

------------------------------------------------------------
revno: 2233
revision-id: jelmer at samba.org-20081208025509-1ih111d5bj9feq1f
parent: jelmer at samba.org-20081208024909-dux1xqbhbgtafze2
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: mappings
timestamp: Mon 2008-12-08 03:55:09 +0100
message:
  Add docstring.
modified:
  revmeta.py                     revmeta.py-20080901215045-n8a6arqybs9ez5hl-1
=== modified file 'revmeta.py'
--- a/revmeta.py	2008-12-08 02:49:09 +0000
+++ b/revmeta.py	2008-12-08 02:55:09 +0000
@@ -389,6 +389,21 @@
 
     def _fold_children_fileprops(self, get_memoized, calc_from_child, 
                                  calc_final, memoize):
+        """Like foldr() in haskell except it works over (some) line 
+        of descendants of this RevisionMetadata object. It continues 
+        walking the descendants until it either finds one 
+        that knows its file properties, already knows whatever has to 
+        be calculated or until there are no more descendants.
+
+        :param get_memoized(x) -> object: Function that returns the memoized 
+            value for a given RevisionMetadata object or None if not memoized 
+            yet.
+        :param calc_from_child(x, child_val) -> object: Function that 
+            calculates the value for x from a child value.
+        :param calc_final(props): Determine the actual value from a file 
+            properties dictionary.
+        :param memoize(x, val): Memoize value for x
+        """
         # FIXME: Use BFS here rather than DFS ?
         if get_memoized(self) is not None:
             # Simple shortcut..




More information about the bazaar-commits mailing list