mercurial/templatekw.py
changeset 31879 868ec199cad0
parent 31850 f0d719e513fc
child 31880 a0f2d83f8083
--- a/mercurial/templatekw.py	Sun Apr 09 11:57:09 2017 +0900
+++ b/mercurial/templatekw.py	Sun Apr 24 19:15:34 2016 +0900
@@ -19,14 +19,17 @@
     util,
 )
 
-# This helper class allows us to handle both:
-#  "{files}" (legacy command-line-specific list hack) and
-#  "{files % '{file}\n'}" (hgweb-style with inlining and function support)
-# and to access raw values:
-#  "{ifcontains(file, files, ...)}", "{ifcontains(key, extras, ...)}"
-#  "{get(extras, key)}"
+class _hybrid(object):
+    """Wrapper for list or dict to support legacy template
 
-class _hybrid(object):
+    This class allows us to handle both:
+    - "{files}" (legacy command-line-specific list hack) and
+    - "{files % '{file}\n'}" (hgweb-style with inlining and function support)
+    and to access raw values:
+    - "{ifcontains(file, files, ...)}", "{ifcontains(key, extras, ...)}"
+    - "{get(extras, key)}"
+    """
+
     def __init__(self, gen, values, makemap, joinfmt):
         self.gen = gen
         self.values = values