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.

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to