docstrings
authorStefan Behnel <scoder@users.berlios.de>
Thu, 27 May 2010 06:17:30 +0000 (08:17 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 27 May 2010 06:17:30 +0000 (08:17 +0200)
Cython/Compiler/Optimize.py

index d2522b2529d054aff82a3622f4bba2bc17907a34..ad89d1bae67df00aec966eb331624a8a209535cb 100644 (file)
@@ -1189,6 +1189,8 @@ class EarlyReplaceBuiltinCalls(Visitor.EnvTransform):
             expr_scope = gen_expr_node.expr_scope)
 
     def _handle_simple_function_sum(self, node, pos_args):
+        """Transform sum(genexpr) into an equivalent inlined aggregation loop.
+        """
         if len(pos_args) not in (1,2):
             return node
         if not isinstance(pos_args[0], ExprNodes.GeneratorExpressionNode):
@@ -1728,7 +1730,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
         return self._optimise_min_max(node, pos_args, '>')
 
     def _optimise_min_max(self, node, args, operator):
-        """Replace min(a,b,...) and max(a,b,...) by explicit conditional code.
+        """Replace min(a,b,...) and max(a,b,...) by explicit comparison code.
         """
         if len(args) <= 1:
             # leave this to Python