If there are no objections, I'm going to push the one-line patch below.
BTW, Why this optimization is on by default? Despite the comment on
Options.py, IMHO we should emulate Python semantics here. A METH_O
method cannot be called like this "func(arg, **{})", but that works
for methods defined in Python code.
$ hg diff
diff -r c3bf82e34e54 Cython/Compiler/Nodes.py
--- a/Cython/Compiler/Nodes.py Thu Apr 23 20:08:25 2009 +0200
+++ b/Cython/Compiler/Nodes.py Thu Apr 23 22:49:15 2009 -0300
@@ -1699,7 +1699,7 @@
elif len(self.args) == 1:
if self.args[0].default is None and not
self.args[0].kw_only:
self.entry.signature = TypeSlots.pyfunction_onearg
- elif self.entry.signature is TypeSlots.pymethod_signature:
+ elif self.entry.signature is TypeSlots.pymethod_signature
and Options.optimize_simple_methods:
if len(self.args) == 1:
self.entry.signature = TypeSlots.unaryfunc
elif len(self.args) == 2:
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev