|
@@ -40,7 +40,7 @@ static PyMethodDef RPNExpr_methods[] = {
|
40
|
40
|
"Evaluate an expression"),
|
41
|
41
|
PYRPN_method("mutate", rpnexpr_mutate,
|
42
|
42
|
METH_VARARGS | METH_KEYWORDS,
|
43
|
|
- "self, params=None, n_mutations=1",
|
|
43
|
+ "self, n_mutations=1, params=None",
|
44
|
44
|
"Mutate an expression"),
|
45
|
45
|
PYRPN_method("reset_stack", rpnexpr_reset_stack,
|
46
|
46
|
METH_NOARGS,
|
|
@@ -548,15 +548,15 @@ PyObject* rpnexpr_mutate(PyObject* slf, PyObject *args, PyObject *kwds)
|
548
|
548
|
{
|
549
|
549
|
PyRPNExpr_t *self = (PyRPNExpr_t*)slf;
|
550
|
550
|
|
551
|
|
- char *str_args = "|OI:RPNIterExpr.mutate";
|
552
|
|
- char *names[] = {"params", "n_mutations", NULL};
|
|
551
|
+ char *str_args = "|IO:RPNIterExpr.mutate";
|
|
552
|
+ char *names[] = {"n_mutations", "params", NULL};
|
553
|
553
|
|
554
|
554
|
PyObject *py_params = NULL;
|
555
|
555
|
unsigned int n_mutations = 1;
|
556
|
556
|
rpn_mutation_params_t params;
|
557
|
557
|
|
558
|
558
|
if(!PyArg_ParseTupleAndKeywords(args, kwds, str_args, names,
|
559
|
|
- &py_params, &n_mutations))
|
|
559
|
+ &n_mutations, &py_params))
|
560
|
560
|
{
|
561
|
561
|
return NULL;
|
562
|
562
|
}
|