dicthelpers: add docstrings for diff and join
authorSiddharth Agarwal <sid0@fb.com>
Fri, 29 Mar 2013 15:23:19 -0700
changeset 18846 860d36b763ae
parent 18845 c1f416e4bc80
child 18847 40c679748fa9
dicthelpers: add docstrings for diff and join
mercurial/dicthelpers.py
--- a/mercurial/dicthelpers.py	Mon Apr 01 13:46:32 2013 -0700
+++ b/mercurial/dicthelpers.py	Fri Mar 29 15:23:19 2013 -0700
@@ -29,7 +29,18 @@
     return res
 
 def diff(d1, d2, default=None):
+    '''Return all key-value pairs that are different between d1 and d2.
+
+    This includes keys that are present in one dict but not the other, and
+    keys whose values are different. The return value is a dict with values
+    being pairs of values from d1 and d2 respectively, and missing values
+    represented as default.'''
     return _diffjoin(d1, d2, default, True)
 
 def join(d1, d2, default=None):
+    '''Return all key-value pairs from both d1 and d2.
+
+    This is akin to an outer join in relational algebra. The return value is a
+    dict with values being pairs of values from d1 and d2 respectively, and
+    missing values represented as default.'''
     return _diffjoin(d1, d2, default, False)