- Why the heck hasn't this been exported before, duh?
- Method name clear() chosen as this appears to be emerging as a
standard of sorts for this kind of operation: dictionaries and
sets have it and list will get it in some python 3.x version.
Additionally foo.empty() could easily be mistaken for "test whether
container foo is empty or not" (especially those with c++ background...)
}
static PyObject *
+rpmts_Clear(rpmtsObject * s)
+{
+ rpmtsEmpty(s->ts);
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *
rpmts_OpenDB(rpmtsObject * s)
{
int dbmode;
Note: The callback may not be None.\n" },
{"clean", (PyCFunction) rpmts_Clean, METH_NOARGS,
NULL },
+ {"clear", (PyCFunction) rpmts_Clear, METH_NOARGS,
+"ts.clear() -> None\n\
+Remove all elements from the transaction set\n" },
{"openDB", (PyCFunction) rpmts_OpenDB, METH_NOARGS,
"ts.openDB() -> None\n\
- Open the default transaction rpmdb.\n\