Commit 66760f87 authored by Raymond Hettinger's avatar Raymond Hettinger

Show an example of calling a named set method.

parent e502693e
...@@ -3025,8 +3025,8 @@ or the abstract number protocol (including ...@@ -3025,8 +3025,8 @@ or the abstract number protocol (including
\cfunction{PyNumber_Or()}, \cfunction{PyNumber_Xor()}, \cfunction{PyNumber_Or()}, \cfunction{PyNumber_Xor()},
\cfunction{PyNumber_InPlaceAdd()}, \cfunction{PyNumber_InPlaceSubtract()}, \cfunction{PyNumber_InPlaceAdd()}, \cfunction{PyNumber_InPlaceSubtract()},
\cfunction{PyNumber_InPlaceOr()}, and \cfunction{PyNumber_InPlaceXor()}). \cfunction{PyNumber_InPlaceOr()}, and \cfunction{PyNumber_InPlaceXor()}).
Note, \cfunction{PyNumber_InPlaceSubtract()} is also useful clearing
clearing a set (\code{s-=s}). For example, to clear a set, write: \code{PyObject_CallMethod(s, "clear", NULL)}
\begin{ctypedesc}{PySetObject} \begin{ctypedesc}{PySetObject}
This subtype of \ctype{PyObject} is used to hold the internal data for This subtype of \ctype{PyObject} is used to hold the internal data for
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment