SF patch #1458476 with modifications based on discussions in python-dev. This
adds the following API calls: PySet_Clear(), _PySet_Next(), and
_PySet_Update(). The latter two are considered non-public. Tests and
documentation (for the public API) are included.
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex
index 3ab9e33..60bba76 100644
--- a/Doc/api/concrete.tex
+++ b/Doc/api/concrete.tex
@@ -3027,8 +3027,6 @@
\cfunction{PyNumber_InPlaceAdd()}, \cfunction{PyNumber_InPlaceSubtract()},
\cfunction{PyNumber_InPlaceOr()}, and \cfunction{PyNumber_InPlaceXor()}).
-For example, to clear a set, write: \code{PyObject_CallMethod(s, "clear", NULL)}
-
\begin{ctypedesc}{PySetObject}
This subtype of \ctype{PyObject} is used to hold the internal data for
both \class{set} and \class{frozenset} objects. It is like a
@@ -3112,7 +3110,6 @@
\class{frozenset}, or an instance of a subtype.
\end{cfuncdesc}
-
The following functions are available for instances of \class{set} or
its subtypes but not for instances of \class{frozenset} or its subtypes.
@@ -3143,4 +3140,6 @@
of \class{set} or its subtype.
\end{cfuncdesc}
-
+\begin{cfuncdesc}{int}{PySet_Clear}{PyObject *set}
+ Empty an existing set of all elements.
+\end{cfuncdesc}