]> granicus.if.org Git - python/commitdiff
Show an example of calling a named set method.
authorRaymond Hettinger <python@rcn.com>
Mon, 20 Mar 2006 18:35:55 +0000 (18:35 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 20 Mar 2006 18:35:55 +0000 (18:35 +0000)
Doc/api/concrete.tex

index 5521b80ba9bf53dbd8e82ce77488b6e1f93fe810..f82f7c7021a90c12ebbbe9086b8dce4534a2eab1 100644 (file)
@@ -3025,8 +3025,8 @@ or the abstract number protocol (including
 \cfunction{PyNumber_Or()}, \cfunction{PyNumber_Xor()},
 \cfunction{PyNumber_InPlaceAdd()}, \cfunction{PyNumber_InPlaceSubtract()},
 \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}
   This subtype of \ctype{PyObject} is used to hold the internal data for