From: Stefan Behnel Date: Thu, 27 May 2010 06:17:30 +0000 (+0200) Subject: docstrings X-Git-Tag: 0.13.beta0~2^2~39 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=514f2542783ca9dea741431cb7bad335ed03b058;p=cython.git docstrings --- 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