>From 186e8d9452c228ec68a229efde629b11d8add1db Mon Sep 17 00:00:00 2001
From: Florian Friesdorf <flo@chaoflow.net>
Date: Mon, 19 Apr 2010 19:14:04 +0200
Subject: [PATCH 1/2] docstring for _update_section

---
 src/zc/buildout/buildout.py |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/zc/buildout/buildout.py b/src/zc/buildout/buildout.py
index 7d5ed47..c13fbfe 100644
--- a/src/zc/buildout/buildout.py
+++ b/src/zc/buildout/buildout.py
@@ -1373,6 +1373,27 @@ def _dists_sig(dists):
     return result
 
 def _update_section(s1, s2):
+    """update s1 by instructions from s2
+
+    '+' and '-' operators are understood, without an operator, s2 overwrites
+    s1.
+
+    A section in a config file (somefile.cfg) as base for s2:
+    [somesection]
+    key1 = value1
+    key2 += value2
+    key3 -= value3
+
+    Will arrive in the dictionary s2, like:
+    {
+        'key1': ('value1', 'somefile.cfg'),
+        'key2 +': ('value2', 'somefile.cfg'),
+        'key3 -': ('value3', 'somefile.cfg'),
+    }
+
+    The ' +'/' -' will be stripped of the key and the value in s1 altered
+    accordingly.
+    """
     s2 = s2.copy() # avoid mutating the second argument, which is unexpected
     for k, v in s2.items():
         v2, note2 = v
-- 
1.6.6.2

