On Fri, Dec 4, 2009 at 9:31 PM, Stefan Behnel <[email protected]> wrote:
>
> Lisandro Dalcin, 05.12.2009 01:26:
>> In [3]: MPI.Comm.Compare(MPI.COMM_WORLD, MPI.COMM_WORLD)
>> ---------------------------------------------------------------------------
>> TypeError                                 Traceback (most recent call last)
>>
>> /u/dalcinl/Devel/mpi4py-dev/<ipython console> in <module>()
>>
>> /u/dalcinl/lib64/python/mpi4py/MPI.so in mpi4py.MPI.Comm.Compare
>> (src/mpi4py.MPI.c:46815)()
>>
>> TypeError: Compare() takes at least 3 positional arguments (2 given)
>>
>> In [4]:
>>
>> The patch below fixes my issues, but I not sure if this is the
>> definitive solution ...
>>
>> diff -r f6efe60d7a31 Cython/Compiler/Nodes.py
>> --- a/Cython/Compiler/Nodes.py        Fri Dec 04 15:23:23 2009 +0100
>> +++ b/Cython/Compiler/Nodes.py        Fri Dec 04 21:25:33 2009 -0300
>> @@ -2075,7 +2075,7 @@
>>          argtuple_error_label = code.new_label("argtuple_error")
>>
>>          min_positional_args = self.num_required_args -
>> self.num_required_kw_args
>> -        if len(self.args) > 0 and self.args[0].is_self_arg:
>> +        if len(self.args) > 0 and (self.args[0].is_self_arg or
>> self.args[0].is_type_arg):
>>              min_positional_args -= 1
>>          max_positional_args = len(positional_args)
>>          has_fixed_positional_count = not self.star_arg and \
>
> Looks good to me, please push this fix.
>

Done:

changeset:   2738:723772dbc385
tag:         tip
user:        Lisandro Dalcin <[email protected]>
date:        Fri Dec 04 21:44:45 2009 -0300
summary:     discount one to min pos args for classmethod
(complementary fix for #454)


-- 
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

Reply via email to