/** op &=. * @throw type_err */ set& operator &=(const obj& o) { PyObject* r = PyNumber_InPlaceAnd(_p, o.p()); if(r) return *this; throw type_err("op &= failed"); }
static PyObject *Proxy_inplace_and(ProxyObject *self, PyObject *other) { PyObject *object = NULL; Proxy__ENSURE_WRAPPED_OR_RETURN_NULL(self); Proxy__WRAPPED_REPLACE_OR_RETURN_NULL(other); object = PyNumber_InPlaceAnd(self->wrapped, other); if (!object) return NULL; Py_DECREF(self->wrapped); self->wrapped = object; Py_INCREF(self); return (PyObject *)self; }