Index: Lib/python/std_set.i =================================================================== --- Lib/python/std_set.i (revision 13476) +++ Lib/python/std_set.i (working copy) @@ -49,6 +49,14 @@ return *(swig::cgetpos(self, i)); } + void add(value_type x) { + self->insert(x); + } + + void discard(value_type x) { + self->erase(x); + } + }; %enddef Index: Lib/python/pyrun.swg =================================================================== --- Lib/python/pyrun.swg (revision 13476) +++ Lib/python/pyrun.swg (working copy) @@ -1331,6 +1331,9 @@ } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + if (PyErr_Occurred()) { + PyErr_Print(); + } PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; #else