|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-18 16:08:14
----- Original Message -----
From: "scott snyder" <snyder_at_[hidden]>
> I also fixed a problem with the inplace power operator. I call attention
> to this because i think the same problem is also present in the existing
> non-inplace version, from which i copied it.
...
> Before i made that change for the inplace version, i was getting
> errors about passing the wrong number of arguments.
Hi Scott,
You are right about the error, but I was wondering why none of our tests
were failing. Turns out its effects are masked by the following checks in
operators.hpp:
if (args.size() == 3 && args[2]->ob_type != Py_None->ob_type
{
PyErr_SetString(PyExc_TypeError, "expected 2 arguments, got 3");
throw argument_error();
}
Since the 3rd argument is None, it gets dropped. I guess you saw the error
because you don't use the "automatic wrapping" feature from operators.hpp...
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk