From 514f2542783ca9dea741431cb7bad335ed03b058 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 27 May 2010 08:17:30 +0200 Subject: [PATCH] docstrings --- Cython/Compiler/Optimize.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py index d2522b25..ad89d1ba 100644 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@ -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 -- 2.26.2